Lesson 13 · 60 min · core
Density Operators: Pure vs Mixed
State vectors describe systems we know completely; real laboratories and subsystems of entangled registers require density operators. Starting from a statistical ensemble we derive , rewrite the Born rule as and expectation values as , characterise density operators by three properties (Hermitian, positive semidefinite, unit trace), prove that purity lies in with exactly for pure states, and map every qubit state to a point of the Bloch ball.
Prerequisites: Postulate 4: Composite Systems
Objectives and key results
Build the density operator of an ensemble and derive and from the ensemble average.
Verify the three defining properties , , , and reconstruct an ensemble from any such operator via its spectral decomposition.
Compute the purity , prove , and use as the test for a pure state.
Convert a qubit density matrix to its Bloch vector and back, and read off eigenvalues and purity .
Explain why different ensembles can give the same , and why that makes them physically indistinguishable.
- definition · Density operator of an ensemble
- formula · Born rule and expectation values for mixed states
- theorem · Characterisation of density operators
- theorem · Purity bounds
- identity · Bloch-ball form of a qubit
From ensembles to density operators#
The postulates of Module 1.3 assume that we know the state vector exactly. In practice we often know only that the system was prepared in with probability , in with probability , and so on: a source that emits or depending on an unobserved coin flip, a qubit whose preparation pulse fluctuates, or — most importantly for quantum computing — one qubit of an entangled register, whose partner we ignore (the subject of the next lesson). Such a situation is described by an ensemble of normalised states with classical probabilities , . The states need not be orthogonal and the number of members need not equal the dimension .
The goal is a single mathematical object that predicts every measurement statistic of the ensemble. It will turn out to be an operator, not a vector: the density operator.
Definition
Density operator (density matrix)
The density operator of the ensemble is . In the computational basis its matrix has entries . The diagonal entries are called populations and the off-diagonal entries () coherences. A state with for a single vector is pure; every other density operator is mixed.
The trace identity
- Step 1:Definition of the trace as the sum of diagonal entries in an orthonormal basis .
- Step 2:Insert and split the sandwich into a product of two scalars.
- Step 3:Scalars commute, so reorder the two factors; then pull the sum inside (linearity).
- Step 4:Completeness relation . This is the cyclic property with a trace.
Result
Born rule, expectation values and state update from the ensemble average
- Step 1:Born rule (measurement postulate) for a projective measurement if the preparation was .
- Step 2:Law of total probability over the unobserved label .
- Step 3:Trace identity just derived, then linearity of the trace and of operator multiplication.
- Step 4:Recognise the density operator. The statistics depend on the ensemble only through .
- Step 5:For an observable with spectral decomposition the mean outcome is ; linearity of the trace collects the projectors into .
- Step 6:After outcome , member collapses to , and Bayes' rule gives the updated weights .
- Step 7:The factors cancel; pull out of the sum on both sides.
Result
The three defining properties and their converse#
Properties of a density operator
Every ensemble density operator is (i) Hermitian, ; (ii) positive semidefinite, for all (written ); (iii) of unit trace, .
Proof (3 steps)
- Step 1:(i) The adjoint is antilinear, is real, and , so each projector is self-adjoint.
- Step 2:(ii) , so each term is a non-negative weight times a squared modulus.
- Step 3:(iii) Linearity of the trace, the trace identity with , and normalisation of each and of the probabilities.
∎
Converse: every such operator comes from an ensemble
If an operator on a -dimensional space satisfies , and , then is the density operator of the ensemble of its eigenvalues and orthonormal eigenvectors. Hence the three properties characterise density operators.
Proof (4 steps)
- Step 1:Spectral theorem for Hermitian operators (Module 1.2): real eigenvalues and an orthonormal eigenbasis.
- Step 2:Evaluate the positivity condition at and use orthonormality.
- Step 3:The trace is basis-independent, so compute it in the eigenbasis.
- Step 4:Non-negative weights summing to one attached to normalised vectors: exactly the definition of an ensemble, and its density operator is the spectral decomposition of .
∎
Quick check
Which of these matrices is a valid density matrix?
Purity: how mixed is a state?#
Definition
Purity
The purity of is . Because , , the squared Frobenius norm of the matrix — this is how the engine's purity function computes it without diagonalising.
Purity bounds:
For every density operator on a -dimensional space, . Moreover if and only if is pure, and if and only if (the maximally mixed state).
Proof (7 steps)
- Step 1:Spectral decomposition and orthonormality .
- Step 2:Trace in the eigenbasis; the constraints on come from the converse theorem.
- Step 3:Expand the square; every cross term is non-negative. This is the upper bound.
- Step 4:Equality requires every cross term to vanish (a sum of non-negative terms is zero only if each term is), i.e. at most one non-zero eigenvalue; since there is exactly one.
- Step 5:The single non-zero eigenvalue must equal , so is a rank-one projector (pure); conversely a pure state is idempotent and has purity .
- Step 6:Cauchy–Schwarz inequality in for the vectors and . Dividing by gives the lower bound .
- Step 7:Cauchy–Schwarz is an equality iff the vectors are parallel; with all eigenvalues equal , and by completeness.
∎
For qubits , so . The quantity , the linear entropy, is a quick measure of how mixed a state is; the next lessons refine it into the von Neumann entropy and use it to quantify entanglement. On hardware, decoherence drives a qubit prepared in a pure state towards a mixed state and its purity decreases from towards .
Quick check
What is the purity of the maximally mixed two-qubit state ?
Qubits: the Bloch ball#
Every qubit state is with
- Step 1:Pauli algebra for : traceless, anticommuting, squaring to ; the trace identity follows by taking half the trace of the anticommutator.
- Step 2:is a basis of the matrices that is orthogonal for ; Hermitian has real coefficients because the basis elements are Hermitian.
- Step 3:Take traces using the Pauli identities: unit trace fixes , and the Bloch components are the expectation values .
- Step 4:Add , , with and entry by entry; note .
- Step 5:Symmetrise the double sum (the coefficient is symmetric) and use the anticommutator.
- Step 6:Its eigenvalues square to so they are ; being traceless, the two eigenvalues sum to , so both signs occur (for both are ).
- Step 7:shares eigenvectors with ; add and halve.
- Step 8:Positivity is non-negativity of the smaller eigenvalue: qubit states are exactly the points of the closed unit ball.
- Step 9:Purity as the sum of squared eigenvalues; the cross terms cancel.
Result
Geometry. Pure states () are exactly : the Bloch sphere of Module 2.1, with for . Mixed states fill the interior, and the centre is the maximally mixed state . A mixture has Bloch vector (the map is affine), so mixing moves the point along the chord between the two states — towards the centre.
Worked example. Take . It is Hermitian () with trace . Then , , . So , (a valid, mixed state), eigenvalues , and . Cross-check with the Frobenius formula: .
Quick check
Compute the purity of .
Quick check
A qubit has . What is its Bloch component ?
Different ensembles, same density operator#
- Step 1:Ensemble A: a fair coin chooses or . The outer products are the diagonal matrix units.
- Step 2:Outer products of (real entries, so the bra is the transpose).
- Step 3:Ensemble B: a fair coin chooses or . The coherences cancel.
- Step 4:Both ensembles have the same , and all statistics are : no experiment can tell which coin was flipped.
Result
Ensembles related by a unitary mixing give the same state
Write an ensemble as unnormalised vectors , so . If for a unitary matrix (pad the shorter list with zero vectors), then . (The converse — any two ensembles with the same are related this way — is Theorem 2.6 of Nielsen & Chuang.)
Proof (3 steps)
- Step 1:Substitute; the bra of carries complex-conjugated coefficients.
- Step 2:Exchange the finite sums and recognise .
- Step 3:Unitarity .
∎
The example above is this proposition with : . The lesson is conceptual: the density operator, not the ensemble, is the physical state. An ensemble is a story about how was prepared, and many stories — infinitely many for any mixed state — are observationally equivalent. The spectral ensemble of the converse theorem is the distinguished one with orthogonal members and the fewest terms.
Check it numerically. The cell below computes the Bloch vector, purity and eigenvalues of the worked example and verifies the two-ensemble identity.
import numpy as np
rho = np.array([[0.7, 0.2 - 0.1j], [0.2 + 0.1j, 0.3]])
X = np.array([[0, 1], [1, 0]])
Y = np.array([[0, -1j], [1j, 0]])
Z = np.array([[1, 0], [0, -1]])
r = [float(np.real(np.trace(rho @ P))) for P in (X, Y, Z)]
print(np.round(r, 4))
print(round(float(np.real(np.trace(rho @ rho))), 4))
print(np.round(np.linalg.eigvalsh(rho), 4))
ket0, ket1 = np.array([1, 0]), np.array([0, 1])
plus, minus = (ket0 + ket1) / np.sqrt(2), (ket0 - ket1) / np.sqrt(2)
A = 0.5 * (np.outer(ket0, ket0) + np.outer(ket1, ket1))
B = 0.5 * (np.outer(plus, plus) + np.outer(minus, minus))
print(np.allclose(A, B), np.round(B, 4).tolist())Expected output
[0.4 0.2 0.4] 0.68 [0.2 0.8] True [[0.5, 0.0], [0.0, 0.5]]
References
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §2.4 (the density operator), Theorems 2.5 and 2.6, Exercise 2.72 (Bloch sphere for mixed states).
- J. Preskill, Lecture Notes for Physics 219: Quantum Computation, Chapter 2 (foundations I: states and ensembles).theory.caltech.edu
- J. Watrous, The Theory of Quantum Information, Cambridge University Press (2018), §2.1 (registers, states and density operators).cs.uwaterloo.ca
Hands-on labs
Bloch vector and purity of a mixed qubit
1 step · auto-gradedOpen labRead the Bloch vector with and the purity directly off the entries of a density matrix, using the Bloch-ball form .