the chemical reaction. High energy particle physics: Ordinary particles can be spawned out of pure energy, if a corresponding antiparticle is created. If this sort of process is allowed, then neither the number of particles nor antiparticles are conserved. Instead, is conserved. As particle energies increase, there are more possibilities to convert between particle types, and so there are fewer numbers that are truly conserved. At the very highest energies the only conserved numbers are electric charge, weak isospin, and baryon number − lepton number. On the other hand, in some cases a single kind of particle may have multiple conserved numbers: Closed compartments: In a system composed of multiple compartments that share energy but do not share particles, it is possible to set the chemical potentials separately for each compartment. For example, a capacitor is composed of two isolated conductors and is charged by applying a difference in electron chemical potential. Slow equilibration: In some quasi-equilibrium situations it is possible to have two distinct populations of the same kind of particle in the same location, which are each equilibrated internally but not with each other. Though not strictly in equilibrium, it may be useful to name quasi-equilibrium chemical potentials which can differ among the different populations. Examples: (semiconductor physics) distinct quasi-Fermi levels (electron chemical potentials) in the conduction band and valence band; (spintronics) distinct spin-up and spin-down chemical potentials; (cryogenics) distinct parahydrogen and orthohydrogen chemical potentials. Precise expressions for the ensemble The precise mathematical expression for statistical ensembles has a distinct form depending on the type of mechanics under consideration (quantum or classical), as the notion of a "microstate" is considerably different. In quantum mechanics, the grand canonical ensemble affords a simple description since diagonalization provides a set of distinct microstates of a system, each with well-defined energy and particle number. The classical mechanical case is more complex as it involves not stationary states but instead an integral over canonical phase space. Quantum mechanical A statistical ensemble in quantum mechanics is represented by a density matrix, denoted by . The grand canonical ensemble is the density matrix where is the system's total energy operator (Hamiltonian), is the system's total particle number operator for particles of type 1, is the total particle number operator for particles of type 2, and so on. is the matrix exponential operator. The grand potential is determined by the probability normalization condition that the density