0 votes
asked by (550 points)

I calculate two-site reduced density matrix from a MPS , just like

//index linking i to i+1:
auto ir = commonIndex(psi.A(i),psi.A(i+1));

auto rho = psi.A(i)*dag(prime(psi.A(i),Site,ir));
for(int k = i+1; k < j; ++k)
rho *= psi.A(k);
rho *= dag(prime(psi.A(k),Link));
rho *= psi.A(j);
rho *= dag(prime(psi.A(j)));
for(int k = j+1; k <= psi.N(); ++k)
rho *= psi.A(k);
rho *= dag(prime(psi.A(k),Link));
How can I obtain eigenvalue of \rho

1 Answer

+1 vote
answered by (70.1k points)

Hi JR,
The diagHermitian function should be what you need. You can read more about it on this page:

commented by (550 points)
thanks a lot!
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.