Sign in or create a free account to continue.

PHYS-472 · Lesson 7 of 12 · 22 min

Density matrices: pure and mixed states, reduced density matrices and the Bloch ball

▶ Video coming soon A video version of this lesson is on the way.

So far every quantum state in these courses has been a state vector. That description assumes we know the state completely. In practice we often do not. A beam of silver atoms from an oven has spins pointing in random directions; a qubit in a real processor has been disturbed by an environment we do not track; and a particle that is entangled with another has no state vector of its own at all. John von Neumann and Lev Landau introduced the density operator in 1927 to handle all of these cases with one object. This lesson defines it, shows how it combines quantum superposition with classical probability, and introduces the reduced density matrix, the entropy of entanglement and the geometric picture of a qubit as a point in the Bloch ball.

Ensembles and the density operator

Suppose a source emits the pure state \(|\psi_k\rangle\) with probability \(p_k\), with \(p_k \ge 0\) and \(\sum p_k = 1\). The states need not be orthogonal. The expectation value of an observable \(A\) averaged over this ensemble is

\[\langle A\rangle = \sum_kp_k\langle\psi_k|A|\psi_k\rangle = \operatorname{tr}(\rho A), \qquad \rho = \sum_kp_k|\psi_k\rangle\langle\psi_k| .\]

The second equality uses \(\langle\psi|A|\psi\rangle = \operatorname{tr}(A|\psi\rangle\langle\psi|)\), which follows from inserting a complete set of states. Every prediction, every probability \(\operatorname{tr}(\rho P_a)\) and every expectation value depends on the ensemble only through \(\rho\), the density operator. In a basis it is the density matrix \(\rho_{mn} = \langle m|\rho|n\rangle\). Its diagonal elements are the probabilities of finding the basis states, called populations; the off-diagonal elements, called coherences, carry the phase relations between them.

A density operator has three defining properties, and any operator with them is a valid state:

A state is pure if \(\rho = |\psi\rangle\langle\psi|\) for some vector, and mixed otherwise. The purity \(\operatorname{tr}\rho^2\) distinguishes them: it equals 1 for pure states and is less than 1 for mixed ones, with minimum \(1/d\) for the maximally mixed state \(\rho = 1/d\) in \(d\) dimensions. A closed system evolves by \(\rho(t) = U\rho(0)U^\dagger\), which gives the von Neumann equation

\[i\hbar\,\frac{d\rho}{dt} = [H, \rho] ,\]

the quantum counterpart of Liouville's equation for a classical probability density. Unitary evolution preserves purity, so a pure state stays pure and a mixed one stays mixed; lesson 8 shows how contact with an environment changes this.

Superposition is not mixture

The state \(|{+}\rangle = (|0\rangle + |1\rangle)/\sqrt2\) and the 50/50 mixture of \(|0\rangle\) and \(|1\rangle\) give the same probabilities for a measurement of \(\sigma_z\): one half each. They are nonetheless different states. In the \(z\) basis their density matrices are

\[\rho_{+} = \frac12\begin{pmatrix}1 & 1\\ 1 & 1\end{pmatrix}, \qquad \rho_{\text{mix}} = \frac12\begin{pmatrix}1 & 0\\ 0 & 1\end{pmatrix} .\]

The superposition has coherences, and a measurement of \(\sigma_x\) gives \(+1\) with certainty. The mixture has none, and \(\sigma_x\) is as random as \(\sigma_z\). On the other hand, two mixtures prepared differently can be identical. A 50/50 mixture of \(|{+}\rangle\) and \(|{-}\rangle\) has exactly the same density matrix as a 50/50 mixture of \(|0\rangle\) and \(|1\rangle\), namely \(1/2\). No measurement can tell them apart, so in quantum mechanics they are the same state. The density matrix contains everything that can be known, and the particular ensemble used to prepare it is not physical information.

The Bloch ball

For a qubit, every Hermitian \(2 \times 2\) matrix of unit trace can be written with the Pauli matrices as

\[\rho = \frac12\big(1 + \mathbf r\cdot\boldsymbol\sigma\big), \qquad \mathbf r = \operatorname{tr}(\rho\boldsymbol\sigma) = (\langle\sigma_x\rangle, \langle\sigma_y\rangle, \langle\sigma_z\rangle) .\]

The eigenvalues of \(\rho\) are \((1 \pm |\mathbf r|)/2\), so positivity requires \(|\mathbf r| \le 1\). Every qubit state is a point in the unit ball, the Bloch ball. Pure states, with \(\operatorname{tr}\rho^2 = (1 + |\mathbf r|^2)/2 = 1\), lie on the surface, the Bloch sphere of PHYS-373. Mixed states lie inside, and the maximally mixed state is at the center. Mixing two states puts the result on the straight line between them, which is why a mixture of \(|0\rangle\) and \(|1\rangle\), at the poles, lands on the axis. Unitary evolution rotates the ball rigidly; a field along \(z\) makes every Bloch vector precess about \(z\). Decoherence, in lesson 8, shrinks the ball toward the center or toward one pole.

