• Mathematics
  • Also: density operator
  • Also: state operator

Density Matrix

A mathematical representation of a quantum state that captures both pure states and statistical mixtures, described by a Hermitian, positive semi-definite matrix with unit trace that generalizes the state vector to noisy and entangled systems.

The state vector ψ|\psi\rangle is sufficient when a quantum system is perfectly isolated and fully known. In practice, neither condition holds. The density matrix ρ\rho handles both noisy and entangled systems in a single framework.

Pure states and mixed states

A pure state has density matrix ρ=ψψ\rho = |\psi\rangle\langle\psi|, a rank-1 matrix. For +=12(0+1)|+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle):

ρ+=12(1111)\rho_{+} = \frac{1}{2}\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}

A mixed state arises from a classical ensemble: the system is in state ψi|\psi_i\rangle with probability pip_i:

ρ=ipiψiψi\rho = \sum_i p_i |\psi_i\rangle\langle\psi_i|

Rank distinguishes pure from mixed: ρ\rho is pure if and only if Tr(ρ2)=1\text{Tr}(\rho^2) = 1. The completely mixed state ρ=I/2\rho = I/2 has Tr(ρ2)=1/2\text{Tr}(\rho^2) = 1/2.

Properties

Every valid density matrix satisfies three conditions:

  1. Hermitian: ρ=ρ\rho^\dagger = \rho, ensuring real expectation values.
  2. Unit trace: Tr(ρ)=1\text{Tr}(\rho) = 1, ensuring probabilities sum to one.
  3. Positive semi-definite: ϕρϕ0\langle\phi|\rho|\phi\rangle \geq 0 for all ϕ|\phi\rangle, ensuring non-negative probabilities.

A matrix satisfying all three is a valid quantum state; violating any one is unphysical.

Expectation values and measurement

Given an observable OO, the expectation value in state ρ\rho is:

O=Tr(ρO)\langle O \rangle = \text{Tr}(\rho O)

For a pure state this reduces to ψOψ\langle\psi|O|\psi\rangle; for a mixture it gives ipiψiOψi\sum_i p_i \langle\psi_i|O|\psi_i\rangle, with no extra bookkeeping.

Partial trace and reduced density matrices

When a joint system ABAB is in state ρAB\rho_{AB}, the state of subsystem AA alone is the reduced density matrix ρA=TrB(ρAB)\rho_A = \text{Tr}_B(\rho_{AB}), obtained by summing over BB‘s degrees of freedom.

For the Bell state Φ+=12(00+11)|\Phi^+\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle), tracing out BB gives ρA=I/2\rho_A = I/2: subsystem AA looks completely mixed even though the full bipartite state is pure. This is the mathematical signature of entanglement and the origin of entanglement entropy.

Why density matrices are necessary

Three situations have no state-vector description:

Noisy channels: a channel applying UkU_k with probability pkp_k maps ρkpkUkρUk\rho \mapsto \sum_k p_k U_k \rho U_k^\dagger. The Kraus operator formalism, the standard language of quantum error correction, is built on this.

Subsystems of entangled states: subsystems of entangled systems are generically mixed even when the global state is pure.

Open system dynamics: the Lindblad master equation governs continuous decoherence directly in terms of ρ\rho.

Code example

import numpy as np

# Pure state |+>
psi = np.array([1, 1]) / np.sqrt(2)
rho_pure = np.outer(psi, psi.conj())
print("Tr(rho^2) pure =", np.trace(rho_pure @ rho_pure).real)   # 1.0

# Mixed state: 70% |0>, 30% |1>
rho_mixed = 0.7 * np.array([[1,0],[0,0]]) + 0.3 * np.array([[0,0],[0,1]])
print("Tr(rho^2) mixed =", np.trace(rho_mixed @ rho_mixed).real) # 0.58

# Partial trace over qubit B from Bell state
bell = np.array([1, 0, 0, 1]) / np.sqrt(2)
rho_ab = np.outer(bell, bell.conj()).reshape(2, 2, 2, 2)
rho_a = np.einsum('ijik->jk', rho_ab)
print("Reduced rho_A:\n", rho_a)  # [[0.5, 0], [0, 0.5]] = I/2

See also