issp-center-dev / HPhi

Quantum Lattice Model Simulator Package
https://www.pasums.issp.u-tokyo.ac.jp/hphi/en/
GNU General Public License v3.0
91 stars 25 forks source link

Hello, I have a question about the number of iterations for precision. #180

Open shuailiu199966 opened 2 months ago

shuailiu199966 commented 2 months ago

In the model below, I set Lanczos_max to 8000, but it still doesn't converge. What could be the reason for this? How should I resolve this issue? In regular training, is it better to have a larger Lanczos_max? Does it affect the runtime? calcmod.txt greenone.txt greentwo.txt interAll.txt kitaev-heisenberg_137513.txt locspn.txt modpara.txt namelist.txt Ztrans.txt

ultimatile commented 2 months ago

Please try to remove the line PreCG in the modpara file or try CalcType 0 (using the Lanczos method) in the calcmod file. In my trials, 309 steps were required to finish with the CG method without PreCG 1, while 308 steps were needed with the Lanczos method. I've also changed to exct 2 for the CG case, so the result may change when exct is 1. The final ground state energy is -52.6784168749754542 for both methods.

shuailiu199966 commented 2 months ago

What is the purpose of the PreCG parameter, and why does it have such a big impact?

tmisawa commented 2 months ago

PreCG is a parameter for switching on the preconditioning of the CG method. For details of the preconditioning, please take a look at the sec. 3.3 in the HPhi paper.

https://www.sciencedirect.com/science/article/pii/S001046552400016X?via%3Dihub

In general, preconditioning is effective when the diagonal term of Hamiltonian is large (see Fig. 5), as when Ising interactions (S_iz*S_jz) are large. However, in other cases, the preconditioning may delay convergence, so it is usually safe to turn preconditioning off.