In quantum mechanics, the results of the quantum particle in a box can be used to look at the equilibrium situation for a quantum ideal gas in a box which is a box containing a large number of molecules which do not interact with each other except for instantaneous thermalizing collisions. This simple model can be used to describe the classical ideal gas as well as the various quantum ideal gases such as the ideal massive Fermi gas, the ideal massive Bose gas as well as black body radiation which may be treated as a massless Bose gas, in which thermalization is usually assumed to be facilitated by the interaction of the photons with an equilibrated mass.
Using the results from either Maxwell–Boltzmann statistics, Bose–Einstein statistics or Fermi–Dirac statistics, and considering the limit of a very large box, the Thomas-Fermi approximation is used to express the degeneracy of the energy states as a differential, and summations over states as integrals. This enables thermodynamic properties of the gas to be calculated with the use of the partition function or the grand partition function. These results will be applied to both massive and massless particles. More complete calculations will be left to separate articles, but some simple examples will be given in this article.
For both massive and massless particles in a box, the states of a particle are enumerated by a set of quantum numbers [nx, ny, nz]. The magnitude of the momentum is given by
where h is Planck's constant and L is the length of a side of the box. Each possible state of a particle can be thought of as a point on a 3-dimensional grid of positive integers. The distance from the origin to any point will be