intermediate · Physics · Density Matrices & Mixed States
The Density Operator
The density operator ρ is the single object that represents any quantum state — pure or mixed — on
equal footing. It replaces the state vector as the most general description of a system.
From a pure state to its density operator
Given a pure state ∣ψ⟩, its density operator is the outer product
ρ=∣ψ⟩⟨ψ∣.
For a qubit ∣ψ⟩=α∣0⟩+β∣1⟩, this is a 2×2 matrix:
ρ=(αβ)(α∗β∗)=(∣α∣2α∗βαβ∗∣β∣2).
The diagonal entries ∣α∣2 and ∣β∣2 are the populations — the probabilities of
measuring 0 and 1. The off-diagonal entries are the coherences; they encode the phase
relationship that distinguishes a superposition from a mixture.
The density operator of a mixture
For an ensemble {(pi,∣ψi⟩)} the density operator is the probability-weighted average of
the individual pure-state operators:
ρ=i∑pi∣ψi⟩⟨ψi∣.
This is a convex combination of pure-state density operators. Every physically distinct preparation
maps to exactly one ρ, and any two ensembles with the same ρ are physically
indistinguishable — which is precisely the ambiguity we wanted the formalism to absorb.
A worked example
Take the equal superposition ∣+⟩=21(∣0⟩+∣1⟩), so
α=β=21. Then
ρ+=21(1111).
Contrast this with the 50/50 mixture of ∣0⟩ and ∣1⟩:
ρmix=21∣0⟩⟨0∣+21∣1⟩⟨1∣=21(1001).
Same diagonal (same measurement statistics in the z-basis), but the superposition has nonzero
off-diagonal coherences while the mixture has none. The matrix makes the distinction from the previous
lesson explicit.
Try it
Build the density matrix ρ=∣ψ⟩⟨ψ∣ for the parametrized real qubit state
∣ψ⟩=cos(θ/2)∣0⟩+sin(θ/2)∣1⟩ at θ=π/3, and return the
top-left population ρ00=cos2(θ/2). Compute it from the outer product — do not just
type the number.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.