Hello,
I was trying to implement this very simple Hamiltonian:
When, I run the g=0 case, I would expect to simply get the ground state energy of an XX chain, which should be 2J/\pi. However, I do not get the correct result, not even in the N=2, where one should get E=-J.
I am using the folllowing code:
function XXZ(Ncells,J,g):
sites = siteinds("S=1/2",2*Ncells)
index = 0
os = OpSum()
for i in 1:Ncells-1
os += J,"S+",2*i-1,"S-",2*i+1
os += J,"S-",2*i-1,"S+",2*i+1
os += g,"Sx",2*i-1,"S+",2*i
os += g,"Sx",2*i-1,"S-",2*i
os += g,"S+",2*i,"Sx",2*i+1
os += g,"S-",2*i,"Sx",2*i+1
end
H = MPO(os,sites)
psi0 = randomMPS(sites)
nsweeps = 5
maxdim = [200,50]
cutoff = [1E-10]
energy, psi = dmrg(H,psi0; nsweeps, maxdim, cutoff)
return energy
end
Thank you.