Hi everyone,
I am trying to compute the expectation value of a correlation function made up by a string of operators, something like :
C_z=\langle\sigma^1_z\otimes\sigma^2_z\otimes\sigma^3_z\otimes\sigma^4_z\otimes\sigma^5_z\otimes\sigma^6_z\rangle
If you are including code in your question or comment, please put it in a code block as follows:
int m=1;
int n=6;
for(int l = m; l <= n; ++l)
{
auto Sz = op(sites,"Sz",l);
auto C = psi0(l)*Sz;
auto ir = commonIndex(psi0(l),psi0(l+1),"Link");
auto D = dag(prime(prime(psi0(l),"Site"),ir));
if(l==n)
{
auto E=C*D;
E *= dag(prime(prime(psi0(l),"Site"),"Link"));
println("E = ",E);
elt(E);
}
}
I am trying to generalize the following tutorial (ITensor), but I am making some mistake, because E is not a scalar. Any idea on how to fix this ?
Thank you for your time,
Francesco