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
82 stars 25 forks source link

Problem with non-diagonal interaction in 2-spin mode #130

Closed HengyueLi closed 2 years ago

HengyueLi commented 2 years ago

Consider a two-spin system. The Hamiltonian is defined as H= S_x S_z. With a local rotation at the first spin, this system should equivalent to H= S_z S_z. So the energy should be +/- 0.25. But I get 0. To produce the problem, just set 0 1 x z 1 in the pair.txt. In case of any other influence, I upload the configuration ('test.zip'). One can run run.sh directly. Please notice the last line in run.sh. I redefined hphi as the bin file of HPhi. test.zip

tmisawa commented 2 years ago

@HengyueLi

I am sorry that there is a bug in the site index in MakeDef.py I also fixed a bug. please check it.

https://github.com/issp-center-dev/HPhi/commit/9a8fb13e85b344fc924d93df11149f0a66c4a84a

tmisawa commented 2 years ago

And, please note that for off-diagonal interactions, this script add S^α_{I}S^β_{J}+S^β_{I}S^α_{J}

So, 0 1 x z 1 corresponds to S^x_0*S^z_1+S^z_0*S^x_1 and its energy is twice of SzSz, i.e., -0.5.

HengyueLi commented 2 years ago

Thanks for the explanation. And also, the script is working now.