Hi, I was trying to use a 4-site free fermion chain with PBC to do benchmark. From the tight-binding model, we know that for a single fermion, the GS energy is -2, and for 2 femrions, it's also -2, because the next unoccupied level is 0 in energy for this 4-site problem.
Firstly I tried directly using the "Fermion" site type provided at https://github.com/ITensor/ITensors.jl/blob/v0.1.41/src/physics/site_types/fermion.jl
Everything is consistent.
Then I tried defining my own site type, the only thing I changed is renaming "Fermion" to "CFermion" (copy paste and rename, that's all). It may sound weird, but the debugging process eventually led me to this trivial step. The one-fermion energy is still correct, but the two-fermion GS energy I got is -2.828..., which is even lower than the exact result.
Here is the structure of my code:
using ITensors
"the copy paste part, but with the renaming"
let
N = 4
numbsweeps = 10
sweeps = Sweeps(numbsweeps)
maxdim!(sweeps,10,20,100)
cutoff!(sweeps,1e-10)
sites = siteinds("CFermion",N)
# two-particle
states = ["Occ","Occ","Emp","Emp"]
psi0 = productMPS(sites,states)
ampo = AutoMPO()
for j = 1:N-1
ampo += "C",j,"Cdag",j+1
ampo += "C",j+1,"Cdag",j
end
ampo += "C",N,"Cdag",1
ampo += "C",1,"Cdag",N
H = MPO(ampo,sites)
energy,psi = dmrg(H,psi0,sweeps)
return
end
Thanks a lot for your help.
-Mason