A drawing of the Bloch ball. Pure states such as zero, one, plus and minus lie on the surface. A mixed state lies inside, with a shorter Bloch vector. The maximally mixed state is at the center. A dashed line joins zero and one through the center, showing that their equal mixture lies at the center.
The Bloch ball. Pure states lie on the surface, mixed states inside, with purity \((1 + |\mathbf r|^2)/2\); mixtures lie on straight lines between their components

Composite systems and the partial trace

The strongest reason for density matrices is entanglement. Consider two qubits A and B in a joint pure state \(|\Psi\rangle\). An observer with access only to A measures observables of the form \(A \otimes 1\). Their expectation values are \(\langle\Psi|A \otimes 1|\Psi\rangle = \operatorname{tr}_A(\rho_AA)\), where the reduced density matrix of A is obtained by tracing out B:

\[\rho_A = \operatorname{tr}_B|\Psi\rangle\langle\Psi| = \sum_j\langle j_B|\Psi\rangle\langle\Psi|j_B\rangle .\]

For a product state \(|\Psi\rangle = |a\rangle|b\rangle\), \(\rho_A = |a\rangle\langle a|\) is pure. For the Bell state \((|00\rangle + |11\rangle)/\sqrt2\), the partial trace gives \(\rho_A = (|0\rangle\langle0| + |1\rangle\langle1|)/2\), the maximally mixed state. The whole system is in a definite pure state, yet each part on its own is completely random. Schrödinger, who named entanglement in 1935, put it this way: the best possible knowledge of a whole does not include the best possible knowledge of its parts. Conversely, any mixed state can be obtained as the reduced state of a larger pure state, a construction called purification. In this sense every mixed state may be thought of as half of an entangled pair.

A pure state of two systems can always be written in a special form, the Schmidt decomposition,

\[|\Psi\rangle = \sum_i\sqrt{\lambda_i}\,|u_i\rangle_A|v_i\rangle_B ,\]

with orthonormal \(|u_i\rangle\) and \(|v_i\rangle\) and non-negative \(\lambda_i\) summing to 1. The \(\lambda_i\) are the eigenvalues of both \(\rho_A\) and \(\rho_B\), so the two reduced states always have the same spectrum. The state is entangled exactly when more than one \(\lambda_i\) is nonzero.

Von Neumann entropy

The uncertainty in a mixed state is measured by the von Neumann entropy,

\[S(\rho) = -\operatorname{tr}(\rho\log_2\rho) = -\sum_i\lambda_i\log_2\lambda_i ,\]

where \(\lambda_i\) are the eigenvalues of \(\rho\). It is zero for pure states and reaches \(\log_2d\) for the maximally mixed state, one bit for a qubit. It is the quantum version of the Shannon entropy of a probability distribution and, multiplied by \(k_B\ln2\), the Gibbs entropy of statistical mechanics from PHYS-361, where the thermal state \(\rho = e^{-\beta H}/Z\) maximizes \(S\) at fixed mean energy. For a pure state of two systems, \(S(\rho_A) = S(\rho_B)\) is the entanglement entropy, the standard measure of how entangled they are. For \(\cos t|00\rangle + \sin t|11\rangle\) it rises from 0 at \(t = 0\) to one bit at \(t = \pi/4\), the Bell state.

Pure and mixed states, the Bloch vector, partial traces and entanglement entropy
import cmath, math

def outer(a, b): return [[x * y.conjugate() for y in b] for x in a]
def madd(A, B, wa=1, wb=1): return [[wa * A[i][j] + wb * B[i][j] for j in range(len(A))] for i in range(len(A))]
def mm(A, B): return [[sum(A[i][k] * B[k][j] for k in range(len(B))) for j in range(len(B[0]))] for i in range(len(A))]
def tr(A): return sum(A[i][i] for i in range(len(A)))
sx = [[0, 1], [1, 0]]; sy = [[0, -1j], [1j, 0]]; sz = [[1, 0], [0, -1]]
def bloch(r): return tuple(tr(mm(r, s)).real for s in (sx, sy, sz))
def eig2(r):                                   # eigenvalues of a 2x2 Hermitian matrix
    a, d = r[0][0].real, r[1][1].real; b = abs(r[0][1])
    m, s = (a + d) / 2, math.sqrt(((a - d) / 2) ** 2 + b * b); return m + s, m - s
def S(r): return 0.0 + -sum(p * math.log2(p) for p in eig2(r) if p > 1e-15)

