Dear Miles,
I’m experiencing an issue with number of fermion conservation when I include a term of p-wave pairing term. To be more precise, a minimum Hamiltonian contains a term like \Delta(c^\dagger_{i,\downarrow}c^\dagger_{i+1,\downarrow}+c_{i+1,\downarrow}c_{i,\downarrow}) which conserves Nf parity. I’m using Electron site and setting conserve_nfparity=true but it seems that DMRG finds a lowest energy state with different parity as compared to the initial one. Below I include a minimum conde where I note the problem.
using ITensors
let
N=4
t1=1.0
t2=1.0
Delta=1.0
E1=0.0
E2=0.0
sites = siteinds("Electron",N,conserve_qns=true,conserve_nf=false,
conserve_sz=false,conserve_nfparity=true)
########## Set Hamiltonian ###########
ampo = OpSum()
ampo += E1,"Nup",1
ampo += E2,"Nup",2
ampo += E1,"Ndn",1
ampo += E2,"Ndn",2
ampo += t1,"Cdagup",1,"Cup",3
ampo += t1,"Cdagup",3,"Cup",1
ampo += t1,"Cdagdn",1,"Cdn",3
ampo += t1,"Cdagdn",3,"Cdn",1
ampo += t2,"Cdagup",2,"Cup",4
ampo += t2,"Cdagup",4,"Cup",2
ampo += t2,"Cdagdn",2,"Cdn",4
ampo += t2,"Cdagdn",4,"Cdn",2
ampo += Delta,"Cdagdn",4,"Cdagdn",3
ampo += Delta,"Cdn",3,"Cdn",4
H= MPO(ampo,sites)
####################################
####### Set Initial state ############
state = [isodd(n) ? "Up" : "Dn" for n=1:N]
state[3]="Dn"
state[4]="Emp"
psi0 = randomMPS(sites,state)
println("Initial occupation")
Nup=expect(psi0,"Nup")
Ndn=expect(psi0,"Ndn")
@show(sum(Nup))
@show(sum(Ndn))
@show(sum(Nup+Ndn))
############# DMRG ##########
sweeps = Sweeps(10)
maxdim!(sweeps,50,100,100,300,500,500,600)
noise!(sweeps,1E-4,1E-6,1E-8,1E-10,1E-12,1E-12)
mindim!(sweeps,10)
cutoff!(sweeps,1E-8)
energy,psi = dmrg(H,psi0,sweeps)
#############################
println("Final occupation")
Nup=expect(psi,"Nup")
Ndn=expect(psi,"Ndn")
@show(sum(Nup))
@show(sum(Ndn))
@show(sum(Nup+Ndn))
end
In this example I have just electron 4 sites and the pairing takes place between sites 3 and 4. If I start with an state with 3 electrons the ground state will appear with 4 electrons. Could you try to figure out if there is a problem?
Kind regards,
Edson.