- 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 is sufficient when a quantum system is perfectly isolated and fully known. In practice, neither condition holds. The density matrix handles both noisy and entangled systems in a single framework.
Pure states and mixed states
A pure state has density matrix , a rank-1 matrix. For :
A mixed state arises from a classical ensemble: the system is in state with probability :
Rank distinguishes pure from mixed: is pure if and only if . The completely mixed state has .
Properties
Every valid density matrix satisfies three conditions:
- Hermitian: , ensuring real expectation values.
- Unit trace: , ensuring probabilities sum to one.
- Positive semi-definite: for all , 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 , the expectation value in state is:
For a pure state this reduces to ; for a mixture it gives , with no extra bookkeeping.
Partial trace and reduced density matrices
When a joint system is in state , the state of subsystem alone is the reduced density matrix , obtained by summing over ‘s degrees of freedom.
For the Bell state , tracing out gives : subsystem 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 with probability maps . 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 .
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