qics.quantum.purify¶
- qics.quantum.purify(X)[source]¶
Returns a purification of a quantum state \(X\). If \(X\) has spectral decomposition
\[X = \sum_{i=1}^n \lambda_i | v_i \rangle\langle v_i |,\]then the purification is \(| \psi \rangle\langle \psi |\) where
\[| \psi \rangle = \sum_{i=1}^n \sqrt{\lambda_i} (| v_i \rangle \otimes | v_i \rangle).\]