DensityMatrix.purity

DensityMatrix.purity()[source]

Return the purity of the quantum state.