quantumlib/OpenFermion-Psi4

Error in IPython demo file + _psi_template file (?)

TariniHardikar opened this issue · 4 comments

Hi!

I noticed that there was a small error with the demo notebook for the plugin, most likely a remnant of the fermilibplugin naming.

I believe from openfermion.utils import MolecularData should be from openfermion.hamiltonians import MolecularData.

Additionally, the default template file has the line:

from openfermion.ops import (one_body_basis_change, two_body_basis_change)

I might be mistaken, but to the best of my knowledge, I couldn't find a one_body_basis_change or two_body_basis_change in ops (or anywhere else for that matter). The closest function I could find was general_basis_change.

Thanks,
Tarini

Hi Tarini,

Indeed, I agree that all of these things should be changed. We used to have functions called one_body_basis_change and two_body_basis_change but now we have just one that works for any interaction order called general_basis_change.

I am happy to make these changes later today. However, since you pointed them out, would you like to make the pull request to fix things? If so we can add you as a developer to the alphabetical section of the main OpenFermion authors list.

Also looping in @kevinsung who I believe made these changes.

Hi Ryan,

Sure, I'll make the PR to fix these issues.

Hi Ryan,

I have submitted the PR. I would also like to suggest that the variable name key in general_basis_change be changed to something more specific and/or usage of the key be specified in the documentation. Independent of issue #86 I found the parameter a bit confusing to understand.

Thanks,
Tarini

Okay, I have added a little bit of detail. I also change the import of that function so it is easier to use. See quantumlib/OpenFermion#131. It's not merged yet and there is a possiblity tests will fail due to the order of imports in init. Once I've taken care of this I'll let you know. Also, be sure to sign the project CLA!