The partition function is a certain assignment that may be extracted from a system in statistical mechanics, or in quantum field theory. It the quantum field theory is presented as an FQFT that is a functor on a category of -dimensional cobordisms, then the partition function is the assignment of -dimensional tori to the valued assigned to these by the QFT.
By the axioms of functoriality and symmetric monoidalness of a QFT, this means that the partition function is the trace over the value of the QFT in the cylinder obtained by cutting the torus open.
This is where the partition function originally derives its name from: typically for QFTs on Riemannian cobordisms the value of the QFT on a cylinder of length is a linear operator of the form for some operator .
When one thinks of the QFT — under Wick rotation — as describing a physical system in statistical mechanics, then vector space that acts on is the vector space of all states of the system and is the operator whose eigenstates are the states of definite energy, and then the expression
interprets as
sum over all states of the system and weigh each one by its energy .
This involves, conversely, counting for each fixed energy the number of states of that energy. This will typically be a sum over certain partitions of various particles of an ensemble into various “bins” of partial energies. Therefore the term partition function.
In fact, the common letter uses to denote QFTs (or at least TQFTs) also derives from this: in German the partition function is called Zustandssumme — from German Zustand for “state” .
For some discussion of partition functions of 1-dimensional QFTs see (1,1)-dimensional Euclidean field theories and K-theory.
For some discussion of partition functions of 2-dimensional QFTs see (2,1)-dimensional Euclidean field theories and tmf