# To compute DEE for an MPS

**URL:** <https://itensor.discourse.group/t/to-compute-dee-for-an-mps/2555>\
**Category:** ITensor Julia Questions\
**Created:** [December 22, 2025, 12:12pm UTC](https://itensor.discourse.group/t/to-compute-dee-for-an-mps/2555 "2025-12-22T12:12:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuklavaibhav](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@shuklavaibhav](https://itensor.discourse.group/u/shuklavaibhav)\
**Post date:** [December 22, 2025, 12:12pm UTC](https://itensor.discourse.group/t/to-compute-dee-for-an-mps/2555/1 "2025-12-22T12:12:27Z")

</div>

I wanted to calculate the disconnected entanglement entropy for S=\frac{1}{2}, N spin chain.

S\_D^{n} = S\_A^n + S\_B^n - S\_{A\cup B}^n - S\_{A\cap B}^n

where

S\_D^{n} 

is Entanglement Entropy (n=1; is von Neumann entropy) for a disconnected region D  
A,B denote two regions, suppose I have N = 8 sites, then A = {1,2,3,4} and B = {3,4,7,8}.  
To calculate entanglement entropy for A is trivial using ITensorEntropyTools.jl, can anyone suggest me a way to find the entropy for the discontinuous region B

---

<div class="post-metadata">

**Author:** ![ryanlevy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/ryanlevy/32/150_2.png) [@ryanlevy](https://itensor.discourse.group/u/ryanlevy)\
**Post date:** [December 27, 2025, 2:22pm UTC](https://itensor.discourse.group/t/to-compute-dee-for-an-mps/2555/2 "2025-12-27T14:22:41Z")

</div>

You can just pass the sites with that package as well

```auto
ee_region(p, [3,4,7,8])

```

That will scale exponentially with the size of B though, so potentially using something like `movesites` ([`movesite`](https://docs.itensor.org/ITensorMPS/stable/MPSandMPO.html#ITensorMPS.movesite-Tuple%7BAbstractMPS,%20Pair%7BInt64,%20Int64%7D%7D)) could pay off in some cases at the cost of a higher bond dimension (also exponential in cost).
