I am trying to create an MPO with 3 or more spin interactions of type S*x S*y S*z with x, y and z at different sites and then find correlation of type S*x S*y S*z.

As a benchmark, first I am trying to study Heisenberg model and correlation function.

1.I am getting a different value of correlation function if I use S*x S*x +S*z S*z instead of usual S+S- +S-S+ for MPO. Why am I getting different results for correlation? Is there anything which I can do such that using S*x, S*y in MPO will provide me same results as S+S-?

1. Also when I am trying to calculate correlation of terms like S*x S*x or S*y S*y, should I convert them also to S+S- form?

Using S*x S*y terms instead of S+ S- term in MPO will simplify my code if I have 3 or more spin interaction .

Please suggest something which can help me understand and simplify things.

Thank you,

Here is snapshot of my code:

(int j = 1; j <= N-4; j += 1)

{

ampo += -J3,"Sx",j,"Sy",j+1,"Sz",j+2;

ampo += -J3,"Sy",j,"Sz",j+1,"Sx",j+2;

ampo += -J3,"Sz",j,"Sx",j+1,"Sy",j+2;

```
ampo += J3,"Sx",j,"Sz",j+1,"Sx",j+2;
ampo += J3,"Sy",j,"Sx",j+1,"Sz",j+2;
ampo += J3,"Sz",j,"Sy",j+1,"Sx",j+2;
ampo += -J3,"Sx",j+1,"Sy",j+2,"Sz",j+3;
ampo += -J3,"Sy",j+1,"Sz",j+2,"Sx",j+3;
ampo += -J3,"Sz",j+1,"Sx",j+2,"Sy",j+3;
ampo += J3,"Sx",j+1,"Sz",j+2,"Sx",j+3;
ampo += J3,"Sy",j+1,"Sx",j+2,"Sz",j+3;
ampo += J3,"Sz",j+1,"Sy",j+2,"Sx",j+3;
```