Hi, I have a similar question.

My goal is to calculate the entanglement entropy for a bipartition of an eigenstate of the RDM of a bipartition of the system.

In other words, I have a system of size L and I want to find the RDM of the subsystem [0,La]. I would then like to find an eigenstate of that system (corresponding to the largest eigenvalue) and find the entanglement entropy of the sub-sub-system [0,Lb], (Lb < La).

If I understand correctly I should do something like this?:

```
psi.position(La); //gauge mps
auto wf1 = psi.A(La)*psi.A(La+1);
auto spectrum1 = svd(U,S,V); //U gives me the RDM of the [0,La]
auto ir = commonIndex(psi.A(La),psi.A(La+1))
auto selt1 = setElt(ir(1));
auto rdmEvec = U*selt1; //this gives me the eigenvector corresponding to largest eigenvalue
rdmEvec.position(Lb);
auto wf2 = rdmEvec.A(Lb)*rdmEvec.A(Lb+1);
auto spectrum = svd(wf2,U,S,V); //gives me spectrum I want
```

Thank you in advance for the help.