The relationship between thermodynamics and statistical physics is valid in
the thermodynamic limit - when the number of particles becomes very large.
Here, we study thermodynamics in the opposite regime - at both the nano scale,
and when quantum effects become important. Applying results from quantum
information theory we construct a theory of thermodynamics in these limits. We
derive general criteria for thermodynamical state transformations, and as
special cases, find two free energies: one that quantifies the
deterministically extractable work from a small system in contact with a heat
bath, and the other that quantifies the reverse process. We find that there are
fundamental limitations on work extraction from nonequilibrium states, owing to
finite size effects and quantum coherences. This implies that thermodynamical
transitions are generically irreversible at this scale. As one application of
these methods, we analyse the efficiency of small heat engines and find that
they are irreversible during the adiabatic stages of the cycle.Comment: Final, published versio