0 votes
asked by (640 points)

Hello everyone!

The ground energy of the Ising model in a transverse field with OBC can be found, for example at

https://dmrg101-tutorial.readthedocs.io/en/latest/tfim.html

Here is the code

#include "itensor/all.h"

using namespace itensor;
using std::vector;

int main()
{
int N = 16;
auto sites = SpinHalf(N);
auto psi = MPS(sites); 

auto ampo = AutoMPO(sites);
for(int j = 1; j < N; ++j)
    {
    ampo += -1.0,"Sz",j,"Sz",j+1;
ampo += -1.0,"Sx",j;
    }
ampo += -1.0,"Sx",N;    
auto H = MPO(ampo);

auto sweeps = Sweeps(4);
sweeps.maxm() = 10,40,100,200;
sweeps.cutoff() = 1E-9;

auto energy = dmrg(psi,H,sweeps,{"Quiet",true});

printfln("result",energy/N);

return 0;
}

The code does not reproduce the correct results (see the table at the site)

2 Answers

+1 vote
answered by (70.1k points)

Hi abraDabra,
So I think that website is actually in error. The critical point of the transverse-field Ising model occurs at h/J = 1 when one writes the Hamiltonian in terms of Pauli matrices, not in terms of spin operators (Pauli matrices divided by two). This site writes the Hamiltonian in terms of spin operators as you can see, but still states that the critical point occurs at h/J = 1, which is not correct.

Could you see if there is another reference somewhere, or another code you can obtain, which could reproduce these energies or give correct energies?

Best regards,
Miles

commented by (14.1k points)
I didn't notice you had already commented, but it looks like if you make the Hamiltonian with:

    for(int j = 1; j < N; ++j)
        {
        ampo += -4.0,"Sz",j,"Sz",j+1;
        ampo += -2.0,"Sx",j;
        }
    ampo += -2.0,"Sx",N;

it matches the formula they give.
commented by (70.1k points)
Thanks Matt. Great to know one can get the energies on the site if one makes this fix. Yes, that's what I had suspected but didn't check it myself.
commented by (14.1k points)
I added a test for DMRG using that exact result here: https://github.com/ITensor/ITensor/blob/v3/unittest/mpo_test.cc#L537 since we should have a unit test for DMRG anyway.
commented by (70.1k points)
That's a good idea - thanks for doing that
+2 votes
answered by (14.1k points)

Hello,

I believe that website you are referencing is slightly wrong. The phase transition for the Hamiltonian they write down, written in terms of spin operators, should be h/J=1/2, not h/J=1 (all of it looks correct if the Hamiltonian was written in terms of Pauli operators). If you change the line to:

ampo += -2.0,"Sz",j,"Sz",j+1; 

you should get the correct critical ground state (and the energy should match the formula they give, up to a factor of two, I believe also because of the confusion between using Pauli operators and spin operators).

Cheers,
Matt

commented by (640 points)
Thank you very much MattFishman and miles!
Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...