Hello,
I am trying to calculate the density of up-spin particles in an hexagonal chain with 6 sites considering only first-neighbor tight binding interactions.
When I set the chain to have one electron-up only, the density is equally distributed between all 6 sites. However, when more electrons are added, the density is no longer uniform, regardless of the DMRG parameters I choose (maxm, niter, cutoff, noise and number of sweeps). This is very weird, as I don't see any reason the density shouldn't be the same in all sites.
Also, the results obtained can change depending on the position I choose to initialize the electrons. For instance, if I choose
state1.set(1,"Up");
state1.set(2,"Up");
the density of "up" states in each site is different than in the case
state1.set(1,"Up");
state1.set(6,"Up");
Here is an example of my complete code for the case with two electrons. Am I doing something wrong? Isn't the expected behavior that electrons should be evenly distributed between all sites?
#include "itensor/all.h"
#include <iostream>
#include <fstream>
using namespace itensor;
int main()
{
int N = 6;
double t = 1.0;
int nsweeps = 20;
int maxm = 200;
double cutoff = 1E-15;
int niter = 2;
double noise = 1E-5;
auto sites = Hubbard(N);
auto ampo = AutoMPO(sites);
//Tight-binding: first neighbors in the linear chain (sites 1-2 and 5-6)
for(int j = 1; j <= N-1; j+=4)
{
ampo += -t,"Cdagup",j,"Cup",j+1;
ampo += -t,"Cdagup",j+1,"Cup",j;
ampo += -t,"Cdagdn",j,"Cdn",j+1;
ampo += -t,"Cdagdn",j+1,"Cdn",j;
}
//Tight-binding: second neighbors in the linear chain (sites 1-3, 2-4, 3-5, 4-6)
for(int j=1; j <= N-2; j+=1)
{
ampo += -t,"Cdagup",j,"Cup",j+2;
ampo += -t,"Cdagup",j+2,"Cup",j;
ampo += -t,"Cdagdn",j,"Cdn",j+2;
ampo += -t,"Cdagdn",j+2,"Cdn",j;
}
//Use IQMPO or MPO to generate the hamiltonian
auto H = IQMPO(ampo);
//Define initial wavefunction MPS for IQMPS
auto state1 = InitState(sites);
state1.set(1,"Up");
state1.set(2,"0");
state1.set(3,"0");
state1.set(4,"0");
state1.set(5,"0");
state1.set(6,"Up");
//Create IQMPS
auto psi = IQMPS(state1);
//Define DMRG sweeps
auto sweeps = Sweeps(nsweeps);
sweeps.maxm() = maxm/20,maxm/10,maxm/2,maxm/2,maxm;
sweeps.cutoff() = cutoff;
sweeps.niter() = niter;
sweeps.noise() = noise;
auto energy = dmrg(psi,H,sweeps,{"Quiet",true});
//Calculating density in each site
std::ofstream file1;
file1.open ("nup.txt");
for(int ii = 1; ii <= N; ++ii)
{
auto Nup = sites.op("Nup",ii);
psi.position(ii);
ITensor ket = psi.A(ii);
ITensor bra = dag(prime(ket,Site));
auto nup = (bra*Nup*ket).real();
file1 << nup << std::endl;
}
file1.close();
return 0;
} //End of main
P.S.: Since I am working with an hexagon, I needed to number each site and displace them in a linear chain in order to conduct the calculations, which ended up creating second neighbor interactions in the linear chain. That is why the code includes first and second neighbors interactions for the linear chain. To make things clearer, here is how I chose to number the sites in the hexagon:
3
/ \
1 5
| |
2 6
\ /
4