# Measure multi-site (more than 2) correlation

Hello Everyone,
In the tutorial page
http://itensor.org/docs.cgi?page=tutorials/correlations
I can know how to measure < | Sz2 * Sz4| >

I met a difficult in measurement of multi-site correlation such as
Sz2Sz4Sz6*Sz8 for the length of chain at N=10;

In the tutorial page
the last step is
C *= dag(prime(prime(psi.A(4),Site),il));

The most right dotted line will be become solid (contracted).
Then C becomes number

I tried to contract psi.A(5) and its prime and then add Sz6 *Sz8 etc.
But failed.
Could someone give any suggestions?
Wz

commented by (190 points)
For N=4
print ("==========S1S2S3S4=============","\n");
print (C,"\n");
It is ok.

I still don't know how to deal with Sz2*Sz4*Sz6 or Sz2*Sz4*Sz6*Sz8
commented by (190 points)
Inserting  unit operators in the operator chain   like Sz2*I3*Sz4*I5*Sz6   works now. Thanks.
commented by (70.1k points)
Yes, and even better than inserting unit operators is just to directly contract the site indices, so leaving out the "Site" IndexType from the priming of those tensors who are not acted on by an Sz operator. (If you draw the diagrams for this it becomes much more clear what I mean.) But putting in explicit identity operators is still efficient and has the advantage of making the code consistent and easy.

Miles