# Matrix element of hubbard Hamiltonian using hubbard siteset

+1 vote

I did some simple test about hubbard siteset and use "overlap" function to calculate matrix element of fermion hopping term and I just found some problems.

#include "itensor/all.h"

using namespace itensor;

int main()
{
int N=100;
auto tf=1.0;
auto Uf=1.0;

auto sites=Hubbard(N);
auto ampo=AutoMPO(sites);
for(int i=1; i<N; i++)
{
ampo += -tf, "Cdagup", i, "Cup", i+1;
ampo += -tf, "Cdagup", i+1, "Cup", i;
ampo += -tf, "Cdagdn", i, "Cdn", i+1;
ampo += -tf, "Cdagdn", i+1, "Cdn", i;
}
for(int i=1; i<=N; i++)
{
ampo += Uf, "Nup", i, "Ndn", i;
}
auto H=IQMPO(ampo);

/************** TEST *************/
auto s1=InitState(sites);
auto s2=InitState(sites);

s1.set(1,"UpDn");
s2.set(1,"Up");
s2.set(2,"Dn");

auto p1=IQMPS(s1);
auto p2=IQMPS(s2);

Print(overlap(p2,H,p1));


}
as shown in the source code, I expect overlap(p2,H,p1)=+1 due to the symmetry of fermion "UpDn" state as described in http://itensor.org/docs.cgi?page=tutorials/fermions . But the output is -1. This is puzzling. I also checked the source code of "hubbard.h" in Itensor and I found

if(opname == "Cdn")
{
Op.set(Dn,EmP,1);
Op.set(UD,UpP,-1);
}
else
if(opname == "Cdagdn")
{
Op.set(Em,DnP,1);
Op.set(Up,UDP,-1);
}


and the minus sign in "Cdn" and "Cdagdn" is correct as I expected.

So, What's wrong with it or did I misunderstand the sign convention ?
Thanks.