Page 1 of 1

Entanglement entropy for disconnected subsystems

Posted: 28 Oct 2019, 16:43
by daniel
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?

Thanks in advance!

Best,
Daniel

Re: Entanglement entropy for disconnected subsystems

Posted: 29 Oct 2019, 16:32
by Johannes
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?

Re: Entanglement entropy for disconnected subsystems

Posted: 30 Oct 2019, 13:29
by daniel
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.

Re: Entanglement entropy for disconnected subsystems

Posted: 30 Oct 2019, 17:22
by Johannes
Sorry, that was a bug in MPS.get_rho_segment. It should be fixed with the latest version.

Re: Entanglement entropy for disconnected subsystems

Posted: 01 Nov 2019, 12:48
by daniel
Now it works perfectly. Thanks a lot!