In thermodynamics, the physical meaning of free energy is the maximum amount of work that can be extracted from a system. Now if we take an Ising model on a graph, with interaction weights on each edge, we have a well defined notion of thermodynamical free energy. Can the interpretation of free energy in terms of work be applied to this setting? If so, what does it mean to extract work from the system in this case?



Interpretation of free energy for Ising models
A convenient way to think about this is in terms of the [Jarzynski equality.](https://en.wikipedia.org/wiki/Jarzynski_equality) Suppose you vary a control parameter $H$ from $H\_1$ to $H\_2$ and in this process the system does work $-W$ on the environment at inverse temperature $\beta$. Then the free energy difference $\Delta F=F(H\_2)-F(H\_1)$ gives you the expectation value
$$\mathbb{E}\left(e^{-\beta W}\right)=e^{-\beta\Delta F}.$$


The equality can also be applied to a system that is *decoupled* from the environment while $H(t)$ is being varied from $H(0)=H\_1$ to $H(t)=H\_2$. Then the work $W$ necessary to accomplish the change $H\_1\mapsto H\_2$ equals the energy increase $\Delta E$ of the system and the Jarzynski equality equates the free energy change $e^{-\beta \Delta F}$ to the quantum mechanical expectation value of $e^{-\beta \Delta E}$. This is explained, for example, in [Jarzynski relations for quantum systems and some applications.](https://arxiv.org/abs/cond-mat/0009244) There are some subtleties with precisely how the energy increase is calculated, which appear for finite $t$ if the Hamiltonian ${\cal H}(0)$ does not commute with ${\cal H}(t)$, see [Jarzynski equation for a simple quantum system: Comparing two definitions of work.](https://arxiv.org/abs/cond-mat/0612527)