s = 1 / math.sqrt(2)
up, dn, plus, minus = [1, 0], [0, 1], [s, s], [s, -s]
pure = outer(plus, plus)
mixz = madd(outer(up, up), outer(dn, dn), 0.5, 0.5)
mixx = madd(outer(plus, plus), outer(minus, minus), 0.5, 0.5)
print("state                       P(up z)  P(+x)   purity tr(rho^2)  Bloch vector        S (bits)")
for name, r in (("pure |+x>", pure), ("50/50 mixture of up, down", mixz), ("50/50 mixture of +x, -x", mixx)):
    pz = r[0][0].real; px = sum(plus[i].conjugate() * r[i][j] * plus[j] for i in range(2) for j in range(2)).real
    b = bloch(r)
    print(f"  {name:26s} {pz:.3f}    {px:.3f}       {tr(mm(r, r)).real:.3f}         ({b[0]:+.2f}, {b[1]:+.2f}, {b[2]:+.2f})   {S(r):.3f}")
print("The two mixtures have identical density matrices:", all(abs(mixz[i][j] - mixx[i][j]) < 1e-12 for i in range(2) for j in range(2)))
print()

# Partial trace: two qubits, basis order 00, 01, 10, 11
def ptrace_B(R):
    return [[R[2 * i][2 * j] + R[2 * i + 1][2 * j + 1] for j in range(2)] for i in range(2)]
print("Pure two-qubit state cos(t)|00> + sin(t)|11>: reduced state of qubit A")
print("   t/pi    purity of rho_A   entanglement entropy S(rho_A) (bits)")
for t in (0.0, 0.05, 0.125, 0.2, 0.25):
    psi = [math.cos(t * math.pi), 0, 0, math.sin(t * math.pi)]
    rA = ptrace_B(outer(psi, psi))
    print(f"   {t:5.3f}       {tr(mm(rA, rA)).real:.4f}            {abs(S(rA)):.4f}")
print()

# A random pure state of qubit A alone has S = 0; a product state gives a pure reduced state
import random
random.seed(472)
a = [complex(random.gauss(0, 1), random.gauss(0, 1)) for _ in range(2)]; n = math.sqrt(sum(abs(x) ** 2 for x in a)); a = [x / n for x in a]
prod = [a[i] * b for i in range(2) for b in plus]
rA = ptrace_B(outer(prod, prod))
print(f"Product state |a>|+x>: purity of rho_A = {tr(mm(rA, rA)).real:.6f}, S = {abs(S(rA)):.6f} bits, |Bloch vector| = {math.sqrt(sum(x * x for x in bloch(rA))):.6f}")
Output
state                       P(up z)  P(+x)   purity tr(rho^2)  Bloch vector        S (bits)
  pure |+x>                  0.500    1.000       1.000         (+1.00, +0.00, +0.00)   0.000
  50/50 mixture of up, down  0.500    0.500       0.500         (+0.00, +0.00, +0.00)   1.000
  50/50 mixture of +x, -x    0.500    0.500       0.500         (+0.00, +0.00, +0.00)   1.000
The two mixtures have identical density matrices: True

Pure two-qubit state cos(t)|00> + sin(t)|11>: reduced state of qubit A
   t/pi    purity of rho_A   entanglement entropy S(rho_A) (bits)
   0.000       1.0000            0.0000
   0.050       0.9523            0.1659
   0.125       0.7500            0.6009
   0.200       0.5477            0.9300
   0.250       0.5000            1.0000

Product state |a>|+x>: purity of rho_A = 1.000000, S = 0.000000 bits, |Bloch vector| = 1.000000

The first table shows the distinction between superposition and mixture: the pure state \(|{+}\rangle\) gives \(+x\) with certainty, while both mixtures give one half, have purity one half and lie at the center of the Bloch ball. The program confirms that the two mixtures have the same density matrix. The second table follows the reduced state of qubit A as the joint state moves from a product to a Bell state. The purity falls from 1 to one half and the entanglement entropy rises from 0 to 1 bit. A product state gives a pure reduced state, with a Bloch vector of unit length, whatever single-qubit state is chosen.

Measurement and generalized measurements

With density matrices the measurement postulate takes a compact form. A projective measurement with projections \(P_a\) gives result \(a\) with probability \(p_a = \operatorname{tr}(\rho P_a)\) and leaves the state \(P_a\rho P_a/p_a\). If the result is not recorded, the state becomes \(\sum_aP_a\rho P_a\), which removes the coherences between eigenspaces. More general measurements, called positive operator-valued measures, replace the projections by any positive operators \(E_a\) with \(\sum_aE_a = 1\), with probabilities \(\operatorname{tr}(\rho E_a)\). They describe measurements made by coupling the system to an auxiliary probe and then measuring the probe, and they can, for instance, distinguish non-orthogonal states unambiguously some of the time, which no projective measurement can do. The most general physical operation on a density matrix, a quantum channel, is any linear map that is completely positive and preserves the trace; it can always be written as \(\rho \to \sum_kK_k\rho K_k^\dagger\) with \(\sum_kK_k^\dagger K_k = 1\). Lesson 8 uses this form.

