Hello ITensors Team ,
Ok I decide ask a new question and close the last one.
i'm trying to investigate the spin Gap behavior of Heisenberg spin-1/2 J1-J2(J1 and J2 >0, non-frustrated) Isotropic model with interations between first pair of spins with exchange paramenter J1 and the following pair of spins with interations mediated by J2 an so on. This simple model presents an topological phase transitions at J1=J2 between "Haldane-Even" and "Haldane-Odd" phases.
I wrote an simple code for this model considering open boundary conditions as follows :
using ITensors
using DelimitedFiles
int = range(0.95, step=0.5, stop=1.5)
Data = []
Data_TW = []
for i in int
let
N = 120
sites = siteinds("S=1/2", N; conserve_qns=true)
J_1 = 1.0
J_2 = i
ampo = AutoMPO()
for j=1:2:N
ampo += 0.5*J_1,"S+",j,"S-",j+1
ampo += 0.5*J_1,"S-",j,"S+",j+1
ampo += J_1,"Sz",j,"Sz",j+1
end
for j=2:2:N-2
ampo += 0.5*J_2,"S+",j,"S-",j+1
ampo += 0.5*J_2,"S-",j,"S+",j+1
ampo += J_2,"Sz",j,"Sz",j+1
end
H = MPO(ampo,sites)
state1 = []
push!(state1, "Up", "Up")
for n=2:N/2
push!(state1, "Up", "Dn")
end
init_state = [isodd(n) ? 1 : 2 for n = 1:N]
psi0 = randomMPS(sites,init_state,32)
psi1 = randomMPS(sites,state1,32)
@show flux(psi0)
@show flux(psi1)
sweeps0 = Sweeps(10)
maxdim!(sweeps0, 160,320,600,800,1000)
cutoff!(sweeps0, 1e-11)
noise!(sweeps0, 1e-8,1e-9, 1e-10,0.0)
energy0,psi0 = dmrg(H,psi0,sweeps0)
H02 = inner(H,psi0,H,psi0)
E0 = inner(psi0,H,psi0)
var0 = H02 - E0^2
@show var0
sweeps1 = Sweeps(18)
maxdim!(sweeps1, 320,600,800,1000,1200)
cutoff!(sweeps1, 1e-11)
noise!(sweeps1, 1e-8, 1e-9,1e-10,0.0)
energy1,psi1 = dmrg(H,psi1,sweeps1)
H12 = inner(H,psi1,H,psi1)
E1 = inner(psi1,H,psi1)
var1 = H12 - E1^2
@show var1
gap = energy1-energy0
sgap = N*gap
println("The Gap is =",gap)
println("The Scaled gap is=", sgap)
println("The J_2 value is :", J_2)
push!(Data, ["$J_2" "$energy0" "$gap" "$sgap"])
end
open("Data(test).dat", "w") do f
writedlm(f, Data, '\t')
end
end
In my code the first loop concerning the J1 interacting spin terms i sum up to N for each 2 points and the second loop for the J2 interacting terms i sum up to N-2 terms(OBC).
The strange fact is, i cannot reproduce the literature results because my spin gap behaves like an Gapped-Gapless transition. The curious fact is, when i change the first loop summation(Up to N-2), i reproduce the correct behavior with an clear quantum phase transition at J = J2/J1 = 1.0 , but with the penalty of the missing interaction at last pair of spins(which shows up when i compute the local magnetization).
I already tried several initial different states , productMps vs randomMPS wavefunctions and different values of noise term .
Probably i'm missing something, i'm grateful with any help ! Thanks !