I'm studying the Hubbard Model and I want to calculate the following expected value:
⟨c†i,σic†j,σjck,σkcl,σl⟩,
which represents the two-particle density matrix by setting (i,σi j,σj)→row; and (k,σk l,σl)→column. I'm doing in the most optimized way, following -Correlator- and transforming the spinfull fermion operators into bosonic ones -Jordan Wigner-. I rewrite the Jordan Wigner to compress the different spin cases:
ci,σi=F1⋯Fi−1(Fσiiai,σi),
with σi=0 corresponds ↑ and σi=1 corresponds ↓. When i≠j≠k≠l the algorithm works flawlessly, but when two or more indexes are equal It doesn't.
Here's an example when (i==k) < j < l. I have to sort all operators in an increasing way. Using anti-commutator of fermions:
⟨c†i,σic†j,σjck,σkcl,σl⟩=−⟨c†i,σick,σkc†j,σjcl,σl⟩.
Substituting the transformation of Jordan Wigner we have:
=−(a†i,σiFσii)(Fi−1⋯F1)(F1⋯Fk−1)⏟=1(Fσkkak,σk)(a†j,σjFσjj)(Fj−1⋯F1)(F1⋯Fl−1)⏟(Fj⋯Fl−1)(Fσllal,σl)
=−(a†i,σiFσi+σkiak,σk)(aj,σjFσj+1j)(Fj+1⋯Fl−1)(Fσllal,σl).
But I'm not getting the correct results. Here's a sample code:
IQIndex il = commonIndex(psi.A(i),psi.A(i+1),Link);
IQTensor C = psi.A(i);
C *= (sigmai) ? sites.op("Adagdn",i) : sites.op("Adagup",i);
if ((sigmai+sigmak+1) % 2) {
C.noprime(Site);
C *= sites.op("F",i);
}
C.noprime(Site);
C *= (sigmak) ? sites.op("Adn",i) : sites.op("Aup",i);
C *= dag(prime(prime(psi.A(i),Site),il));
for(int m = i+1; m < j; ++m) {
C *= psi.A(m);
C *= dag(prime(psi.A(m),Link));
}
C *= psi.A(j);
C *= (sigmaj) ? sites.op("Adagdn",j) : sites.op("Adagup",j);
if (!sigmaj) {
C.noprime(Site);
C *= sites.op("F",j);
}
C *= dag(prime(prime(psi.A(j),Site),Link));
for(int m = j+1; m < l; ++m) {
C *= psi.A(m);
C *= sites.op("F",m);
C *= dag(prime(prime(psi.A(m),Site),Link));
}
IQIndex kl = commonIndex(psi.A(l),psi.A(l-1),Link);
C *= psi.A(l);
if (sigmal) {
C *= sites.op("F",l);
C.noprime(Site);
}
C *= (sigmal) ? sites.op("Adn",l) : sites.op("Aup",l);
C *= dag(prime(prime(psi.A(l),Site),kl));
double result = -C.real();
I still do not know where I'm going wrong. Whether it is in the Jordan Wigner transformation for spinfull fermions, or if in some part of the code. Maybe you can help me with some reference to this calculation. I thank you all!