You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PySCF is not guaranteed to return a wavefunction with the requested spin squared. When the spin squared deviates from the value requested, then e_sci in this line is not the energy of the wavefunction.
But there may be situations where it is not correct. In PySCF's normal FCI class, there is an e_tot attribute which is supposed to always return the energy, but SelectedCI doesn't have that. The surest thing to do is just to compute the energy directly from the RDMs:
What should we add?
PySCF is not guaranteed to return a wavefunction with the requested spin squared. When the spin squared deviates from the value requested, then
e_sci
in this line is not the energy of the wavefunction.qiskit-addon-sqd/qiskit_addon_sqd/fermion.py
Line 135 in 6a882f6
Mario investigated and found this to be apparently the correct formula:
But there may be situations where it is not correct. In PySCF's normal FCI class, there is an
e_tot
attribute which is supposed to always return the energy, but SelectedCI doesn't have that. The surest thing to do is just to compute the energy directly from the RDMs:(courtesy of Mario)
TODO construct a reproduction of this issue so it can be tested for
The text was updated successfully, but these errors were encountered: