## Entanglement entropy for disconnected subsystems

How do I use this algorithm? What does that parameter do?
daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

### Entanglement entropy for disconnected subsystems

Hi,

I would like to calculate the entanglement entropy for a ladder geometry (finite or infinite) by cutting longitudinally, this is, through the rungs of the ladder, such that the subsystems A and B correspond to different chains. However, I implement this geometry using a 1D MPS with an enlarged unit cell (different elements in the unit cell correspond to different chains in the y direction). With this ordering, the subsystems A and B correspond to the even and odd sites of the MPS chain, respectively. Therefore, they are disconnected. I wonder if it is still possible to calculate the entanglement entropy corresponding to such decomposition.

I tried entanglement_entropy_segment but I get an error, so I guess this function does not accept disconnected segments. Is there any other way?

Best,
Daniel

Johannes
Posts: 135
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: Entanglement entropy for disconnected subsystems

The function entanglement_entropy_segment should accept disconnected segments, e.g. segment=[0, 2, 4, 6, 8].
However, it works only for *small* enough number of sites in your density matrix - it's exponentially expensive, because it constructs the full density matrix, tracing out the rest of the sites. If your segment
How many sites did you try?
What error messge did you get?

daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

### Re: Entanglement entropy for disconnected subsystems

If a try

Code: Select all

segment = [0, 2]

I get the following error

Code: Select all

KeyError: "Label not found: 'p1', current labels: ['p0', 'p0*', 'p', 'p*']"
However, for

Code: Select all

segment = [0, 1]

there is no problem. I am using the following lattice

Code: Select all

lat = Lattice([L], [spin_site] * 4, bc=bc, bc_MPS=bc_MPS)
This means I have a 1D chain with a unit cell of four elements, with L = 10 for instance. Then I want to take as a subsystem the first two elements of each unit cell for a number of sites, for example

Code: Select all

segment = [6, 7, 10, 11, 14, 15]
I have also tried with the Ising model on a chain and I get the same error.

Johannes
Posts: 135
Joined: 21 Jul 2018, 12:52
Location: UC Berkeley

### Re: Entanglement entropy for disconnected subsystems

Sorry, that was a bug in MPS.get_rho_segment. It should be fixed with the latest version.

daniel
Posts: 6
Joined: 21 Nov 2018, 16:14

### Re: Entanglement entropy for disconnected subsystems

Now it works perfectly. Thanks a lot!