shuaigroup / Renormalizer

Quantum dynamics package based on tensor network states
https://shuaigroup.github.io/Renormalizer/
Apache License 2.0
52 stars 16 forks source link

mismatch between the ouput ground state energy and mps #147

Open jiangtong1000 opened 1 year ago

jiangtong1000 commented 1 year ago

The optimize_mps returns the macro_iteration_result and res_mps. If we evaluate the energy by res_mps.expectation(mpo), the energy is not necessarily equal to min(macro_iteration_result). It is not even necessarily contained in macro_iteration_result. For instance, if the minimal energy is not obtained in the last sweep, but in the middle sweeps (energy does not decrease monotonically with the number of sweeps), then we obtainmin(macro_iteration_result)$\neq$res_mps.expectation(mpo)

jiangtong1000 commented 1 year ago

image for instance, M=10 for H-4 (sto-3g basis, r0=1.6), Try to evaluate <MPS|H|MPS>, and it does not equivalent to any value appear in the Figure. I am looking into the code to check the bugs

jiangtong1000 commented 1 year ago

ummm, I think the lowest energy happens in the middle because of using the percent in the first several sweeps, so I was wondering if should modify the convergence condition by excluding the results of the first several sweeps. Although this can be seen in very small systems such as I mentioned above. https://github.com/shuaigroup/Renormalizer/blob/bac8bed3d156779782f45558c4872031ccd17010/renormalizer/mps/gs.py#L123-L130