Worked problem

Reduced state of a partially entangled pair

For \(|\Psi\rangle = \cos t\,|00\rangle + \sin t\,|11\rangle\), find \(\rho_A\), its purity and its entropy at \(t = \pi/8\).

Show solution
  1. \(|\Psi\rangle\langle\Psi|\) has elements \(\cos^2t\) at \(00,00\), \(\sin^2t\) at \(11,11\) and \(\cos t\sin t\) at \(00,11\) and \(11,00\).
  2. Tracing over B keeps only terms with equal B indices: \(\rho_A = \operatorname{diag}(\cos^2t, \sin^2t)\). The coherence disappears because it connects different states of B.
  3. At \(t = \pi/8\), \(\cos^2t = 0.854\) and \(\sin^2t = 0.146\), so the purity is \(0.854^2 + 0.146^2 = 0.750\) and \(S = -0.854\log_20.854 - 0.146\log_20.146 = 0.601\) bit.

Answer: \(\rho_A\) is diagonal with populations 0.854 and 0.146, purity 0.75 and entropy 0.60 bit, matching the program's row for \(t/\pi = 0.125\).

Common mistakes

  • MistakeTreating a 50/50 mixture as the same as an equal superposition.

    InsteadThey agree in one basis but not in others; only the superposition has coherences.

  • MistakeBelieving two differently prepared mixtures with the same \(\rho\) can be distinguished.

    InsteadAll predictions depend only on \(\rho\).

  • MistakeAssigning a state vector to one half of an entangled pair.

    InsteadA subsystem of an entangled pure state has only a mixed reduced density matrix.

  • MistakeUsing \(\operatorname{tr}\rho = 1\) alone to check validity.

    InsteadPositivity is also required: all eigenvalues must be non-negative.

  • MistakeComputing the entropy from the diagonal elements in an arbitrary basis.

    InsteadUse the eigenvalues; the diagonal gives a larger value unless \(\rho\) is diagonal.

Summary and key terms

  • \(\rho = \sum_kp_k|\psi_k\rangle\langle\psi_k|\) predicts \(\langle A\rangle = \operatorname{tr}(\rho A)\); it is Hermitian, positive and of unit trace.
  • Purity \(\operatorname{tr}\rho^2\) is 1 for pure states and less for mixed ones; closed systems obey \(i\hbar\dot\rho = [H, \rho]\).
  • A qubit is \(\rho = (1 + \mathbf r\cdot\boldsymbol\sigma)/2\) with \(|\mathbf r| \le 1\): the Bloch ball.
  • The reduced state \(\rho_A = \operatorname{tr}_B\rho\) of an entangled pure state is mixed; the Schmidt coefficients are its eigenvalues.
  • The von Neumann entropy \(S = -\operatorname{tr}\rho\log_2\rho\) of \(\rho_A\) measures entanglement in pure bipartite states.
Density operator
The positive, unit-trace operator describing a pure or mixed quantum state.
Purity
The quantity \(\operatorname{tr}\rho^2\), equal to 1 only for pure states.
Partial trace
The operation that gives the state of a subsystem by summing over the other subsystem.
Schmidt decomposition
The form \(\sum_i\sqrt{\lambda_i}|u_i\rangle|v_i\rangle\) of any pure bipartite state.
Von Neumann entropy
\(S = -\operatorname{tr}\rho\log\rho\), the quantum generalization of Shannon entropy.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Find the Bloch vector of \(\rho = \operatorname{diag}(0.8, 0.2)\).

    Show answer

    \((0, 0, 0.6)\).

  2. Is \(\begin{pmatrix}0.5 & 0.6\\ 0.6 & 0.5\end{pmatrix}\) a valid density matrix?

    Show answer

    No: its eigenvalues are \(1.1\) and \(-0.1\).

  3. What is the entropy of the maximally mixed state of three qubits?

    Show answer

    3 bits.

  4. Find \(\rho_B\) for \((|01\rangle - |10\rangle)/\sqrt2\).

    Show answer

    \(1/2\), the maximally mixed state.

  5. Show that \(\operatorname{tr}\rho^2 = (1 + |\mathbf r|^2)/2\) for a qubit.

    Show answer

    Use \(\operatorname{tr}\sigma_i = 0\) and \(\operatorname{tr}\sigma_i\sigma_j = 2\delta_{ij}\).

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz