Welcome back. In our last lesson, we derived the fundamental distribution functions for quantum statistics—Fermi-Dirac and Bose-Einstein—by leveraging the power of the grand canonical ensemble. We saw how allowing the particle number to fluctuate dramatically simplifies the counting of states for non-interacting identical particles.
Today, we shift our focus to one of the most versatile and important models in all of physics: the quantum harmonic oscillator. Our objective is to compute the canonical partition function for a system of non-interacting quantum harmonic oscillators. This calculation is a cornerstone of statistical mechanics, forming the basis for understanding phenomena as diverse as the vibrations in a crystal lattice (phonons), which you've encountered in condensed matter physics, and the quantization of the electromagnetic field (photons), a central concept in the quantum field theory you are studying. We will see how the language of statistical mechanics unifies these seemingly disparate areas.
1. The Quantum Harmonic Oscillator: A Brief Review
From your quantum mechanics courses, you are well-acquainted with the one-dimensional quantum harmonic oscillator (QHO), described by the Hamiltonian:
The crucial feature for our purposes is its discrete and uniformly spaced energy spectrum:
Two key properties emerge from this:
- Equally Spaced Levels: The energy gap between any two adjacent levels is constant, .
- Zero-Point Energy: The ground state () has a non-zero energy of . This is a purely quantum mechanical effect arising from the uncertainty principle.
The following diagram provides a clear visualization of these quantized energy levels and the corresponding wavefunctions.

The harmonic oscillator model's ubiquity stems from the fact that any arbitrary potential can be approximated by a quadratic potential near a stable equilibrium point. This makes it a fundamental building block for describing small oscillations in a vast array of physical systems.
2. Partition Function of a Single Oscillator
We will work in the canonical ensemble, where the temperature is fixed. The partition function for a single QHO, , is defined as the sum over all its possible quantum states, weighted by the Boltzmann factor:
where . This infinite sum can be evaluated exactly. The key is to recognize it as a geometric series.
The following video provides an exceptionally clear, step-by-step derivation of this result. It shows how to separate the zero-point energy term and then sum the resulting geometric series to find a compact, closed-form expression for .
Harmonic Oscillator Partition Function
This video from the "Physical Chemistry" channel walks through the entire calculation for a single oscillator, from setting up the sum to arriving at the final expression. The algebraic steps are shown with great care.
Please watch the video from the beginning up to the final result at the full derivation. Pay close attention to how the sum over n is identified as a geometric series and how the formula \sum_{k=0}^{\infty} x^k = 1/(1-x) is applied.
As demonstrated in the video, the calculation proceeds as follows:
- Factor out the zero-point energy term:
- Identify the geometric series: The sum is of the form , with the common ratio . Since and , we have , ensuring convergence.
- Sum the series:
Putting it all together, we arrive at the canonical partition function for a single quantum harmonic oscillator:
This is an exact result, involving no approximations. An elegant alternative form uses the definition of the hyperbolic sine function, :
3. A System of N Independent Oscillators
Now, let's extend this to a system of non-interacting, distinguishable harmonic oscillators. The "distinguishable" condition is important; it applies, for example, to atoms vibrating about fixed lattice sites in a solid. Since the oscillators are non-interacting, the total Hamiltonian is simply the sum of the individual Hamiltonians:
Consequently, the total energy for a given microstate, specified by the set of quantum numbers , is the sum of the individual energies. If all oscillators have the same frequency , then:
The total partition function is a sum over all possible states of the entire N-particle system:
Because the exponential of a sum is the product of exponentials, the partition function factorizes beautifully:
Each term in the product is simply the partition function for a single oscillator. Therefore, for identical, distinguishable oscillators:
This factorization is a general feature for systems of non-interacting, distinguishable components.
The following reading provides a concise, rigorous derivation of these results and connects them to thermodynamic properties, which we will discuss next.
Lecture Notes, Statistical Mechanics (Theory F)
These notes from KIT present the derivation in a manner that aligns with your preference for mathematical rigor.
Please read the subsection titled "Quantum harmonic oscillator" (section 4.2.2, pages 26-27). It starts with the Hamiltonian and derives the partition function for both a single oscillator and a system of N oscillators. It then proceeds to derive the internal energy, entropy, and heat capacity, which provides an excellent preview of our next step.
4. Connection to Thermodynamics and Quantum Statistics
With the partition function in hand, all thermodynamic properties of the system can be derived. Let's compute the average internal energy :
Taking the logarithm of :
Differentiating with respect to gives:
Therefore, the total internal energy is:
This expression is rich with physical meaning.
- The first term, , is the total zero-point energy of the system.
- The second term represents the thermal energy stored in the oscillators. We can write it as , where is the average excitation level (or quantum number) of a single oscillator:
This is a profound result. You should immediately recognize this expression as the Bose-Einstein distribution we derived in the last lesson, for particles with chemical potential . This is no coincidence. It tells us that the quanta of oscillation—the "excitations" of energy —behave as a gas of non-conserved bosons. When these oscillators represent atomic vibrations in a solid, we call these quanta phonons. When they represent modes of the electromagnetic field, we call them photons.
From the internal energy, we can calculate the heat capacity . A plot of versus temperature for a system of harmonic oscillators has a characteristic shape.

The behavior at the limits is instructive:
- High Temperature (): The exponential can be expanded, , which leads to . Thus, . This is the classical equipartition theorem result, where each of the oscillators contributes to the energy (from two quadratic degrees of freedom, kinetic and potential).
- Low Temperature (): The thermal energy is not large enough to excite the oscillators out of their ground state. The energy is "frozen" in the zero-point motion, and the heat capacity approaches zero exponentially, in agreement with the third law of thermodynamics.
Conclusion
In this lesson, we have successfully computed the canonical partition function for a system of non-interacting, distinguishable quantum harmonic oscillators. This exercise provided a concrete application of the statistical mechanics formalism and yielded one of the most important results in the field.
Key Takeaways:
- The partition function for a single QHO with frequency is .
- For a system of independent, distinguishable, identical oscillators, the total partition function factorizes: .
- The average internal energy is .
- The average number of excitation quanta in an oscillator, , follows the Bose-Einstein distribution with zero chemical potential. This establishes that the quanta of oscillation (phonons, photons) are bosons.
This result serves as a direct bridge to our next topic. We will apply this framework to the electromagnetic field, treating it as a collection of harmonic oscillators. By doing so, we will derive the Planck distribution for blackbody radiation, a landmark achievement of early quantum theory and a perfect illustration of the power of quantum statistical mechanics.