Hi! Probably a very basic issue, but I haven’t been able to solve a (balanced) two-component Bose-Hubbard model:
with soft-core bosons and a fixed (and say equal) number of bosons of each species N=N_A=N_B (total N_A+N_B conserved number of particles has been asked before).
For a lattice with M=5 sites and N=M particles of each species, my current code is
using ITensors
let
M = 5
U = 1.0
UAB = 0.0
t = 1.0
sites = [isodd(n) ? siteind("Boson", n; dim=M+1, conserve_qns=true, qnname_number="Number_odd") : siteind("Boson", n; dim=M+1, conserve_qns=true, qnname_number="Number_even") for n in 1:2*M]
os = OpSum()
for i in 1:M
# Interaction AA
os += - 0.5*U, "N", 2*i-1
os += 0.5*U, "N", 2*i-1, "N", 2*i-1
# Interaction BB
os += - 0.5*U, "N", 2*i
os += 0.5*U, "N", 2*i, "N", 2*i
# Interaction AB
os += UAB, "N", 2*i-1, "N", 2*i
if i<M
# Tunneling A
os += -t, "A", 2*i-1, "Adag", 2*(i+1)-1
os += -t, "Adag", 2*i-1, "A", 2*(i+1)-1
# Tunneling B
os += -t, "A", 2*i, "Adag", 2*(i+1)
os += -t, "Adag", 2*i, "A", 2*(i+1)
end
end
H = MPO(os, sites)
states = [ "1" for j in 1:2*M ]
psi0 = randomMPS(sites,states)
nsweeps = 5
maxdim = [10,20,100,100,200]
cutoff = [1E-10]
energy, psi = dmrg(H,psi0; nsweeps, maxdim, cutoff)
println(energy)
return
end
I have set U_{AB}=0 to check that I recover two uncoupled one-component Bose-Hubbards. However, I simply get vanishing energy (zero error, one bond, etc) in each sweep. Not sure what I am doing wrong. I guess the problem is with the tunneling or with the sites?
Thanks!