**Appendix A**

Here, we show that the work bounds appearing in Equations (18), (45) and (73) are saturated by the protocols given by Equations (19), (46) and (74), when these protocols are performed quasistatically (*τ* → ∞). In both the quantum and classical cases, our key assumption is that in the absence of driving the system relaxes to the thermal equilibrium state. Hence, under quasistatic driving, the system tracks the instantaneous equilibrium state.

In the quantum case, we first note that for a time-dependent Hamiltonian *H*ˆ (*t*) and the corresponding equilibrium state *π*<sup>ˆ</sup>(*t*) and free energy F*q*,eq(*t*) = −*β*−<sup>1</sup> ln *Zq*(*t*), the following relation holds:

$$\frac{d}{dt}\mathcal{F}^{\text{q.eq}}(t) = \text{Tr}\left[\frac{d\hat{H}}{dt}\hat{\pi}\right] \tag{A1}$$

as can be verified directly from Equations (3) and (4). This identity is the quantum counterpart of the classical thermodynamic integration identity, Equation (A8), which underlies the thermodynamic integration technique for free energy estimation [60,61]. Equation (A1) states that the rate of change in the equilibrium free energy, with respect to time, is the equilibrium average of the rate of change in the Hamiltonian.

Now, consider a quantum system whose initial state is *ρ*<sup>ˆ</sup>*i*, which is driven according to the protocol given by Equation (19). The initial step of this protocol is an instantaneous change in the Hamiltonian from *H* ˆ (0) = *H*ˆ 0 to *H*ˆ (0+) = −*β*−<sup>1</sup> ln *ρ*<sup>ˆ</sup>*i*. The state of the system does not change during this step. The resulting work performed is

$$\begin{split} \mathcal{W}\_{0 \to 0^{+}}^{q} &= -\int\_{0}^{0^{+}} \text{Tr} \left[ \frac{d\hat{H}}{dt} \hat{\rho} \right] dt \\ &= \text{Tr} \left[ (\hat{H}(0) - \hat{H}(0^{+})) \hat{\rho}\_{i} \right] \\ &= \text{Tr} \left[ (\hat{H}\_{0} + \beta^{-1} \ln \hat{\rho}\_{i}) \hat{\rho}\_{i} \right] \\ &= \mathcal{U}\_{i}^{q} - \beta^{-1} \mathcal{S}\_{i}^{q} = \mathcal{F}\_{i}^{q}. \end{split} \tag{A2}$$

During the quasistatic stage of the protocol, the system evolves through a sequence of equilibrium states, *ρ*<sup>ˆ</sup>(*t*) = *π*<sup>ˆ</sup>(*t*)—see Equation (20). Applying Equation (A1), the resulting work is

$$\mathcal{W}\_{0^{+} \to \tau^{-}}^{\mathcal{J}} = -\int\_{0^{+}}^{\tau^{-}} \text{Tr} \left[ \frac{d\hat{H}}{dt} \hat{\pi} \right] dt \tag{A3}$$

$$\begin{split} &= -\int\_{0^{+}}^{\tau^{-}} \frac{d}{dt} \mathcal{F}^{\eta, \text{eq}}(t) \, dt \\ &= \mathcal{F}^{\eta, \text{eq}}(\tau^{-}) - \mathcal{F}^{\eta, \text{eq}}(0^{+}) \end{split}$$

$$\begin{split} &= -\beta^{-1} \ln \text{Tr} \, e^{-\beta \hat{H}(\tau^{-})} + \beta^{-1} \ln \text{Tr} \, e^{-\beta \hat{H}(0^{+})} \\ &= -\beta^{-1} \ln \frac{\text{Tr} \, \text{diag} \, \beta\_{i}}{\text{Tr} \, \hat{\rho}\_{i}} = 0. \end{split}$$

Proceeding as in Equation (A2), we obtain

$$\mathcal{W}^{\!\!\!\!\!\!\/}\_{\tau^{-}\to\tau} = -\mathcal{F}^{\!\!\!\!\/}\_{\!\!\!\/} \tag{A4}$$

for the Hamiltonian quench at *t* = *τ*. Thus, the total work over the entire process is

$$\mathcal{W}^q = \mathcal{F}\_i^q - \mathcal{F}\_f^q = \beta^{-1} [\mathcal{S}^q(\text{diag}\,\hat{\rho}\_i) - \mathcal{S}^q(\hat{\rho}\_i)] \tag{A5}$$

(using U*qi*= U*qf*), as claimed at the end of Section 2.

Similar calculations for the protocol appearing in Equation (74) give

$$\mathcal{W}\_{0\to 0^+}^{q} = \mathcal{U}\_i^q - \beta^{-1} \mathcal{S}\_i^q \tag{A6a}$$

$$\mathcal{W}\_{0^{+} \to \tau^{-}}^{q} = -\mathcal{F}\_{0}^{q, \alpha \natural} \tag{A6b}$$

$$\mathcal{W}^{\!\!\!\!\!\!\!\!\!\!\!\!\!\!\/\!\!\!\/\!\!\/ \!\!\/:\!\!\/ \!\/\!\/:\!\/\!\/:\!\/\/:\!\/\/\/\/\,\tag{A\(\mathfrak{E}\)}$$

hence, 
$$\mathcal{W}^q = \mathcal{U}\_i^q - \beta^{-1} \mathcal{S}\_i^q - \mathcal{F}\_0^{q, \alpha \natural} \tag{A7}$$

as claimed in Section 5, just after Equation (74).

In the classical case, for a Hamiltonian *<sup>H</sup>*(<sup>Γ</sup>, *t*) we have the identity

$$\frac{d}{dt}\mathcal{F}^{\epsilon,\text{eq}}(t) = \int d\Gamma \, \frac{\partial H}{\partial t}(\Gamma, t)\, \pi(\Gamma, t). \tag{A8}$$

For the protocol given by Equation (46), calculations essentially identical to those appearing above in Equations (A2)–(A4), but with quantum traces replaced by integrals over classical phase space, give

$$\mathcal{W}\_{0\to 0^+}^{\mathbb{C}} = \mathcal{F}\_i^{\mathbb{C}} \tag{A9a}$$

$$\mathcal{W}\_{0^{+} \to \mathbb{r}^{-}}^{\mathbb{x}} = 0 \tag{A9b}$$

$$\mathcal{W}^{\mathfrak{c}}\_{\mathfrak{r}\to\mathfrak{r}\_{+}} = -\mathcal{F}^{\mathfrak{c}}\_{f'} \tag{A9c}$$

hence,

$$\mathcal{W}^{\mathfrak{c}} = \mathcal{F}\_i^{\mathfrak{c}} - \mathcal{F}\_f^{\mathfrak{c}} = \mathcal{\beta}^{-1} (\mathcal{S}^{\mathfrak{c}}[\text{diag}\,\rho\_i] - \mathcal{S}^{\mathfrak{c}}[\rho\_i]) \tag{A10}$$

as claimed at the end of Section 3.2.
