Hi,

If I have a purification MPS representing a finite temperature thermal mixed state \(\rho\), is there an efficient way I can compute the purity \(Tr[\rho^2]\) of the thermal state? I am not sure if there is even a way to compute moments of the actual thermal state from the pure MPS in the purified space. I really just need any quantity that is a monotone in purity of the represented thermal state, not necessarily the purity.

Any help is appreciated, thank you!

## Calculating Purity of PurificationMPS

### Re: Calculating Purity of PurificationMPS

The best idea I can come up with on the spot would be to contract Tr(rho^2) as a tensor network from left to right.

There's no function for that in TeNPy ritght now, but it shouldn't be hard to implement that.

Doing this is O(chi^5), though, so it's quite expensive compared to the usual O(chi^3) scaling we have in MPS.

There's no function for that in TeNPy ritght now, but it shouldn't be hard to implement that.

Doing this is O(chi^5), though, so it's quite expensive compared to the usual O(chi^3) scaling we have in MPS.