# Computing entanglement in an block of arbitrary size

Is it possible to compute the entanglement entropy for a block of arbitrary size in a spin system? I've seen previous posts about this but could not find a concrete example in terms of code, except for a partition of N=2.

http://itensor.org/docs.cgi?page=formulas/entanglement_mps

but I can get at most results corresponding to a partition with N/2 -1 sites by changing the parameter b. Can I somehow fix the two ends of a partition and trace out the rest? Or even trace out a partition at the edge with some arbitrary size.

Best wishes,

Rafael

+1 vote

Hi Rafael,
The short answer is: no, not without incurring an exponential cost, if by "block" you mean a block in the middle of a wavefunction represented by an MPS, versus a block starting from site 1 and continuing through some site j.

The longer answer is that it's quite likely there is an efficient, approximate method that works well in practice for obtaining the entropy of a large block in the middle of an MPS. A simple example of such a method would be to swap the sites j,...,k with the sites 1,...,j through a set of local swap operations until all of these sites are exchanged with each other. Then one could compute the entanglement of the resulting MPS via a cut at bond j,j+1 and it would approximately equal the block entanglement of the original state. But the key question in this procedure is whether all of those sites can be efficiently swapped without leading to a new bond dimension that's too huge.

There might be smarter ways to do something similar, using a tree tensor network maybe, or some other methods that are yet to be explored (randomized SVD, etc.). It's sort of an open, under explored topic.

Why do you need the entanglement of a large block not starting from one edge of the system?

Best,
Miles

+1 vote

Hi Rafael,

the following method works for me: I set up the RDM of the subsystem as it is described in https://arxiv.org/abs/1605.00674 ( see Fig. 6 ). Once I have obtained the RDM, i use diagHermitian to obtain the spectrum and from that the entanglement entropy.

All the best,
Matthias

commented by (360 points)
Hi guys,

Thanks for the replies, I will look into the ideas you have there.

It would actually be enough to start at one end of the chain and going up to some site j. I think I managed to make it work with the available example code, the issue was that the smaller eigenvalues of the reduced density matrix get discarded when doing the single-value decomposition. I tried to reduce the cutoff but it didn't seem to work Is there a way to ensure we get the whole set?

Best,

Rafael