  To reach the equality for a cycle generally requires quasistatic reversible processes. These are processes for which the system goes through infinitesimally small changes in the state variables (such as the temperature, the volume and the pressure of a gas) and for which the change can go in either direction with equal and opposite infinitesimal heat exchanges with heat baths. These heat exchanges are generally only reversible if the system is in thermal equilibrium with the heat bath.