I am modifying the code provided by the following link in order to calculate the spin-spin correlation function between site b and b+2.
However, my naive modification (attached below) with replacing b+1 by b+2 does not work.
Could you help me to solve this problem? Thanks!
ITensor bondket = psi.A(b)*psi.A(b+2);
ITensor bondbra = dag(prime(bondket,Site));
ITensor zzop = sites.op("Sz",b)*sites.op("Sz",b+2);
ITensor pmop = 0.5*sites.op("S+",b)*sites.op("S-",b+2);
ITensor mpop = 0.5*sites.op("S-",b)*sites.op("S+",b+2);