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

possible issue with basis rotation #25

Closed conta877 closed 6 years ago

conta877 commented 6 years ago

I hope this is not a user error. Seems like run_psi4 is not generating the same hdf5 files that you have under openfermion/data. The calculated hf energies are correct but the one_body_integrals are not and they are not diagonal; maybe an issue with basis rotation?

attached is a sample output comparing the loaded one_body_integrals with the run. load_vs_run.pdf

conta877 commented 6 years ago

seems to be originating from this commit: (https://github.com/quantumlib/OpenFermion/pull/117) reverting back to one_body_basis_change and two_body_basis_change fixes the issue. #

babbush commented 6 years ago

Thanks for figuring that out. @jarrodmcc and I are looking into it now! @fangzh-umich and @kevinsung, can you also help us get to the bottom of this since that was your PR? When we fix this we should also add a new test in OpenFermion which makes sure future changes don't mess things up again.

conta877 commented 6 years ago

if needed, i got the temporary fix in my fork.

babbush commented 6 years ago

Thanks, I have the fix as well actually. But it has broken a couple other tests in _polynomial_tensor_test. I am working on repairing now. We'll have it all fixed fairly soon...

In any event, this was a major bug and we should have had better testing to catch it. The broader problem is that we haven't been able to install the electronic structure packages on Travis so it has been difficult to implement continuous integration for these plugins. But it is also very challenging to test parts of OpenFermion core without the plugins. This is something we're going to need to think about.

In any event, conta877, you have been really helpful and we have a fairly liberal policy about adding people as code authors / to the arXiv OpenFermion paper. If you'd like to be officially added as an author, let us know! This would require signing the CLA and emailing me at my git user name @google.com so I can send you a link to the paper overleaf.

fangzh-umich commented 6 years ago

It's been so long that I can't remember clearly, but this probably has something to do with https://github.com/quantumlib/OpenFermion/issues/116.