ProjectQ-Framework / FermiLib

FermiLib: Open source software for analyzing fermionic quantum simulation algorithms
https://projectq.ch/
Apache License 2.0
87 stars 39 forks source link

Extract Grid class from jellium_model's signature and use it in a few methods #31

Closed Strilanc closed 7 years ago

Strilanc commented 7 years ago

I'll use it in far more places after this gets merged.

Strilanc commented 7 years ago

@babbush Changing all those things at once will create a gigantic change that's too hard to review. We have to bite a piece at a time.

Point at the examples that don't work and I'll fix those, but we should defer consistency to future PRs making more and more things use Grid.

babbush commented 7 years ago

Now that I look I think none of the examples in the docs break actually. But there is a section called "Hamiltonians in the plane wave basis" in the ipython notebook in examples/. Update that and I'll approve the PR. Unless you are going to update the Hubbard code right away it would be helpful if you could also open an issue that says "use Grid class in Hubbard code".

babbush commented 7 years ago

Also, I just want to draw this PR to the attention of @Spaceenter who has been helping me with the code related to this plane wave stuff.

Strilanc commented 7 years ago

How am I supposed to update the notebook? We're including hard-coded output in the repo?

I updated the example code, but whenever I rerun anything it just complains about fermilib not being found.

babbush commented 7 years ago

Yes, the reason we have the output saved in the notebook is so that people can see the input code and its output on GitHub without needing to actually open the file. Are you saying that the ipython notebook is not running on your machine? That sounds like an issue...

Strilanc commented 7 years ago

Well, I've never used a jupyter notebook before so it's not too surprising that there's issues. For example, I probably need to add a path argument or tell it the virtualenv to use or something like that.

babbush commented 7 years ago

Ah ok. They are all the rage in science these days. Especially since I screwed us all by accidentally accepting that non-CLA pull request and now need to wait for Damian to revert, maybe try to get the jupyter notebooks working.

damiansteiger commented 7 years ago

The non-CLA pull request has been reverted. New merges are again possible. Please note that the develop branch is now the default branch (i.e., pull request should still be opened to the develop branch)

Strilanc commented 7 years ago

The commit is still in the history. Is it sufficient to revert it?

damiansteiger commented 7 years ago

We will check if a hard reset is possible on GitHub

Strilanc commented 7 years ago

It's possible, but you'll have to disable the protected status of master while you do it. So:

Strilanc commented 7 years ago

Squash-rebased.

damiansteiger commented 7 years ago

Thanks pointing this out. We have performed a hard reset.

I am very sorry that you had to rebase your pull request in order to remove this commit as well.