quantumlib / OpenFermion-Psi4

OpenFermion plugin to interface with the electronic structure package Psi4.
GNU Lesser General Public License v3.0
82 stars 45 forks source link

ImportError: cannot import name general_basis_change (_psi4_template) #23

Closed conta877 closed 6 years ago

conta877 commented 6 years ago

fix: in openfermionpsi4/_psi4_template

change from:

from openfermion.ops import general_basis_change

to

from openfermion.ops._polynomial_tensor import general_basis_change

babbush commented 6 years ago

Thanks for this. In fact, the code works fine with the development version of OpenFermion but it doesn't work with the latest PyPI version (the official OpenFermion v0.2). This raises the question of whether we should temporarily make the change you suggest or whether we should just push OpenFermion v0.3 to PyPI. The question is whether we have enough content for a new a release. @jarrodmcc @idk3 @kevinsung any thoughts?

kevinsung commented 6 years ago

It seems the problem is that OpenFermion is being changed without making sure that all its plugins remain compatible. In this case, perhaps we can make the change and update the version for just the plugin? After all, only code in the plugin needs to be changed.

babbush commented 6 years ago

Probably easier to just update the plugin - I'll do that later today then.

kevinsung commented 6 years ago

Oh, I just realized that in this case updating the OpenFermion version would also fix the bug, in a more "harmonious" way... But yeah it's easier to just fix the plugin.

babbush commented 6 years ago

Yep, that's what I was trying to say.