Case Study 1: Thermal States and Statistical Mechanics
Overview
The density matrix finds its most natural and historically earliest application in quantum statistical mechanics. When a quantum system is in thermal equilibrium at temperature $T$, it is not in any single energy eigenstate — it occupies a statistical mixture of eigenstates weighted by the Boltzmann distribution. This case study explores how the density operator provides the bridge between quantum mechanics and thermodynamics, unifying two of physics' greatest theoretical frameworks.
We trace the story from the thermal density matrix of a single quantum harmonic oscillator to the statistical mechanics of blackbody radiation — completing a circle that began in Chapter 1 with Planck's desperate quantization hypothesis.
Part 1: The Canonical Ensemble as a Density Matrix
From Boltzmann to von Neumann
In classical statistical mechanics, a system in thermal equilibrium at temperature $T$ (coupled to a heat bath) is described by the canonical ensemble: the probability of finding the system in a microstate with energy $E$ is proportional to $e^{-E/k_BT}$.
The quantum generalization is immediate. If the system has Hamiltonian $\hat{H}$ with energy eigenstates $|n\rangle$ and eigenvalues $E_n$, the thermal density matrix (or Gibbs state) is:
$$\hat{\rho}_{\text{th}} = \frac{e^{-\beta\hat{H}}}{Z} = \frac{1}{Z}\sum_n e^{-\beta E_n}|n\rangle\langle n|$$
where $\beta = 1/(k_BT)$ is the inverse temperature and the partition function is:
$$Z = \text{Tr}(e^{-\beta\hat{H}}) = \sum_n e^{-\beta E_n}$$
This is a mixed state (for $T > 0$) that encodes our ignorance about which energy eigenstate the system occupies. At $T = 0$, $\hat{\rho}_{\text{th}} \to |0\rangle\langle 0|$ (the ground state — a pure state). At $T \to \infty$, $\hat{\rho}_{\text{th}} \to \hat{I}/d$ (the maximally mixed state — complete ignorance).
Why the Exponential?
The Boltzmann factor $e^{-\beta E}$ is not an arbitrary choice. It is the unique probability distribution that maximizes the von Neumann entropy $S = -\text{Tr}(\hat{\rho}\ln\hat{\rho})$ subject to the constraints:
- $\text{Tr}(\hat{\rho}) = 1$ (normalization)
- $\text{Tr}(\hat{\rho}\hat{H}) = \langle E\rangle$ (fixed average energy)
This is a profound result: thermal equilibrium is the state of maximum quantum uncertainty given a known average energy. The density matrix formalism makes this statement precise and mathematically rigorous.
💡 Key Insight: This maximum-entropy principle connects the density matrix directly to information theory. The thermal state is the "least informative" state consistent with knowledge of the average energy. The temperature $T$ is a Lagrange multiplier enforcing the energy constraint. This perspective, championed by Edwin Jaynes in the 1950s, revolutionized the foundations of statistical mechanics.
Part 2: The Quantum Harmonic Oscillator at Finite Temperature
Setup
The quantum harmonic oscillator (QHO) with frequency $\omega$ has energy levels $E_n = (n + 1/2)\hbar\omega$. The thermal density matrix is:
$$\hat{\rho}_{\text{th}} = \frac{1}{Z}\sum_{n=0}^{\infty} e^{-\beta(n+1/2)\hbar\omega}|n\rangle\langle n|$$
Partition Function
$$Z = \sum_{n=0}^{\infty} e^{-\beta(n+1/2)\hbar\omega} = e^{-\beta\hbar\omega/2}\sum_{n=0}^{\infty} e^{-n\beta\hbar\omega} = \frac{e^{-\beta\hbar\omega/2}}{1 - e^{-\beta\hbar\omega}} = \frac{1}{2\sinh(\beta\hbar\omega/2)}$$
Mean Energy
$$\langle E\rangle = \text{Tr}(\hat{\rho}_{\text{th}}\hat{H}) = -\frac{\partial \ln Z}{\partial \beta} = \frac{\hbar\omega}{2}\coth\!\left(\frac{\beta\hbar\omega}{2}\right) = \hbar\omega\!\left(\bar{n} + \frac{1}{2}\right)$$
where $\bar{n} = \frac{1}{e^{\beta\hbar\omega} - 1}$ is the Bose-Einstein mean occupation number — the average number of quanta (phonons, photons) in the oscillator at temperature $T$.
Limiting Cases
Low temperature ($k_BT \ll \hbar\omega$, i.e., $\beta\hbar\omega \gg 1$): - $\bar{n} \approx e^{-\beta\hbar\omega} \ll 1$ — the oscillator is essentially in the ground state - $\langle E\rangle \approx \hbar\omega/2$ — only zero-point energy - $\hat{\rho} \approx |0\rangle\langle 0|$ — nearly pure state
High temperature ($k_BT \gg \hbar\omega$, i.e., $\beta\hbar\omega \ll 1$): - $\bar{n} \approx k_BT/(\hbar\omega) \gg 1$ — many quanta occupied - $\langle E\rangle \approx k_BT$ — the classical equipartition result - $\hat{\rho}$ is broadly distributed over many $|n\rangle$ — highly mixed
Von Neumann Entropy
$$S = -\text{Tr}(\hat{\rho}_{\text{th}}\ln\hat{\rho}_{\text{th}}) = \beta\langle E\rangle + \ln Z$$
$$= (\bar{n}+1)\ln(\bar{n}+1) - \bar{n}\ln\bar{n}$$
This is a monotonically increasing function of temperature, as expected: hotter systems have more uncertainty.
📊 By the Numbers: For a molecular vibration with $\hbar\omega = 0.1$ eV (typical C-H stretch mode): at room temperature ($T = 300$ K, $k_BT = 0.026$ eV), $\beta\hbar\omega \approx 3.9$, so $\bar{n} \approx 0.02$. The molecule is essentially in the vibrational ground state at room temperature! The thermal density matrix is 98% pure. This is why molecular spectroscopy at room temperature shows sharp absorption lines starting from $|0\rangle$.
Part 3: Blackbody Radiation — The Full Circle
From Planck to the Density Matrix
In Chapter 1, we began the entire textbook with Planck's radiation law — the formula that launched the quantum revolution. Now we can derive it rigorously using the density matrix formalism.
A blackbody cavity contains electromagnetic radiation in thermal equilibrium. Each mode of the electromagnetic field with frequency $\nu$ is an independent quantum harmonic oscillator. The thermal density matrix of a single mode is exactly the QHO thermal state above, with $\omega = 2\pi\nu$.
Mean Energy per Mode
The mean energy of a single mode is:
$$\langle E_\nu\rangle = h\nu\!\left(\bar{n}_\nu + \frac{1}{2}\right) = h\nu\!\left(\frac{1}{e^{h\nu/k_BT} - 1} + \frac{1}{2}\right)$$
The $+1/2$ term is the zero-point energy. In the blackbody problem, this term contributes an infinite constant to the total energy (summing over all modes) — the vacuum energy. It does not affect the spectral distribution (since it is independent of temperature) and is typically subtracted.
Planck's Spectral Energy Density
Counting the number of modes per unit volume per unit frequency (the density of states $g(\nu) = 8\pi\nu^2/c^3$), the spectral energy density is:
$$u(\nu, T) = g(\nu)\cdot\frac{h\nu}{e^{h\nu/k_BT} - 1} = \frac{8\pi h\nu^3}{c^3}\cdot\frac{1}{e^{h\nu/k_BT} - 1}$$
This is Planck's radiation law — derived here not from an ad hoc quantization postulate, but from the thermal density matrix of quantum harmonic oscillators. The ultraviolet catastrophe is automatically avoided because the Boltzmann factor exponentially suppresses high-frequency modes.
The Thermal Photon State
The thermal state of a single electromagnetic field mode is:
$$\hat{\rho}_{\text{th}} = \sum_{n=0}^{\infty} \frac{\bar{n}^n}{(\bar{n}+1)^{n+1}} |n\rangle\langle n|$$
where $|n\rangle$ is the state with $n$ photons (a Fock state). The photon number follows a geometric distribution (also called a Bose-Einstein distribution):
$$P(n) = \frac{\bar{n}^n}{(\bar{n}+1)^{n+1}}$$
This has a characteristic "thermal" shape: most probable outcome is $n = 0$ (for $\bar{n} < 1$), with a long tail toward high photon numbers.
🔗 Connection: Compare this to the coherent state $|\alpha\rangle$ (Chapter 27), which has a Poisson photon number distribution $P(n) = e^{-|\alpha|^2}|\alpha|^{2n}/n!$. The thermal state has much larger fluctuations in photon number: $\Delta n = \sqrt{\bar{n}(\bar{n}+1)}$ (thermal) vs. $\Delta n = \sqrt{\bar{n}}$ (coherent). This difference is measurable via photon counting statistics and is used experimentally to distinguish thermal light from laser light.
Part 4: The Density Matrix in the Microcanonical and Grand Canonical Ensembles
Microcanonical Ensemble
For an isolated system with fixed energy $E$ (within a small window $\delta E$), the density matrix is the microcanonical state:
$$\hat{\rho}_{\text{micro}} = \frac{1}{\Omega}\sum_{n: E_n \in [E, E+\delta E]} |n\rangle\langle n|$$
where $\Omega$ is the number of states in the energy window. This is a uniform mixture over all accessible states — the quantum version of Boltzmann's "equal a priori probability" postulate.
The von Neumann entropy of this state is $S = \ln\Omega$, which is Boltzmann's entropy formula $S = k_B \ln \Omega$ (up to the factor of $k_B$, which depends on units).
Grand Canonical Ensemble
When the system can exchange both energy and particles with a reservoir, the density matrix becomes:
$$\hat{\rho}_{\text{grand}} = \frac{e^{-\beta(\hat{H} - \mu\hat{N})}}{Z_G}$$
where $\hat{N}$ is the number operator and $\mu$ is the chemical potential. The grand partition function is $Z_G = \text{Tr}(e^{-\beta(\hat{H} - \mu\hat{N})})$. From this, one can derive the Fermi-Dirac and Bose-Einstein distribution functions for ideal quantum gases.
Part 5: Why It Matters — Modern Applications
Quantum Thermodynamics
The density matrix formalism has enabled a new field: quantum thermodynamics — the study of thermodynamic processes at the quantum level, where quantum coherence, entanglement, and measurement play essential roles.
Key questions in this field: - Can a quantum heat engine outperform its classical counterpart by exploiting coherence? - What is the thermodynamic cost of erasing quantum information (quantum Landauer's principle)? - How does entanglement between a system and its bath affect thermalization?
Quantum State Tomography
Experimentally, the density matrix of a quantum system is reconstructed via quantum state tomography — performing measurements in multiple bases and using the statistics to infer $\hat{\rho}$. For a single qubit, this requires measurements of $\langle\hat{\sigma}_x\rangle$, $\langle\hat{\sigma}_y\rangle$, and $\langle\hat{\sigma}_z\rangle$, which determine the Bloch vector and hence $\hat{\rho}$ completely.
For $n$ qubits, the density matrix has $4^n - 1$ independent real parameters (for a $2^n \times 2^n$ Hermitian matrix with unit trace). Full state tomography therefore requires an exponentially growing number of measurements — a fundamental challenge in characterizing large quantum systems.
The Third Law of Thermodynamics
The density matrix gives a particularly clean formulation of the third law: as $T \to 0$, $\hat{\rho} \to |0\rangle\langle 0|$ (the ground state), and $S \to 0$. The unattainability version — that one cannot reach $T = 0$ in a finite number of steps — connects to the impossibility of preparing a perfectly pure state in finite time.
Discussion Questions
-
The thermal density matrix maximizes the von Neumann entropy subject to a fixed average energy. What happens if we fix additional quantities (e.g., average angular momentum, average particle number)? How does the form of $\hat{\rho}$ change?
-
Classical statistical mechanics describes systems at thermal equilibrium using a probability distribution over phase space. The quantum density matrix describes the same situation. In what precise sense is the quantum description "more fundamental"? Are there situations where the classical description is inadequate even at high temperatures?
-
The vacuum energy $\sum_{\text{modes}} \frac{1}{2}\hbar\omega$ of the electromagnetic field is infinite. This is usually handled by "normal ordering" (subtracting the zero-point energy by definition). But the Casimir effect shows that differences in vacuum energy are physically real. How does the density matrix formalism handle this, and what does it tell us about what is "real" about vacuum fluctuations?
-
In quantum computing, qubits must be kept at temperatures $k_BT \ll \Delta E$ to remain in nearly pure states. Superconducting qubits operate at $T \approx 10$ mK with $\Delta E/k_B \approx 200$ mK. Calculate the thermal occupation probability of the excited state and the resulting purity of the thermal state. How much "purer" could the qubits be made by cooling to 1 mK?
Further Exploration
-
Derivation: Derive the Fermi-Dirac distribution for a system of non-interacting fermions using the grand canonical density matrix. Show that $\bar{n}_k = 1/(e^{\beta(E_k - \mu)} + 1)$.
-
Computation: Write a Python program that computes the thermal density matrix of a quantum harmonic oscillator (truncated to the first 20 energy levels) and plots: (a) the diagonal elements $p_n$ vs. $n$ for several temperatures, (b) the mean occupation number $\bar{n}$ vs. $k_BT/\hbar\omega$, (c) the von Neumann entropy vs. temperature.
-
Research: Read about the Jaynes-Cummings model — a single two-level atom interacting with a single electromagnetic field mode in a cavity. How does the density matrix of the atom evolve when the field starts in a thermal state? What happens when the field starts in a coherent state?