In statistical mechanics, a canonical ensemble is the statistical ensemble that represents the possible states of a mechanical system in thermal equilibrium with a heat bath at a fixed temperature.[1] The system can exchange energy with the heat bath, so that the states of the system will differ in total energy.