joselado / dmrgpy

DMRGPy is a Python library to compute quasi-one-dimensional spin chains and fermionic systems using matrix product states with DMRG as implemented in ITensor. Most of the computations can be performed both with DMRG and exact diagonalization for small systems, which allows one to benchmark the results.
GNU General Public License v3.0
84 stars 20 forks source link

Repeated calculation of gs when evaluating vev #3

Closed doomspec closed 4 years ago

doomspec commented 4 years ago

Hi Jose. Thanks for your awesome package! It helped me very much. I am trying to get the vacuum expectation value (vev) of many operators on the ground state. However, I found that the DMRG (or ED) calculations are carried out again and again if I use sc.vev(). I am wondering whether there is a way to reuse the calculated wavefunction?

joselado commented 4 years ago

Hi doomspec,

thank you for your nice feedback, it is great to hear that the package has been useful! Regarding your question, I have now made small modification, and now the code will reuse the calculated ground state in DMRG, so vev() will now not rerun the ground state calculation.

Thanks a lot for pointing that out!

Best regards, Jose