0 votes
asked by (190 points)

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
il = commonIndex(psi.A(4),psi.A(3),Link);
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?
Thank you in advance.
Wz

commented by (190 points)
For N=4
C=psi.A(1)*Sz_1*dag(prime(psi.A(1),Site,Link));
C*= psi.A(2)*Sz_2*dag(prime(psi.A(2),Site,Link));
C*=psi.A(3)*Sz_3*dag(prime(psi.A(3),Site, Link));
C*=psi.A(4)*Sz_4*dag(prime(psi.A(4),Site,Link));
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

1 Answer

0 votes
answered by (70.1k points)

Thanks very much for posting a solution, and glad you figured it out!

For those looking for the answer, please see the above comments by the original poster ^

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.

Categories

...