Hello,
I’m trying to implement a dmrg code for the computation of the GS of the Bose Hubbard model in Julia. The code that I’m using is the following one
using ITensors
let
L = 4
Np = 2
miu = 1.0
U = 1.0
J = 1.0
sites = siteinds("Boson", L; conserve_qns=true, conserve_number=true)
os = OpSum()
os = OpSum()
for b in 1:(L - 1)
os += -miu - U*0.5, "N", b
os += U*0.5, "N", b, "N", b
os += -J, "A", b, "Adag", b + 1
os += -J, "Adag", b, "A", b + 1
end
os += -miu - U*0.5, "N", L
os += U*0.5, "N", L, "N", L
os += -J, "A", 1, "Adag", L
os += -J, "Adag", 1, "A", L
println(os)
H = MPO(os, sites)
states = ["0" for j=1:L]
for j in 1:Np
states[j] = "1"
end
psi0 = randomMPS(sites,states)
sweeps = Sweeps(5)
setmaxdim!(sweeps, 100,100,100,200,200)
setcutoff!(sweeps, 1E-13)
setnoise!(sweeps,1E-7,1E-10,1E-5,0,1E-8)
energy, psi = dmrg(H,psi0, sweeps)
println("\nGround State Energy = $energy")
return
end
The problem is that my results seems to be independent on the choice of the interaction strength U. If I change the other parameters the energy changes, but if change U no. So, my impression is that for the computer “U0.5, “N”, b" and "U0.5, “N”, b, “N”, b” are the same, thus in the Hamiltonian they cancel each other and there isn’t the dependence on the interaction.
Anyway, this type of formalism (“U*0.5, “N”, b, “N”, b”) is the one that is typically used to write the on-site interaction at least with the C++ version. Does the Julia version needs something different to write properly the on site interaction? Or am I just doing something wrong somewhere?
Kind regards,
Francesco