intermediate · Physics · Density Matrices & Mixed States
Purity and Tr(ρ²)
How "mixed" is a state? A single number answers this: the purity.
Definition
The purity of a density operator ρ is
γ=Tr(ρ2).
It ranges between two bounds set by the dimension d of the Hilbert space:
d1≤Tr(ρ2)≤1.
The two extremes have clean meanings:
Tr(ρ2)=1if and only ifρ is pure (ρ=∣ψ⟩⟨ψ∣).
Tr(ρ2)=1/dif and only ifρ is maximally mixed, ρ=I/d.
For a single qubit (d=2), purity runs from 1/2 (maximally mixed) up to 1 (pure).
Why purity detects mixedness
Use the spectral decomposition ρ=∑kλk∣k⟩⟨k∣. Then
ρ2=∑kλk2∣k⟩⟨k∣, so
Tr(ρ2)=k∑λk2.
The eigenvalues form a probability distribution (λk≥0, ∑kλk=1). A pure
state has one eigenvalue equal to 1 and the rest 0, giving ∑kλk2=1. Spreading the
distribution out lowers ∑kλk2 — it is minimized when all d eigenvalues equal 1/d,
giving d⋅(1/d)2=1/d. So purity is large when probability is concentrated (little classical
uncertainty) and small when it is spread (much classical uncertainty).
A direct test for purity
The relation Tr(ρ2)=1⟺ρ2=ρ gives a quick check: a density operator
is pure exactly when it is idempotent, ρ2=ρ (it is then a projector onto a single ket).
Any deviation of Tr(ρ2) below 1 signals genuine mixedness.
Try it
Compute the purity Tr(ρ2) of the mixed state
ρ=21∣0⟩⟨0∣+21∣+⟩⟨+∣=(3/41/41/41/4).
You should get a value strictly between 1/2 and 1, confirming the state is mixed but not maximally
so.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.