Hi all,

I am trying to find expectation value of spin operator S_z in Heisenberg spin chain. Up until now, I have been using C++ ITensor format to get expectation value from MPS as described in following documentation: http://itensor.org/docs.cgivers=cppv3&page=formulas/correlator_mps

http://itensor.org/docs.cgi?vers=cppv3&page=formulas/measure_mps

I am not sure how do I define operators ( Ex: S_z acting at site j) acting at arbitrary sites and then take the expectation value in ITensor Julia version.

There is well defined way of defining operators in C++ ITensor like **"auto Szjop = op(sites,"Sz",j)** and gauging psi to measure at position j:

**psi.position(j)
auto ket = psi(j);
auto bra = dag(prime(ket,"Site"))**

I am having trouble in defining similar procedure in ITensor Julia version. I would like to know if it is possible to do same in ITensor Julia.

Thank you.