I'm using the get_molecular_hamiltonian() method for H4, but the behavior is not being consistent from one execution to the next.
My application is VQE. The problem is that I want to store the optimized parameters, but not the Hamiltonian. However, when I evaluate the energy with the supposedly optimized parameters (obtained in a previous execution), the value is often suboptimal. I can't reproduce the ground state, because the parameters that should define it do not minimize the energy calculated with the Hamiltonian I obtain after I recreate the molecule.
Hello,
I'm using the
get_molecular_hamiltonian()
method for H4, but the behavior is not being consistent from one execution to the next.My application is VQE. The problem is that I want to store the optimized parameters, but not the Hamiltonian. However, when I evaluate the energy with the supposedly optimized parameters (obtained in a previous execution), the value is often suboptimal. I can't reproduce the ground state, because the parameters that should define it do not minimize the energy calculated with the Hamiltonian I obtain after I recreate the molecule.
Versions: pyscf 2.2.0, openfermion 1.5.1, openfermionpyscf 0.5
A very simple example of the variations in the Hamiltonian:
I won't post the full output as it's unnecessary, but I leave the last 10 lines for two different executions of the code above: