# Purity (quantum mechanics)

In quantum mechanics, and especially quantum information theory, the purity of a normalized quantum state is a scalar defined as $\gamma \,\equiv \,\operatorname {tr} (\rho ^{2})$ where $\rho \,$ is the density matrix of the state and $\operatorname {tr}$ is the trace operation. The purity defines a measure on quantum states, giving information on how much a state is mixed.

## Mathematical properties

The purity of a normalized quantum state satisfies ${\frac {1}{d}}\leq \gamma \leq 1\,$, where $d$ is the dimension of the Hilbert space upon which the state is defined. The upper bound is obtained by $\operatorname {tr} (\rho )=1\,$and $\operatorname {tr} (\rho ^{2})\leq \operatorname {tr} (\rho )\,$(see trace).
If $\rho \,$ is a projection, which defines a pure state, then the upper bound is saturated: $\operatorname {tr} (\rho ^{2})=\operatorname {tr} (\rho )=1\,$ (see Projections). The lower bound is obtained by the completely mixed state, represented by the matrix ${\frac {1}{d}}I_{d}\,$.
The purity of a quantum state is conserved under unitary transformations acting on the density matrix in the form $\rho \mapsto U\rho U^{\dagger }\,$, where U is a unitary matrix. Specifically, it is conserved under the time evolution operator $U(t,t_{0})=e^{{\frac {-i}{\hbar }}H(t-t_{0})}\,$, where H is the Hamiltonian operator.

## Physical meaning

A pure quantum state can be represented as a single vector $|\psi \rangle$ in the Hilbert space. In the density matrix formulation, a pure state is represented by the matrix $\rho _{\text{pure}}=|\psi \rangle \langle \psi |.$ However, a mixed state cannot be represented this way, and instead is represented by a convex combination of pure states $\rho _{\text{mixed}}=\sum _{i}p_{i}|\psi _{i}\rangle \langle \psi _{i}|,$ while ∑$_i$p$_i$=1{\textstyle \sum _{i}p_{i}=1} for normalization. The purity parameter is related to the coefficients: If only one coefficient is equal to 1, the state is pure. Indeed, the purity is 1/d when the state is completely mixed, i.e. $\rho _{\text{completely mixed}}={\frac {1}{d}}\sum _{i=1}^{d}|\psi _{i}\rangle \langle \psi _{i}|={\frac {1}{d}}I_{d},$ where $|\psi _{i}\rangle$ are d orthonormal vectors that constitute a basis of the Hilbert space.

### Geometrical representation

On the Bloch sphere, pure states are represented by a point on the surface of the sphere, whereas mixed states are represented by an interior point. Thus, the purity of a state can be visualized as the degree to which the point is close to the surface of the sphere.
For example, the completely mixed state of a single qubit 1/2 I$_2${\textstyle {\frac {1}{2}}I_{2}\, }is represented by the center of the sphere, by symmetry.
A graphical intuition of purity may be gained by looking at the relation between the density matrix and the Bloch sphere, $\rho ={\tfrac {1}{2}}\left(I+\mathbf {a} \cdot {\boldsymbol {\sigma }}\right),$ where $\mathbf {a}$ is the vector representing the quantum state (on or inside the sphere), and ${\boldsymbol {\sigma }}=(\sigma _{x},\sigma _{y},\sigma _{z})$ is the vector of the Pauli matrices.
Since Pauli matrices are traceless, it still holds that tr(ρ) = 1. However, by virtue of $\left(\mathbf {a} \cdot {\boldsymbol {\sigma }}\right)\left(\mathbf {b} \cdot {\boldsymbol {\sigma }}\right)=\left(\mathbf {a} \cdot \mathbf {b} \right)\,I+i\left(\mathbf {a} \times \mathbf {b} \right)\cdot {\boldsymbol {\sigma }},$ $\rho ^{2}={\tfrac {1}{2}}\left[{\tfrac {1}{2}}\left(1+|a|^{2}\right)I+\mathbf {a} \cdot {\boldsymbol {\sigma }}\right],$ hence tr⁡(ρ$^2$)=1/2 (1+|a|$^2$), {\textstyle \operatorname {tr} (\rho ^{2})={\frac {1}{2}}(1+|a|^{2}), } which agrees with the fact that only states on the surface of the sphere itself are pure (i.e. $|a|=1$).

## Relation to other concepts
### Linear entropy

Purity is trivially related to the linear entropy $S_{L}\,$ of a state by
$\gamma =1-S_{L}\,.$
The linear entropy is a lower approximation to the von Neumann entropy S, which is defined as
$S\,{\dot {=}}\,-\operatorname {tr} (\rho \ln \rho )=-\langle \ln \rho \rangle \,.$
The linear entropy then is obtained by expanding ln ρ = ln (1−(1−ρ)), around a pure state, ρ$^2$ = ρ; that is, expanding in terms of the non-negative matrix 1−ρ in the formal Mercator series for the logarithm, $-\langle \ln \rho \rangle =\langle 1-\rho \rangle +{\frac {1}{2}}\langle (1-\rho )^{2}\rangle +{\frac {1}{3}}\langle (1-\rho )^{3}\rangle +\cdots ,$ and retaining just the leading term. Both the linear and the von Neumann entropy measure the degree of mixing of a state, although the linear entropy is easier to calculate, as it does not require diagonalization of the density matrix. Some authors define linear entropy with a different normalization $S_{L}\,{\dot {=}}\,{\tfrac {d}{d-1}}(1-\operatorname {tr} (\rho ^{2}))\,,$ which ensures that the quantity ranges from zero to unity.

### Entanglement

A 2-qubits pure state $|\psi \rangle _{AB}\in H_{A}\otimes H_{B}$ can be written (using Schmidt decomposition) as |ψ⟩$_{AB}$=∑$_j$λ$_j$|j⟩$_A$|j⟩$_B${\textstyle |\psi \rangle _{AB}=\sum _{j}\lambda _{j}|j\rangle _{A}|j\rangle _{B}}, where $\{|j\rangle _{A}\},\{|j\rangle _{B}\}$ are the bases of $H_{A},H_{B}$ respectively, and ∑$_j$λ$_j$$^2$=1, λ$_j$≥0{\textstyle \sum _{j}\lambda _{j}^{2}=1, \lambda _{j}\geq 0}. Its density matrix is ρ$^{AB}$=∑$_{i, j}$λ$_i$λ$_j$|i⟩$_A$⟨j|$_A$⊗|i⟩$_B$⟨j|$_B${\textstyle \rho ^{AB}=\sum _{i, j}\lambda _{i}\lambda _{j}|i\rangle _{A}\langle j|_{A}\otimes |i\rangle _{B}\langle j|_{B}}. The degree in which it is entangled is related to the purity of the states of its subsystems, ρ$^A$=tr$_B$⁡(ρ$_{AB}$)=∑$_j$λ$_j$$^2$|j⟩$_A$⟨j|$_A${\textstyle \rho ^{A}=\operatorname {tr} _{B}(\rho _{AB})=\sum _{j}\lambda _{j}^{2}|j\rangle _{A}\langle j|_{A}}, and similarly for $\rho ^{B}$ (see partial trace). If this initial state is separable (i.e. there's only a single $\lambda _{j}\neq 0$), then $\rho ^{A},\rho ^{B}$ are both pure. Otherwise, this state is entangled and $\rho ^{A},\rho ^{B}$ are both mixed. For example, if |ψ⟩$_{AB}$=|Φ$^+$⟩=1/√2 (|0⟩$_A$⊗|0⟩$_B$+|1⟩$_A$⊗|1⟩$_B$){\textstyle |\psi \rangle _{AB}=|\Phi ^{+}\rangle ={\frac {1}{\sqrt {2}}}(|0\rangle _{A}\otimes |0\rangle _{B}+|1\rangle _{A}\otimes |1\rangle _{B})} which is a maximally entangled state, then $\rho ^{A},\rho ^{B}$ are both completely mixed.
For 2-qubits (pure or mixed) states, the Schmidt number (number of Schmidt coefficients) is at most 2. Using this and Peres–Horodecki criterion (for 2-qubits), a state is entangled if its partial transpose has at least one negative eigenvalue. Using the Schmidt coefficients from above, the negative eigenvalue is $-\lambda _{0}\lambda _{1}$. The negativity ${\mathcal {N}}=-\lambda _{0}\lambda _{1}$ of this eigenvalue is also used as a measure of entanglement – the state is more entangled as this eigenvalue is more negative (up to −1/2 {\textstyle -{\frac {1}{2}}} for Bell states). For the state of subsystem $A$ (similarly for $B$), it holds that: $\rho ^{A}=\operatorname {tr} _{B}(|\psi \rangle _{AB}\langle \psi |_{AB})=\lambda _{0}^{2}|0\rangle _{A}\langle 0|_{A}+\lambda _{1}^{2}|1\rangle _{A}\langle 1|_{A}$
And the purity is $\gamma =\lambda _{0}^{4}+\lambda _{1}^{4}=(\lambda _{0}^{2}+\lambda _{1}^{2})^{2}-2(\lambda _{0}\lambda _{1})^{2}=1-2{\mathcal {N}}^{2}$.
One can see that the more entangled the composite state is (i.e. more negative), the less pure the subsystem state.

### Inverse Participation Ratio (IPR)

In the context of localization, a quantity closely related to the purity, the so-called inverse participation ratio (IPR) turns out to be useful. It is defined as the integral (or sum for finite system size) over the square of the density in some space, e.g., real space, momentum space, or even phase space, where the densities would be the square of the real space wave function $|\psi (x)|^{2}$, the square of the momentum space wave function $|{\tilde {\psi }}(k)|^{2}$, or some phase space density like the Husimi distribution, respectively.
The smallest value of the IPR corresponds to a fully delocalized state, $\psi (x)=1/{\sqrt {N}}$ for a system of size $N$, where the IPR yields ∑$_x$|ψ(x)|$^4$=N/(N$^{1/2}$)$^4$=1/N{\textstyle \sum _{x}|\psi (x)|^{4}=N/(N^{1/2})^{4}=1/N}. Values of the IPR close to 1 correspond to localized states (pure states in the analogy), as can be seen with the perfectly localized state $\psi (x)=\delta _{x,x_{0}}$, where the IPR yields ∑$_x$|ψ(x)|$^4$=1{\textstyle \sum _{x}|\psi (x)|^{4}=1}. In one dimension IPR is directly proportional to the inverse of the localization length, i.e., the size of the region over which a state is localized. Localized and delocalized (extended) states in the framework of condensed matter physics then correspond to insulating and metallic states, respectively, if one imagines an electron on a lattice not being able to move in the crystal (localized wave function, IPR is close to one) or being able to move (extended state, IPR is close to zero).
In the context of localization, it is often not necessary to know the wave function itself; it often suffices to know the localization properties. This is why the IPR is useful in this context. The IPR basically takes the full information about a quantum system (the wave function; for a $N$-dimensional Hilbert space one would have to store $N$ values, the components of the wave function) and compresses it into one single number that then only contains some information about the localization properties of the state. Even though these two examples of a perfectly localized and a perfectly delocalized state were only shown for the real space wave function and correspondingly for the real space IPR, one could obviously extend the idea to momentum space and even phase space; the IPR then gives some information about the localization in the space at consideration, e.g. a plane wave would be strongly delocalized in real space, but its Fourier transform then is strongly localized, so here the real space IPR would be close to zero and the momentum space IPR would be close to one.