The elementary example operates under quasi equilibrium conditions. Its main quantum feature is the discrete energy level structure.
More realistic devices operate out of equilibrium possessing friction heat leaks and finite heat flow.
Quantum thermodynamics supplies a dynamical theory required for systems out of equilibrium such as heat engines, thus,
inserting dynamics into thermodynamics.
The theory of open quantum systems constitutes the basic theory. For heat engines a reduced description of the dynamics
of the working substance is sought, tracing out the hot and cold baths.
The starting point is the general Hamiltonian of the combined systems:
and the system Hamiltonian   is time dependent.
A reduced description leads to the equation of motion of the system:
where  is the density operator describing the state of the working medium and  is the generator of dissipative dynamics
which includes the heat transport terms from the baths.
Using this construction, the total change in energy of the sub-system becomes:
leading to the dynamical version of the first law of thermodynamics:
* The power   
* Heat currents  and .
The rate of entropy production becomes:
The global structure of quantum mechanics is reflected in the derivation of the reduced description.
A derivation which is consistent with the laws of thermodynamics is based on
the weak coupling limit.
A thermodynamical idealization assumes that the  system and the baths are uncorrelated, meaning that the total state 
of the combined system becomes a tensor product at all times:
Under these conditions  the  dynamical equations of motion become: 
where  is the Liouville superoperator described in terms of the system's Hilbert space,
where the reservoirs are  described implicitly.
Within the formalism of quantum open system,  can take the form of the 
Gorini-Kossakowski-Sudarshan-Lindblad (GKS-L) Markovian generator or also known just as Lindblad equation
. Theories beyond the weak coupling regime have been proposed.