Issues with Nf parity conservation

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.

Dear Edson,
Thanks for the really nice code which was helpful for me to run while thinking about your question. I think I realized the answer to your question is actually a conceptual one and not a code one. But the code helped me because I was printing out samples from the wavefunction (using the ITensor sample! function if you want to try it) and they were always coming out with odd parity. But I was getting the same Nup+Ndn total as you were.

So here’s the answer: having odd parity, as your state does, does not mean that the total density needs to be an odd number, or even an integer. Here’s an example state that shows this:

\ket{\psi} = \frac{1}{\sqrt{3}}( \ket{\uparrow 0 0} + \ket{0 0 \uparrow} + \ket{\uparrow\uparrow\uparrow})

If you take the expected value of \hat{N}_\uparrow in that state, it should give some value between 1 and 3 whereas it does have odd parity because each ket has an odd number of fermions in it.

If you do want to check the overall parity or overall quantum-number properties of your state after DMRG, you can call

flux(psi)

and get the parity that way. Or you could call sample!(psi) as I mentioned to see representative samples from the state. The samples are obtained using this algorithm.

Dear Miles,

Thank you very much for realizing my naive mistake. I completely agree with you. I wanted to check for the symmetry of the ground state and stated by looking at the expectation value of the total number of electrons which indeed is not useful for this purpose. The best way is indeed using the function flux().

Kind regards,

Edson.

Hi Edson, no problem. I was confused by it at first too, and thought there was a bug, but then when I checked the flux and samples of the state itself those looked ok, so then I realized the issue must be with the densities.