Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mismatch between the ouput ground state energy and mps #147

Open
jiangtong1000 opened this issue Jan 7, 2023 · 2 comments
Open

mismatch between the ouput ground state energy and mps #147

jiangtong1000 opened this issue Jan 7, 2023 · 2 comments

Comments

@jiangtong1000
Copy link
Collaborator

jiangtong1000 commented Jan 7, 2023

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
Copy link
Collaborator Author

jiangtong1000 commented Jan 7, 2023

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
Copy link
Collaborator Author

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.

# check if convergence
if isweep > 0 and percent == 0:
v1, v2 = sorted(macro_iteration_result)[:2]
if np.allclose(
v1, v2, rtol=mps.optimize_config.e_rtol, atol=mps.optimize_config.e_atol
):
logger.info("DMRG has converged!")
break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant