Dear all,
I am trying to calculate excited states of spinful fermi hubbard model as follows
using ITensors
let
N = 20
Npart = 10
t1 = 1.0
U = 1.0
sites = siteinds("Electron", N;
conserve_qns = true)
ampo = AutoMPO()
for f=1:N-1
ampo += -t1, "Cdagup", f, "Cup", f+1
ampo += -t1, "Cdagup", f+1, "Cup", f
ampo += -t1, "Cdagdn", f, "Cdn", f+1
ampo += -t1, "Cdagdn", f+1, "Cdn", f
end
for i=1:N
ampo += U, "Nupdn", i
end
H = MPO(ampo,sites)
#sweeps = Sweeps(6)
#nsweeps = 30
#maxdim!(sweeps,50,100,200,400,800,800)
#cutoff!(sweeps,1E-12)
nsweeps = 30
maxdim = [10,10,10,20,20,40,80,100,200,200]
cutoff = [1E-8]
noise = [1E-6]
#@show sweeps
#state = ["Emp" for n=1:N]
state = InitState(sites);
p = Npart
for i=N:-1:1
if p > i
println("Doubly occupying site $i")
state[i] = "UpDn"
p -= 2
elseif p > 0
println("Singly occupying site $i")
state[i] = (isodd(i) ? "Up" : "Dn")
p -= 1
end
end
# Initialize wavefunction to be bond
# dimension 10 random MPS with number
# of particles the same as `state`
psi0 = MPS(state)
# Check total number of particles:
#@show flux(psi0)
# Start DMRG calculation:
energy, psi = dmrg(H, psi0, nsweeps, maxdim, cutoff, noise)
#psi1_init = randomMPS(sites, state, 10)
#energy1,psi1 = dmrg(H,[psi0],psi1_init; nsweeps)
println("\nGround State Energy = $energy")
#println("DMRG energy gap = ",energy1-energy);
end
What I should to use instead InitState in Julia? According to Exited states of Hubbard model - ITensor Support Q&A randomMPS does not work in a quantum number (QN) conserving calculation. Is any ideas how to manage this problem?