# Possible error in the Purification example on Github

**URL:** <https://itensor.discourse.group/t/possible-error-in-the-purification-example-on-github/833>\
**Category:** DMRG and Numerical Methods\
**Tags:** julia, entanglement, mpo\
**Created:** [May 3, 2023, 6:26am UTC](https://itensor.discourse.group/t/possible-error-in-the-purification-example-on-github/833 "2023-05-03T06:26:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsegev](https://avatars.discourse-cdn.com/v4/letter/t/5e9695/32.png) [@tsegev](https://itensor.discourse.group/u/tsegev)\
**Post date:** [May 3, 2023, 6:26am UTC](https://itensor.discourse.group/t/possible-error-in-the-purification-example-on-github/833/1 "2023-05-03T06:26:17Z")

</div>

Hey,  
sorry for going back to this topic, but the question seems relevant here.

In the example of the [Purification](https://github.com/ITensor/ITensors.jl/blob/main/examples/finite_temperature/purification.jl) the initial maximally mixed state is:

```auto
  rho = MPO(s, "Id") ./ √2

```

Can it be that there is a mistake ? because the Tr(\rho)=4. On the other hand is you remove the \sqrt2 and replace it with 2 you will get Tr(\rho)=1 . but the norm will change so I am kind of confused. Maybe someone knows what is the reason, and explanation for that ?

Another question I have on this topic is if I want to change the last site so it won’t be a maximally mixed, but something else.

I want the last site will be just |\psi \rangle=\frac{1}{\sqrt2}(|0 \rangle +|1 \rangle) and \rho[end]=|\psi \rangle \langle \psi|.  
I thought that we only need to take the maximally mixed state and chance the tensor elements for that site to be 0.5 in each element. Is that correct ?
