Hello everyone!
Recently, I was doing something related to one-dimensional two component bose-hubbard model.
I need its density distribution and correlators at various two points.
With the guide in this post ( Two-component Bose-Hubbard model - ITensor Support Q&A), I construct a new site called ABBoson with two component conserved separately.
It’s Hamiltonian is as follows:
and Hamiltonian in my codes:
auto sites = ABBoson(L,{"ConseveQNs",true,"ConserveNb",false,"MaxOcc",max});
auto ampo = AutoMPO(sites);
for (int i = 1;i <= L-3; i += 2)
{
ampo += -U/2, "N", i;
ampo += U/2, "N", i,"N",i;
ampo += -t_1, "A", i, "Adag", i + 2;
ampo += -t_1, "Adag", i, "A", i + 2;
}
ampo += -U/2, "N", L-1;
ampo += U/2, "N", L-1,"N",L-1;
for (int i = 2;i <= L-2; i += 2)
{
ampo += -U/2, "N", i;
ampo += U/2, "N", i,"N",i;
ampo += -t_2, "A", i, "Adag", i + 2;
ampo += -t_2, "Adag", i, "A", i + 2;
}
ampo += -U/2, "N", L;
ampo += U/2, "N", L,"N",L;
for (int i = 1;i <= L-1; i += 2)
{
ampo +=U_12, "N", i,'N',i+1;
}
I want to measure its density distribution at ground state with different fillings.
Here is my initial state:
auto state = InitState(sites,"0");
for (int i = 1; i <= L/2-1; i =i+2)
{
state.set(i,"1");
}
for (int i = L; i >= L/2; i =i-2)
{
state.set(i,"1");
}
auto psi0=MPS(state);
//auto psi0=randomMPS(state);
and measurement of density
for( auto i : range1(L))
{
psi.position(i);
auto ket = psi(i);
auto bra = dag(prime(ket,"Site"));
auto Numop = op(sites,"N",i);
auto Numi = elt(bra*Numop*ket);
fp1=fopen(file_name1.str().c_str(),"a");
fprintf(fp1,"%i,%f\n",i,Numi);
fclose(fp1);
}
But here comes a problem, in my results, local density on every odd number sites is zero and nonzero on even number sites (and all zero in correlation functions).
So, are there some mistakes in my codes or I completely misunderstand the way to construct two component bose-hubbard model with MPS and dmrg.
Thanks