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
My expectation (though feel free to challenge this) is that the expectation value of the Hamiltonian with respect to the quantum state produced by CISD or UCISD $<\psi_{CISD}|H|\psi_{CISD}>$ matches the energy achieved by the CISD method up to machine precision.
Actual behavior
For some simple systems, the energy calculated as the Hamiltonian expectation value is typically higher than the energy reported by CISD.
Hi @simonwa7, it is great that you are using qml.qchem.import_state!
The code example uses default units for the coordinates: by default, we use the atomic unit in PennyLane while pyscf uses Å. The results should match if you use a bond length of 1.4010 or (0.7414 / 0.5291772109) when you construct the Hamiltonian. You can also use hamiltonian.sparse_matrix().toarray() to compute the sparse matrix representation of the Hamiltonian. I also encourage you to use the master branch of PennyLane which has an upgrade.
Could you please run the code with this correction and let us know if there is any issue? Thanks!
Thanks for the quick reply and appreciate the help @soranjh! And thanks for pointing out the unit conversion - that definitely solved some of my problems.
I did notice that when I ran similar code with a hydrogen chain with 4 atoms, I was still seeing similar inconsistencies with the energies. But when I installed pennylane from source and used the master branch as you recommended, all those inconsistencies went away!! So kudos on the upgrade :D
Expected behavior
My expectation (though feel free to challenge this) is that the expectation value of the Hamiltonian with respect to the quantum state produced by CISD or UCISD$<\psi_{CISD}|H|\psi_{CISD}>$ matches the energy achieved by the CISD method up to machine precision.
Actual behavior
For some simple systems, the energy calculated as the Hamiltonian expectation value is typically higher than the energy reported by CISD.
Additional information
No response
Source code
Tracebacks
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: