Hole doping in next-neighbor tJ model system

Hello Everyone!

I am working on a next-neighbor tJ model system and was trying to calculate the total density of the system. I was now trying to vary the hole doping or assign number electrons but I am not entirely sure how that can be done. I am pretty new to itensor. What I am trying to do here might be very simple, but due to my very minimal knowledge of itensor, I am not able to figure it out.

Here is my code:

#include “itensor/all.h”
using namespace itensor;

int main()
{
int Lx = 12;
int Ly = 4;
auto L = Lx*Ly;
double t = 1.0;
double Jz = 1.0;
auto yperiodic = false;

auto sites = tJ(L);

auto ampo = AutoMPO(sites);
auto lattice = squareLattice(Lx,Ly,{"YPeriodic=",yperiodic});

for(auto bnd : lattice)
    {
    ampo += -t,"Cdagup",bnd.s1,"Cup",bnd.s2;
	ampo += -t,"Cdagup",bnd.s2,"Cup",bnd.s1;
	ampo += -t,"Cdagdn",bnd.s1,"Cdn",bnd.s2;
	ampo += -t,"Cdagdn",bnd.s2,"Cdn",bnd.s1;
	ampo += Jz,"Sz",bnd.s1,"Sz",bnd.s2;
	ampo += 0.5*Jz,"S+",bnd.s1,"S-",bnd.s2;
    ampo += 0.5*Jz,"S-",bnd.s1,"S+",bnd.s2; 
	ampo +=-0.25*Jz,"Ntot",bnd.s1,"Ntot",bnd.s2;
    }
auto H = toMPO(ampo);

auto state = InitState(sites);
for(int j = 1; j <= L; ++j)
{
	if(j%4==1)  state.set(j,"Up");
	else if(j%4==2)  state.set(j,"Dn");
	else state.set(j,"Emp");
}
	
auto psi0 = MPS(state);
auto sweeps = Sweeps(20);
sweeps.noise() = 1E-6,1E-6,1E-8,1E-10,1E-12;
sweeps.maxdim() = 20,50,100,200;
sweeps.cutoff() = 1E-14;
auto [energy,psi] = dmrg(H,psi0,sweeps,"Quiet");

Vector upd(L),dnd(L);
for(int j = 1; j <= L; ++j)
    {
    psi.position(j);
    upd(j-1) = elt(dag(prime(psi(j),"Site"))*op(sites,"Nup",j)*psi(j));
    dnd(j-1) = elt(dag(prime(psi(j),"Site"))*op(sites,"Ndn",j)*psi(j));
    }

println("Up Density:");
for(int j = 0; j < L; ++j)
    printfln("%d %.10f",1+j,upd(j));
println();

println("Down Density:");
for(int j = 0; j < L; ++j)
    printfln("%d %.10f",1+j,dnd(j));
println();

println("Total Density:");
for(int j = 0; j < L; ++j)
    printfln("%d %.10f",1+j,(upd(j)+dnd(j)));
println();

printfln("Ground State Energy = %.10f",energy);

return 0;

}

Hi Shradda,
To change the doping of the system, you just need to change the number of particles in the initial state that you provide to DMRG. When conserving particle number, as you are doing, DMRG will not change the total particle number throughout the calculation. So you control it by setting it at the very beginning when making your state.

Therefore you will need to alter the lines

auto state = InitState(sites);
for(int j = 1; j <= L; ++j)
{
	if(j%4==1)  state.set(j,"Up");
	else if(j%4==2)  state.set(j,"Dn");
	else state.set(j,"Emp");
}

so that the number of particles ends up being what you want. (You can see the above logic places a particle on the first and second sites out of every 4 sites, so you could change that logic to place more or fewer particles.)

Lastly, if you’re totally new to ITensor, you might find our new Julia version is easier to use while being just as fast. However, the C++ version still remains a very good option for doing things like ground state DMRG calculations, such as in your code above.

1 Like

Thank you so much for the explanation!