+1 vote
asked by (190 points)

Hi I want to calculate entanglement entropy on more than 2 qubits. How could this be done using ITensor?

1 Answer

0 votes
answered by (70.1k points)

Hi, so depending on which qubits you want the entanglement for from a general N-qubit wavefunction, it can range from being straightforward to very difficult and computationally expensive.

But a common type of entanglement which is very efficiently computable is the entanglement entropy of a left-right bipartition of a state represented by an MPS. So this means the entanglement between a region "A" which is sites 1,2,3,...,L and region B which is sites L+1,L+2,...,N for an MPS with N sites.

To obtain this entanglement entropy, please see the following sample code provided on the ITensor website (in the "code formulas" section):

As you may know, even if your system isn't strictly 1D, you can still often get away with representing its wavefunction by an MPS and by choosing the ordering of the MPS sites appropriately (or changing the ordering using swap gates) you can get the entanglement entropy of all sorts of bipartitions. I used this approach in the following paper:
(see Fig. 4)

Best regards,

commented by (190 points)
Hi Miles,

Thanks for your enthusiasm reply! The system that I want to look into is 1d. And what I want is the reduced density matrices in the middle, for example, rho_{i,i+1}. Is this doable?
commented by (70.1k points)
Hi, yes so you can certainly compute a reduced density matrix for some contiguous block in the middle. You just have to trace the other sites except sites i and i+1 (and possibly use the gauge conditions to skip tracing over any left- or right-orthogonal tensors). The resulting density matrix will have four indices so will be efficient to compute. The only caution is that if you want to do a bigger block of say "B" sites, then the cost of computing the reduced density matrix will scale exponentially with B.
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.