### Entanglement Entropy for len(segment)>20

Posted:

**28 Oct 2023, 23:50**Hi,

I am getting an error when I tried to calculate the entropy of a segment whose size is greater than 20 for the TFI model.

ValueError: too large segment; this is exponentially expensive!

How to over-ride this and calculate the entropy for segment size greater than 20?

I am getting an error when I tried to calculate the entropy of a segment whose size is greater than 20 for the TFI model.

Code: Select all

`S_Ags=psi.entanglement_entropy_segment(segment=subregion, first_site=[start_site], n=1)`

How to over-ride this and calculate the entropy for segment size greater than 20?