Thermodynamic Cost of Steady State Erasure Preprint: APS/123-QED Deepak Gupta, Kristian Stølevik Olsen, Supriya Krishnamurthy Abstract Recent experiments have implemented resetting by means of a time-varying external harmonic trap whereby the trap stiffness is changed from an initial to a final value in finite-time and then the system is reset when it relaxes to an equilibrium distribution in the final trap. Such setups are very similar to those studied in the context of the finite-time Landauer erasure principle. We analyse the thermodynamic costs of such a setup by deriving a moment generating function for the work cost of changing the trap stiffness in finite-time for a system in steady state. We analyse the mean and variance of the work required for a specific experimentally viable protocol and also obtain an optimal protocol which minimises the mean cost. For both these procedures, our analysis captures both the large-time and short-time corrections. For the optimal protocol, we obtain a closed form expression for the mean cost for all protocol durations, thereby making contact with earlier work on geometric measures of dissipation-minimising optimal protocols that implement information erasure. pacs Valid PACS appear here I Introduction Stochastic resetting refers to processes in which a system’s natural evolution is interrupted and restarted according to some predefined scheme, naturally driving the system out of thermal equilibrium Evans and Majumdar 2011 ; Evans and Majumdar 2011 ; Evans et al. 2020 . Rich behaviors, such as non-trivial non-equilibrium steady state properties Pal 2015 ; Nagar and Gupta 2016 , anomalous relaxation dynamics Majumdar et al. 2015 ; Gupta 2019 ; Di Bello et al. 2025 and potential for optimization in search processes Reuveni 2016 ; Evans and Ray 2024 , have attracted much attention over the past decade, both theoretically and experimentally. Given this rich behavior and the multitudinous applications, it is very natural to consider the thermodynamic cost of a resetting operation or the cost associated with maintaining a steady-state resetting process. Particularly interesting are questions relating to fundamental thermodynamic bounds for such costs. These questions take on an even greater significance in the light of the fact that the conceptually simple yet powerful renewal structure built into a resetting process (every reset erases memory and correlations of the system’s past evolution), also hints at deep connections to information erasure Landauer 1961 ; Bennett 1982 . An early study on the thermodynamic cost of resetting Fuchs et al. 2016 , quantified this connection by bounding the average entropic cost for (instantaneous) resetting in analogy with Landauer’s principle of information erasure Landauer 1961 . However, this study did not take into account the actual work needed to implement a reset, which would necessarily also be influenced by the mechanism used to accomplish resetting, finite-time effects, as well as imperfections in the actual resetting. Recent experiments Besga et al. 2020 ; Faisant et al. 2021 ; Goerlich et al. 2024 that implement resetting provide a very easy and elegant framework within which to investigate such questions further. In these experiments, a colloidal particle moves either freely or within a trap until it is reset. The resetting is implemented via a resetting trap generated by optical tweezers. The resetting trap is activated periodically or stochastically and each time it is activated it is left to act for a duration which is long enough for the particle to thermalize. Once thermalization occurs and the particle’s distribution has relaxed to the thermal Boltzmann state (characterized by the resetting potential), the particle is considered reset. Note that in this case the particle is not reset to an exact location (an experiment that implements resetting to an exact location is described in Tal Friedman et al. 2020 ), but instead to a position drawn from the equilibrium thermal distribution in the resetting trap. In this guise too, the resetting problem can be posed as an information erasure problem, whereby, in analogy to how classical bit erasure is implemented via optical traps Bérut et al. 2012 ; Bérut et al. 2013 ; Bérut et al. 2015 ; Jun et al. 2014 ; Gavrilov and Bechhoefer 2016 , one could ask what the thermodynamic cost is for turning on the resetting trap, very slowly, instantaneously or in finite-time, and hence erasing all previous information at a (time-dependent) cost. In analogy with Landauer’s principle, it is also very interesting to understand what the fundamental bound is on such a cost now taking into account the physical constraints of both time and energy which need to be spent to carry out the erasure. In previous work, we have studied such a system and obtained the average and fluctuations of the work needed to turn on the resetting trap Olsen et al. 2024 ; Olsen and Gupta 2024 or the heat dissipated Mori et al. 2023 as the particle relaxes in the resetting trap. In these studies, we have considered an instantaneous switching on of the resetting potential. If however, in analogy with several studies on finite-time bit erasure Bérut et al. 2012 ; Bérut et al. 2013 ; Zulkowski and DeWeese 2014 ; Bérut et al. 2015 ; Jun et al. 2014 ; Gavrilov and Bechhoefer 2016 ; Boyd et al. 2018 ; Saira et al. 2020 ; Proesmans et al. 2020 , one is interested in lower bounds on the thermodynamic cost of resetting, it is necessary to consider the cost as a function of the time it takes to switch on the resetting trap. Such a cost will now also depend on the protocol used for turning on the trap, namely on how the trap parameters are modified to transform the initial trap into the final one. If the states of the system at the start and the end of the protocol are equilibrium states, the second law of thermodynamics places a bound on the minimum work required; this is just the free energy difference between the two states. Any protocol that pays only this minimum cost is a protocol that operates quasi-statically, so that the system is never out of equilibrium for the entire duration. In the context of bit erasure, many experiments Bérut et al. 2012 ; Bérut et al. 2013 ; Bérut et al. 2015 ; Jun et al. 2014 ; Gavrilov and Bechhoefer 2016 ; Saira et al. 2020 have been performed to probe both the bound as well as the actual cost to carry out the erasure process in finite time. Several theoretical works Zulkowski and DeWeese 2014 ; Boyd et al. 2018 ; Proesmans et al. 2020 also address this issue. Although it is possible to look at specific, experimentally viable protocols, theoretically, such questions are best addressed in the context of optimal protocols; a protocol engineered so as to minimize some cost of interest such as the mean work performed or the mean dissipation. Two optimization problems that are typically studied in this context are: designing optimal protocols that transition between two specified distributions within finite time Aurell et al. 2011 ; Zhang 2020 ; Dechant and Sakurai 2019 ; Chen et al. 2020 ; Nakazato and Ito 2021a ; Chennakesavalu and Rotskoff 2023 or designing optimum protocols that minimize the cost needed to shift between two different potential energy landscapes, often harmonic, in finite time Schmiedl and Seifert 2007a ; Schmiedl and Seifert 2007b ; Sivak and Crooks 2012 ; Plata et al. 2019 ; Chen et al. 2020 ; Nakazato and Ito 2021b ; Abiuso et al. 2022 ; Zhong and DeWeese 2022 . A different but related class of problems, inspired by the so-called shortcut to adiabaticity processes Chen et al. 2010a ; Chen et al. 2010b ; Schaff et al. 2010 ; Schaff et al. 2011 ; Guéry-Odelin et al. 2019 , study optimal protocols devised so as to take the system from one equilibrium state to another in a time much faster than the intrinsic relaxation time of the system Martínez et al. 2016a . In this paper, we address the question of estimating the work cost of a classical overdamped system when changing the potential from U to V , effectively implementing an erasure in a fixed time \tau . We formally write down the moment generating function for this process for any U and V . However, we carry out explicit calculations for the mean and variance of the work for harmonic potentials where we transform a harmonic potential U to a harmonic potential V by changing the stiffness of the trap in a finite time \tau according to a generic experimentally viable protocol as well as an optimal protocol. This system has been studied very extensively in the past, in experiments Carberry et al. 2004 ; Blickle and Bechinger 2011 ; Martínez et al. 2016b ; Martínez et al. 2016a ; Chupeau et al. 2018 ; Rosales-Cabara et al. 2020 ; Besga et al. 2020 ; Goerlich et al. 2024 and theoretically Speck and Seifert 2004 ; Schmiedl and Seifert 2007a ; Schmiedl and Seifert 2007b ; Engel 2009 ; Minh and Adib 2009 ; Speck 2011 ; Nickelsen and Engel 2011 ; Abreu and Seifert 2011 ; Kwon et al. 2013 ; Ryabov et al. 2013 ; Solon and Horowitz 2018 . In contrast to most of these previous studies (two exceptions are Goerlich et al. 2024 which studies this case albeit from a different aspect and Abreu and Seifert 2011 who study an out-of-equilibrium though Gaussian state created by a measurement), we consider a steady-state system obtained by repeated applications of our erasure scheme shown in Fig. 1 . The resulting state that needs to be erased is hence an out-of-equilibrium, non-Gaussian state. This fact has implications for the work cost of both generic as well as optimal protocols. As noted recently in the context of bit erasure Ciampini et al. 2021 , it is possible, when beginning with an out-of-equilibrium initial state, to get costs lower than k_{B}T\log 2 in agreement with a generalized Landauer bound Esposito and den Broeck 2011 . We study this aspect in-depth for our system by formally obtaining, under very general conditions, the full moment generating function of the work performed in one cycle. From the expression for the moment generating function, we are able to compute the average work required to carry out one erasure cycle (as in Fig. 1 ) in the case of harmonic traps, both for a generic experimentally-viable protocol as well as optimal protocol. Our results hold for all time and not only in the short or large-time limits as in most earlier works. Our formalism also allows us in principle to look at and optimise higher moments of the work, or Pareto-optimal fronts encoding trade-offs (as done theoretically in Watanabe and Minami 2022 , numerically in Solon and Horowitz 2018 , or in this study Rolandi et al. 2023 for quantum systems). The plan of this paper is as follows. In the next section, we present all our main results. The model is presented in Section II.1 and the derivation of the moment generating function in Section II.2 . The moment generating function gives us access to the mean and fluctuations of the work cost for any protocol. Section II.3 presents the analysis for a specific protocol where a rich structure emerges in parameter space of different behaviours of the mean work cost. To better understand bounds on the work cost, in Section II.4 , we present the analysis of an optimal protocol for all protocol durations. Finally in Section III , we present our take on interesting research directions to pursue. Figure 1: Schematic for an erasing cycle. V(x) : Resetting potential. U(x) : Exploration potential. \mathcal{U}(x;\lambda(t)) : Potential with a time-dependent protocol \lambda(t) such that \mathcal{U}(x;\lambda(0))=U(x) and \mathcal{U}(x;\lambda(\tau))=V(x) . The exploration time-interval t_{1} is drawn from a distribution f(t) and duration for the protocol is \tau . x_{0}^{(V)} and x_{0}^{(U)} , respectively, are the particle’s positions at the beginning and end of the exploration phase. II Results and discussions II.1 Model Our system is subjected to a sequence of erasing protocols in time. Each erasing cycle (see Fig. 1 ) involves a single resetting event composed of two switching processes: 1) An instantaneous jump from the resetting (or stiff) potential V(x) to an exploration (or shallow) potential U(x) at time t=0 , after which the system stays in the potential U(x) for a time distributed according to some temporal distribution f(t) . We call this phase the exploration phase. 2) After the completion of the exploration phase, a time varying potential \mathcal{U}(x;\lambda(t)) is switched on, in such a way that at the beginning and end of the resetting protocol, respectively, \mathcal{U}(x;\lambda(t=0))=U(x) and \mathcal{U}(x;\lambda(t=\tau))=V(x) . Here, \tau is the duration of the potential-switching time. We call this phase the resetting phase. Once the potential V(x) has been turned on, the system stays a fixed amount of time in this potential, say a few times the relaxation-time, so that at the end of this relaxation phase, the system has relaxed to the Boltzmann distribution in this potential. At this point the cycle is complete and we switch instantaneouly back to U(x) . For convenience, henceforth, we drop the explicit time-dependence from \lambda(t) . The time evolution of the system consists of a series of such erasing cycles. The system’s dynamics is governed by the overdamped Langevin equation: \displaystyle\dfrac{dx}{dt}=-\beta D\dfrac{\partial\mathcal{U}(x;\lambda)}{\partial x}+\sqrt{2D}\,\eta(t)\ , (1) for the inverse temperature \beta\equiv(k_{\rm B}T)^{-1} , and the diffusion constant D . Notice that the above equation is valid for both exploration and relaxation phase by respectively replacing \mathcal{U}(x;\lambda)\to U(x) and \mathcal{U}(x;\lambda)\to V(x) . \eta(t) is a Gaussian thermal white noise with zero mean and delta-correlated in time: \langle\eta(t)\eta(t^{\prime})\rangle=\delta(t-t^{\prime}) . In this paper, we are interested in the cost of performing a complete erasing cycle. By the definition of our erasing cycle, this consists of two contributions. For the initial instantaneous jump, the performed work along a single stochastic trajectory is the change in the energy due to an instantaneous switch from potential V(x) to U(x) : \displaystyle w_{1}(x) \displaystyle\equiv U(x)-V(x)\ , (2) whereas the work performed during the change of the potential from U(x) to V(x) in a time-dependent manner via the control parameter \lambda(t) is \displaystyle w_{2}[x(\cdot)] \displaystyle\equiv\int_{0}^{\tau}~dt~\dot{\lambda}\dfrac{\partial\mathcal{U}(x;\lambda)}{\partial\lambda}\ , (3) for the switching time \tau . Here, x(\cdot) represents the system’s trajectory. Therefore, the total stochastic work for one implementation of the erasing cycle is w=w_{1}+w_{2} . The stochasticity in this quantity has its origins in two factors: 1) the system’s size is small, so thermal fluctuations are significant, and 2) the time to stay in the exploration phase is drawn from a distribution f(t) . II.2 Moment Generating Function If a trajectory of length t contains n erasure cycles ( i.e. n replicas of the cycle shown in Fig. 1 ), the total stochastic work performed during such a trajectory will just be the sum of the stochastic work performed during each of these n cycles. Hence, we turn our attention first to understanding the distribution of work for a single cycle. The moment generating function of work w for a single erasure, implemented according to the scheme in Fig. 1 , is defined as \displaystyle C(k,\tau)\equiv\langle e^{kw}\rangle\ , (4) where the angled brackets indicate the average over thermal fluctuations, initial condition, and stochastic exploration time t . Here k is the conjugate variable with respect to work w .This implies \displaystyle C(k,\tau) \displaystyle=\int_{0}^{\infty}~dt~f(t)\int_{-\infty}^{+\infty}~dx_{0}^{(V)}~P_{{\rm eq},V}(x_{0}^{(V)}) \displaystyle\times~\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t|x_{0}^{(V)}) \displaystyle\times e^{k[U(x_{0}^{(V)})-V(x_{0}^{(V)})]}\underbrace{\big\langle e^{kw_{2}}\big\rangle_{0,x_{0}^{(U)}}}_{C_{0}(k,\tau;x_{0}^{(U)})}\ , (5) where we have substituted w_{1} from Eq. ( 2 ). Several comments are in order. C_{0}(k,\tau;x_{0}^{(U)}) is the moment-generating function of work performed while changing the potential from U to V in a time-dependent manner ( 3 ), and herein we average the trajectories emanating from the position x_{0}^{(U)} . This x_{0}^{(U)} is the position of the particle at the end of the exploration phase, therefore, x_{0}^{(U)}\sim P_{U}(x_{0}^{(U)},t|x_{0}^{(V)}) , where x_{0}^{(V)} is the initial condition for the exploration phase’s trajectories. Notice that x_{0}^{(V)} is drawn from the initial equilibrium distribution with respect to the potential V , P_{{\rm eq},V}(x_{0}^{(V)}) , since the system initially instantaneously switches from V to U after the relaxation phase. We have weighted Eq. ( 5 ) with respect to a temporal density, f(t) , of time intervals in the exploration phase. Figure 2: Harmonic exploration and resetting potentials. Mean and variance of work as a function of time t^{*} . Symbols: Numerical simulation. Lines: Analytical results using Eqs. ( 7 ) and ( 8 ) with f(t)=re^{-rt} and the protocol in Section II.3 . a) Red horizontal dashed line indicates W_{\rm slow} ( 14 ). The color intensity increases with increasing resetting rate r . Here, we take the diffusion constant D=0.5 , \gamma=1 , \lambda_{U}=0.125 , \lambda_{V}=0.25 , and simulation time \tau=10~t^{*} . Number of resets: 10^{5} . Inverting the above equation ( 5 ) for any form of potential seems difficult; nevertheless, it provides the means to obtaining the n th order moments of work. This is done as follows. Differentiating both sides of Eq. ( 5 ) n -times with respect to k and setting k=0 , we get, \displaystyle\langle w^{n}\rangle \displaystyle=\int_{0}^{\infty}~dt~f(t)~\int_{-\infty}^{+\infty}~dx_{0}^{(V)}~P_{{\rm eq},V}(x_{0}^{(V)}) \displaystyle\times~\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t|x_{0}^{(V)}) \displaystyle\times\sum_{m=0}^{n}\begin{pmatrix}n\\ m\end{pmatrix}w_{1}^{m}(x_{0}^{(V)})\langle w_{2}^{n-m}\rangle_{0,x_{0}^{(U)}}\ . (6) For notational simplicity, henceforth we write W^{n}\equiv\langle w^{n}\rangle . Analytical calculations of the moments for arbitrary potentials is involved. Therefore, in what follows, we restrict ourselves to the case of harmonic potentials, as these are easily implemented and manipulated in experiments Besga et al. 2020 ; Faisant et al. 2021 . For this case, we obtain the mean and second moment of the work as follows (see Appendix A for more details): \displaystyle W \displaystyle=-\dfrac{k_{\rm B}T}{2}\bigg(1-\dfrac{t_{V}}{t_{U}}\bigg) \displaystyle+\dfrac{D}{2}\int_{0}^{\tau}~dt~\dot{\lambda}\bigg[t_{U}\zeta^{2}G(t,0)+4\int_{0}^{t}~ds~G(t,s)\bigg]\ , (7) \displaystyle W^{2} \displaystyle=I_{1}+I_{2}+I_{3}\ , (8) where \displaystyle G(t,s)\equiv e^{-2\beta D\int_{s}^{t}~dt^{\prime}\lambda(t^{\prime})}\ , (9) and we have defined a dimensionless length \displaystyle\zeta\equiv\sqrt{1-(1-t_{V}/t_{U})\tilde{f}(2/t_{U})}\ , (10) for the trap relaxation time t_{V,U}\equiv(\beta D\lambda_{V,U})^{-1} . Here \lambda_{V,U} are the stiffnesses in the traps U and V respectively and \tilde{f}(s)=\int_{0}^{\infty}~dt~e^{-st}~f(t) is the Laplace transform of the exploration time density. Note that t_{V}/t_{U}\leq\zeta^{2}\leq 1 for any distribution f(t) . I_{1,2,3} in Eq. ( 8 ) are respectively evaluated in Eqs. ( A16 ), ( A17 ), and ( A22 ). The moment generating function for the work performed as the stiffness of the harmonic trap changes, has been studied in earlier work Speck and Seifert 2004 ; Speck 2011 but only when the process begins from an equilibrium initial state. In the process we study here, the initial state is in general out-of-equilibrium. It becomes a Boltzmann distribution in the trap U only if the exploration time t_{1}>t_{U} (see Fig. 1 ). II.3 An experimentally motivated protocol with a poissonian resetting rate While the above analysis and the expression for the moments (Eqs. ( 7 ) and ( 8 )) are true for any protocol \lambda(t) , we specialize to an experimentally feasible protocol Goerlich et al. 2024 : \displaystyle\lambda(t)=\lambda_{U}+(\lambda_{V}-\lambda_{U})\tanh[t/t^{*}]\ . (11) Here, t^{*} controls the speed of the protocol: the smaller the t^{*} the faster \lambda_{U} transforms to \lambda_{V} . The total average work W ( Eq. 7 ) is the sum of two terms W_{1}+W_{2} ; W_{1} is the mean contribution of the instantaneous switch at the beginning of the cycle (this is the first term in the Eq. 7 ) and W_{2} is the mean contribution of the finite-time switch back to potential V (the second term in Eq. 7 which we can now calculate explicitly ). Figure 2 shows the comparison of analytical mean and variance of the work W (using Eqs. ( 7 ) and ( 8 )) for f(t)=re^{-rt} as a function of t^{*} . In both simulations and analytical results, we set the duration of the protocol to \tau=10~t^{*} so that at the end of protocol \lambda(\tau)\approx\lambda_{V} , as required. Both the mean and variance approach their respective stationary values in the quasi-static driving regime t^{*}\to\infty . From Fig. 2 a we see, however, that unlike transformations between equilibrium states, the work performed during the quasistatic limit is not necessarily the minimum. To investigate this further, we focus only on the average work in what follows and compare what we get from an instantaneous versus quasi-static protocol. In the limit t^{*}\to 0 (i.e., the fast switching limit), the total work simplifies to the following two contributions: 1) an instantaneous switch from V to U starting from equilibrium P_{{\rm eq},V}(x) , and 2) another instantaneous switch from U to V \displaystyle W_{\rm inst}\equiv\langle[U(x)-V(x)]\rangle_{P_{{\rm eq},V}(x)}+[V(x)-U(x)]\rangle_{P_{{\rm ta},U}(x)}\ , (12) starting from the time-averaged distribution: \displaystyle P_{{\rm ta},U}(x)\equiv\int_{0}^{t}~dt~f(t)~P_{U}(x,t)\ , (13) in the U(x) potential, where P_{U}(x,t)\equiv\int_{-\infty}^{+\infty}dx_{0}P_{U}(x,t|x_{0})P^{\rm eq}_{V}(x_{0}) . This time-averaged distribution is the non-equilibrium steady-state for our resetting/erasure procedure. Note that because of the renewal structure of our scheme, this distribution does not depend on any details of \lambda(t) ). In contrast, in the slow switching of potential t^{*}\to\infty , we expect the average work to be \displaystyle W_{\rm slow}\equiv\langle[U(x)-V(x)]\rangle_{P_{{\rm eq},V}(x)}+\Delta F^{\rm eq}_{U\to V}\ , (14) i.e. we expect that changing potential U to potential V sufficiently slowly will give rise to a work cost equal to the free energy difference between the two potentials. For this protocol, we can explicitly carry out an expansion in the long-time limit (see Appendix B ) and show that this is indeed the case. As we will see in the next section however, this need not necessarily be the case for arbitrary protocols, ı.e. an arbitrary protocol connecting out-of-equilibrium states need not have a work cost equalling the equilibrium free energy difference at long times. The right-hand side of Eq. ( 14 ) can also be rewritten in the form of a KL-divergence 1 1 1 D_{\rm KL}[{p(x)||q(x)}]\equiv\int~dx~p(x)\ln\frac{p(x)}{q(x)} : \displaystyle W_{\rm slow}=\beta^{-1}D_{\rm KL}[P_{{\rm eq},V}(x)||P_{{\rm eq},U}(x)]\ , (15) for the equilibrium distributions P_{{\rm eq},V}(x) and P_{{\rm eq},U}(x) , respectively, with respect to potentials V and U . Thanks to the non-negativity of the KL-divergence we expect W_{\rm slow}\geq 0 . Using Eq. ( 12 ) and Eq. ( 15 ), we get \displaystyle W_{\rm inst} \displaystyle-W_{\rm slow}=[V(x)-U(x)]\rangle_{P_{\rm ta}(x)}-\Delta F^{\rm eq}_{U\to V} (16) \displaystyle=\beta^{-1}\int_{0}^{\infty}~dt~f(t)~\bigg[D_{\rm KL}[P_{U}(x,t)||P^{\rm eq}_{V}(x)]\ + \displaystyle-D_{\rm KL}[P_{U}(x,t)||P^{\rm eq}_{U}(x)]\bigg]\ . (17) Thus, the sign of the left-hand side depends on the KL-distance of P_{U}(x,t) from the equilibrium distributions in the V and U potentials. For harmonic potentials, we can explicitly compute the average work in the instantaneous ( 12 ) and slow switching ( 14 ) limits, and hence also their difference. This gives \displaystyle W_{\rm inst} \displaystyle=\dfrac{k_{\rm B}T}{2}\bigg[\bigg(\dfrac{t_{U}}{t_{V}}-1\bigg)\zeta^{2}\Bigg] \displaystyle W_{\rm slow} \displaystyle=\Delta F^{\rm eq}_{U\to V}=\dfrac{k_{\rm B}T}{2}\bigg[\ln\dfrac{t_{U}}{t_{V}}\bigg] \displaystyle W_{\rm inst}-W_{\rm slow} \displaystyle=\dfrac{k_{\rm B}T}{2}\bigg[\bigg(\dfrac{t_{U}}{t_{V}}-1\bigg)\zeta^{2}-\ln\dfrac{t_{U}}{t_{V}}\bigg]\ , (18) where the dimensionless length \zeta is defined in Eq. ( 10 ). For f(t)=e^{-rt} , this dimensionless length becomes \displaystyle\zeta^{2}=\left(\frac{rt_{V}+2}{rt_{U}+2}\right)\ . (19) Figure 3: Harmonic exploration and resetting potentials with f(t)=re^{-rt} . Upper Panel: Phase diagram using Eq. ( 18 ) indicating the fast Eq. ( 12 ) and slow switching works Eq. ( 15 ) in the (rt_{U},rt_{V}) plane, for resetting rate r and relaxation time t_{V,U}\equiv(\beta D\lambda_{V,U})^{-1} . Lower panel: Mean work as a function of time t^{*} . Lines: Analytical results Eq. ( 7 ). The horizontal dashed line indicates W_{\rm slow} Eq. ( 15 ). Here, we take the diffusion constant D=1 . Number of resets: 10^{5} . Error bars show one standard error of mean. Figure 4: Harmonic exploration and resetting potentials with f(t)=re^{-rt} . Phase diagram from Fig. 3 with added panels (obtained using Eq. ( 20 ) indicating regions where mean work W is non-monotonic ”NM” or monotonic ”M” as a function of time. Blue regions: W_{\rm inst}W_{\rm slow} . Figure 3 (upper panel) shows the parameter regimes for f(t)=re^{-rt} , where the average work W_{\rm slow} is larger or smaller than W_{\rm inst} [Eq. ( 18 )]; in the unshaded region W_{\rm inst}>W_{\rm slow} otherwise W_{\rm inst}D_{\text{KL}}(P_{\text{ta},U}\parallel q) (25) into a subspace \mathscr{B} of Boltzmann states compatible with our trap, i.e., Gaussian densities in the context of harmonic traps [see Fig.( 6 )]. Since q(x) is a generic Gaussian density, let’s say with mean \mu and standard deviation \sigma , the KL-divergence we want to minimise can be written as D_{\text{KL}}(P_{\text{ta},U}\parallel q)=-S[P_{\text{ta},U}]+\frac{\langle(x-\mu)^{2}\rangle_{\text{ta},U}}{2\sigma^{2}}+\ln\sqrt{2\pi\sigma^{2}} (26) where S[P_{\text{ta},U}] is the Shannon entropy of the true initial state. To minimize this over (\mu,\sigma) , we simply take the derivative with respect to these two parameters and solve for stationary points. This results in \mu=0 and \sigma^{2}=\langle x^{2}\rangle_{\text{ta}}=Dt_{U}\zeta^{2} . Hence the projected state \pi[P_{\text{ta},U}](x) is simply a Gaussian with matching first two moments of P_{\text{ta},U} . Figure 6: Projection of the true state at the beginning of the protocol into a subspace of Boltzmann densities compatible with the trap. Only the deviation from the initial equilibrium state measured within this subspace can be converted to work. The information between the true initial state and the instantaneous equilibrium state associated with the initial trap is measured by D_{\text{KL}}(P_{\text{ta},U}\parallel P_{U}^{\rm eq}) , which in principle can be converted into work as seen in the GL work-bound [ Eq.( 21 )]. However, due to the constraints on the protocol (i.e., harmonic traps) only the KL-divergence D_{\text{KL}}(\pi[P_{\text{ta},U}]\parallel P_{U}^{\rm eq}) between the projected initial state and the instantaneous equilibrium state (the accessible information) can be converted into work; See Fig.( 6 ). Indeed, using well-established formulas for the Kullback-Liebler divergence between two Gaussians, we find that Eq. ( 24 ) can be rewritten as \lim_{\tau\to\infty}W_{2}^{\text{opt}}=\Delta F^{\text{eq}}_{U\to V}-k_{B}T\>D_{\text{KL}}(\pi[P_{\text{ta},U}]\parallel P_{U}^{\rm eq}) (27) Hence the deviations from the bound given by Eq.( 21 ) originates in the information loss associated with the projection of P_{\text{ta},U}\to\pi[P_{\text{ta},U}] . Equation ( 24 ) can also be used to get a lower bound on the work as the distribution of the duration in the exploration phase, f(t) , is varied. Note first that since \tilde{f}(2/t_{U})\leq 1 , 1\geq\zeta^{2}\geq t_{V}/t_{U} . In this range, the function \ln\zeta^{2}+(1-\zeta^{2}) is non-positive and monotonic and attains a maximum value at \zeta=1 . This ultimately gives the bound \displaystyle\lim_{\tau\to\infty}W_{2}^{\rm opt}\geq\frac{k_{\rm B}T}{2}\left(1-\frac{t_{V}}{t_{U}}\right)\ . (28) Here, the equality is obtained for the case of vanishing duration in the exploration phase, f(t)=\delta(t) . In fact, the same holds for any protocol duration \tau in the limit of vanishing exploration duration. This can be seen by expanding \tilde{f}(2/t_{U})=1-2\langle t_{1}\rangle/t_{U}+... in Eq. ( 22 ), which results in \displaystyle\frac{W_{2}^{\rm opt}}{k_{\rm B}T}=\frac{1}{2}\left(1-\frac{t_{V}}{t_{U}}\right)+\left(1-\frac{t_{V}}{t_{U}}\right)^{2}\frac{\langle t_{1}\rangle}{t_{V}}+\mathcal{O}(\langle t_{1}\rangle^{2})\ , (29) The first term is the negative of the average work done due to the potential switch at time t=0 , i.e., -W_{1} (see first term on the right-hand side of Eq. ( 7 )). Interestingly, to first order there is no dependence on the protocol duration. Intuitively, in this regime the particle has no time to relax in the shallow trap, and the state at the beginning of the protocol is close to the Boltzmann state in the sharp trap. Hence, the optimal protocol is simply to discontinuously switch almost fully back to the sharp trap and remain there for the rest of the protocol duration, and therefore, the total work, W_{1}+W_{2}^{\rm opt} , performed in this limit vanishes. In the opposite limit \zeta^{2}=1 , the particle has time to equilibrate in the exploration phase, and the protocol connects two equilibrium states. In this case, we expect the work in the quasistatic limit to be given by the free energy difference \lim_{r\to 0}\lim_{\tau\to\infty}W_{2}^{*}=\Delta F_{U\to V}^{\text{eq}} , as we verify from Eq. ( 24 ). One can also verify that the two limits commute, i.e. \lim_{\zeta^{2}\to 1}\lim_{\tau\to\infty}W_{2}^{*}=\lim_{\tau\to\infty}\lim_{\zeta^{2}\to 1}W_{2}^{*} . II.4.3 Optimal protocol: Finite-time results An interesting aspect of the optimal protocol is that it is monotonic as a function of the duration \tau , in contrast to the hyperbolic tangent protocol, i.e. , for an optimal protocol, large \tau implies lower mean work. This is seen in Fig.( 5 a), where the solid line shows the mean work associated with the optimal protocol. We also see that the optimal case indeed results in a lower mean work as compared to the hyperbolic tangent protocol, as it should. The late time work in the optimal protocol approaches the bound Eq. 24 , which is different as explained above, from the GL bound Eq. 21 . In Fig. ( 5 b) we quantify this by plotting the difference between the optimal work bound that we obtain and the GL bound Eq. ( 21 ) . We see that we approach the bound monotonically as t_{V}\to t_{U} which is the limit corresponding to the trivial case when both potentials are identical and hence both the mean optimal work and the GL work-bound are zero. These results can be better understood in the light of recent work on geometrical measures of optimal minimum-work or minimum-disspation protocols (see Blaber and Sivak 2023 for a recent review on some of these aspects). To understand these results in our context, we first get the full \tau -dependence of the optimal work W_{2}^{\rm opt} by separating the time-independent and time-dependent terms in Eq. ( 22 ) using Eq. ( 23 ) : \displaystyle W_{2}= \displaystyle\Delta F_{U\to V}^{\text{eq}}+\frac{k_{\rm B}T}{2}\left[\ln\zeta^{2}+(1-\zeta^{2})\right]\ \displaystyle- \displaystyle{k_{B}T}\log\left[\frac{\sqrt{1+\frac{2t_{V}}{\tau}+\frac{\zeta^{2}t_{U}t_{V}}{\tau^{2}}}}{(1+\frac{2t_{V}}{\tau})}+\frac{\sqrt{\zeta^{2}t_{U}t_{V}}}{\tau(1+\frac{2t_{V}}{\tau})}\right] \displaystyle- \displaystyle k_{B}T\frac{t_{U}\zeta^{2}}{\tau}\left[\frac{1}{\zeta}\sqrt{\frac{t_{V}}{t_{U}}}\frac{\sqrt{1+\frac{2t_{V}}{\tau}+\frac{\zeta^{2}t_{U}t_{V}}{\tau^{2}}}}{(1+\frac{2t_{V}}{\tau})}-\frac{(1+\frac{t_{V}}{\tau})}{(1+\frac{2t_{V}}{\tau})}\right] (30) The time-independent terms are just the non-equilibrium free energy difference that we obtained in Eq. ( 24 ). From general considerations Aurell et al. 2011 ; Proesmans et al. 2020 ; Chen et al. 2020 ; Nakazato and Ito 2021a ; Dechant and Sakurai 2019 ; Blaber and Sivak 2023 , we expect the time-dependent terms to be strictly positive for all time and equal to the entropy production in the system due to finite driving speeds. For overdamped systems, the entropy production has been shown to be related to the L^{2} - Wasserstein distance Zhang 2020 ; Nakazato and Ito 2021a ; Dechant and Sakurai 2019 between specified initial and final distributions. As we have emphasized, our problem involves instead changing a potential U to a potential V in a finite time. However the structure is similar Zhong and DeWeese 2022 ; Blaber and Sivak 2023 . While cumbersome in general, it is easy to show in certain limits that the time-dependent terms in Eq. ( II.4.3 ) are indeed related to the L^{2} - Wasserstein distance. If we carry out a large- \tau expansion on the time-dependent terms, it is easy to see that W_{2} can be written as \displaystyle W_{2}= \displaystyle\Delta F_{U\to V}^{\text{eq}}+\frac{k_{\rm B}T}{2}\left[\ln\zeta^{2}+(1-\zeta^{2})\right]\ \displaystyle+\frac{k_{B}T}{2\tau}\left[\sqrt{2t_{V}}-\zeta\sqrt{2t_{U}}\right]^{2} (31) In this limit the \tau -dependent term can be expressed in terms of the square of the L^{2} - Wasserstein distance between two Gaussians, where one of the Gaussians is simply the Boltzmann distribution in the V -trap while the other is a Gaussian in a modified shallow trap with variance D\zeta^{2}t_{U} . This is the Gaussian projection of the steady state as mentioned before. When \zeta^{2}=1 (which is the limit when P_{{\rm ta},U}(x)\rightarrow{P_{{\rm eq},U}(x)} ), the second term in Eq. ( II.4.3 ) vanishes and the third term simplifies to the square of the L^{2} - Wasserstein distance between the two Boltzmann distributions in the harmonic potentials U and V Abiuso et al. 2022 . In this limit Eq. ( II.4.3 ) takes on the form expected from the Jarzynski equality Jarzynski 1997 which connects in this context, the expected value of the work to the variance Speck and Seifert 2004 . It is interesting that Eq. ( II.4.3 ) has this form for any value of \zeta whereas the Jarzynski equality holds strictly when starting from equilibrium. The instantaneous limit \tau\rightarrow 0 can also be taken in Eq. II.4.3 . In this case one recovers Eq. 18 . Details of the limits as well as the derivation of Eq. ( II.4.3 ) are given in Appendix C . Figure 7: a) Work for a scenario where the exploration durations are drawn from a Gamma distribution with different shapes. The value of r,\zeta^{2} as well as the sub-mean probability mass \mathbb{P}_{<} is reported. The dashed line shows the bound when r\to\infty (small fluctuations around mean), and the dot-dashed line r\to 0 (small fluctuations around zero). b) Corresponding probability density for durations of the exploration phase. Parameters are set to t_{U}=4,t_{V}=0.5 and \langle t_{1}\rangle=1 . In all the above, the out-of-equilibrium nature of the initial state is parametrized via \zeta which is itself a function of the strength of potentials U and V as well as the distribution of durations in the exploration phase f(t_{1}) (Eq. 10 ). To understand the role of f(t_{1}) better, we plot Eq. ( II.4.3 ) for a Gamma distribution f(t_{1})=\frac{r^{r\langle t_{1}\rangle}}{\Gamma(r\langle t_{1}\rangle)}e^{-rt_{1}}t_{1}^{r\langle t_{1}\rangle-1} (32) where r\langle t_{1}\rangle\neq 1 corresponds to deviations from the Poissonian case. In the following, we fix the mean duration in the exploration phase \langle t_{1}\rangle=1 and vary r . This changes the shape of the distribution f(t_{1}) . In Fig. ( 7 a) we show the mean work as a function of protocol duration. We see that, for all protocol durations, W_{2} increases with r . To relate this to the shape of f(t_{1}) , we see that \mathbb{P}_{<}=\int_{0}^{\langle t_{1}\rangle}dtf(t) grows as r decreases. This implies that large fluctuations which enable stochastic realizations with sub-mean exploration duration result in a lower work value while suppressing fluctuations in f(t_{1}) results in higher work values. This is in line with our previous discussions on Eq.( 28 ) which showed that the lesser the time in the exploration phase, the lower is the value of W_{2} . Indeed, when r\to 0 the probability accumulates at zero (Fig.( 7 b) ), resulting in the same work as the bound in Eq.( 28 ). III Discussion and Outlook We have investigated the connections between the thermodynamic cost of an experimental procedure which has been used to implement resetting Besga et al. 2020 ; Faisant et al. 2021 ; Goerlich et al. 2024 and earlier well studied problems of information erasure Esposito and den Broeck 2011 ; Parrondo et al. 2015 and geometric measures of optimal protocols that minimise work or heat in overdamped stochastic systems Aurell et al. 2011 ; Abiuso et al. 2022 ; Dechant and Sakurai 2019 ; Nakazato and Ito 2021a ; Zhang 2020 ; Proesmans et al. 2020 ; Blaber and Sivak 2023 . The problem we study is very similar to those studied in the above contexts, but a few important distinguishing aspects are the out-of-equilibrium nature of the system we study, the moment generating function of work from which we can, in principle, obtain all moments of the work for this system, as well as the explicit expression we obtain for the optimal work Eq. ( II.4.3 ) which holds for all protocol durations \tau and not just in the slow and fast limits as often studied. We see from the expressions for the optimal work that at late times Eq. ( II.4.3 ) appears to be the square of a L^{2} -Wasserstein distance between two Gaussians, one of which has a variance D\zeta^{2}t_{U} . The non-dimensional length \zeta itself depends on both potentials U and V as well as the waiting time f(t) in a non-trivial manner (Eq. 10 ). In addition this length scale quantifies the variance of the projected state \pi[P_{\text{ta},U}](x) . This seems to suggest that, at least for some results, we can replace our non-equilibrium steady state P_{\text{ta},U} by a Gaussian with the same mean and variance, if all manipulations are only done via harmonic traps. It would be interesting to see how general this result is and whether it translates to other non-harmonic potentials. It would be very interesting to investigate optimal protocols further in the context of erasure of out-of-equilibrium states. In particular, it would be very illuminating to understand if there are trade-offs between minimising the mean work and minimising the variance Solon and Horowitz 2018 ; Watanabe and Minami 2022 of the work done or the heat dissipated and if this results in phase-transitions in protocol space Solon and Horowitz 2018 . It would also be interesting to understand if there are cases when these protocols can be non-monotonic as observed in Zhong and DeWeese 2022 . Investigating the so-called thermodynamic metric structure of the optimal-protocol-parameter space Sivak and Crooks 2012 ; Wadia et al. 2022 ; Ito 2023 ; Chennakesavalu and Rotskoff 2023 is yet another interesting direction to pursue, as is also the study of optimal transport in discrete cases Van Vu and Saito 2023 . Finally, coming back to the context of resetting, it is very interesting to also understand thermodynamic costs when there is an absorbing barrier. Such an analysis has been done in Pal et al. 2023 , though resetting has been implemented there by considering a first passage excursion to a specific point in a trap, unlike in our case when resetting is considered as accomplished when the Boltzmann distribution in the trap has been reached. It would be very interesting to carry out a similar analysis as done in Pal et al. 2023 for our case. Understanding the nature of optimal protocols in the presence of absorbing barriers could also be very interesting. IV Acknowledgment All the authors are very grateful to Satya Majumdar and Sergio Ciliberto for inspiring discussions on this problem during the Nordita conference “Measuring and Manipulating Non-Equilibrium Systems” in Stockholm (14-24, October, 2024). SK would also like to thank Patrizia Vignolo for an interesting discussion during the Indo-French workshop on ”Classical and quantum dynamics in out of equilibrium systems”, held at ICTS, Bengaluru, Dec 16th-20th, 2024. DG gratefully acknowledges the financial support provided by NORDITA and Stockholm University, as well as the support from the Special Research Fund (BOF) of Hasselt University (BOF number: BOF24KV10) during the academic visit in May–June 2024, which facilitated this collaboration. DG and KSO acknowledge support from the Alexander von Humboldt foundation. S.K acknowledges the support of the Swedish Research Council through the grant 2021-05070. Appendix A Cumulants of the work In this section, we provide the detailed calculation of the computation of the first moment [i.e., n=1 in Eq. ( 6 )] of the work: \displaystyle\langle w\rangle=\langle w_{1}\rangle+\langle w_{2}\rangle\ . (A1) Since the erasing protocol involves an instantaneous jump at time t=0 , the average work W_{1}\equiv\langle w_{1}\rangle is computed by performing the average of Eq. ( 2 ) over the initial equilibrium distribution P_{{\rm eq},V}(x) , and it gives: \displaystyle W_{1}=\int_{-\infty}^{+\infty}~dx~P_{{\rm eq},V}(x)[U(x)-V(x)]\ . (A2) When both resetting and the exploration potentials are harmonic with distinct stiffnesses \lambda_{V} (stiff-trap) and \lambda_{U} (shallow-trap), the above integral ( A2 ) can be evaluated easily: \displaystyle W_{1}=\dfrac{\lambda_{U}-\lambda_{V}}{2}Dt_{V}\ , (A3) for the stiff-trap’s relaxation time t_{V}\equiv(\beta D\lambda_{V})^{-1} . The average work W_{2}\equiv\langle w_{2}\rangle can be computed as follows. First, we average the right-hand side of Eq. ( 3 ) over the thermal noise’s history, i.e, an ensemble of trajectories for a fixed initial condition x_{0}^{(U)} : \displaystyle\langle w_{2}\rangle_{0,x_{0}^{(U)}}=\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}\langle x^{2}\rangle_{0,x_{0}^{(U)}}\ , (A4) where x_{0}^{(U)} is the position at the beginning of the resetting phase, and the subscript “0” denotes that this is an average over trajectories only during the interval that the control parameter changes. The position’s second moment in the integrand ( A4 ) due to change in the potential U to V (in the resetting phase) is \displaystyle\langle x^{2}\rangle_{0,x_{0}^{(U)}}=[x_{0}^{(U)}]^{2}G(t,0)+2D\int_{0}^{t}~ds~G(t,s)\ , (A5) for \displaystyle G(t,s)\equiv e^{-2\beta D\int_{s}^{t}~dt^{\prime}\lambda(t^{\prime})}\ . (A6) Then, the average work W_{2} in the resetting phase is computed by performing the average of Eq. ( A4 ) over x_{0}^{(U)} with respect to the time-average position density \displaystyle P_{{\rm ta},U}(x)\equiv\int_{0}^{\infty}~f(t)~\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})P_{U}(x,t|x_{0})\ , (A7) for the resetting time-interval density f(t) , the propagator in the exploration phase P_{U}(x,t|x_{0}) , and equilibrium distribution in the stiff-potential (or the distribution at the beginning of the exploration phase) P_{{\rm eq},V}(x_{0}) \displaystyle W_{2}=\int_{0}^{\infty}~dt^{\prime\prime}~f(t^{\prime\prime})~\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t^{\prime\prime}|x_{0})~\langle w_{2}\rangle_{0,x_{0}^{(U)}}\ . (A8) On the right-hand side, we first notice that \displaystyle P_{U}(x,t)\equiv\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0}^{(V)})~P_{U}(x,t|x_{0})=\dfrac{1}{\sqrt{2\pi\sigma_{t}^{2}}}\exp\bigg[-\dfrac{x^{2}}{2\sigma_{t}^{2}}\bigg]\ , (A9) where the variance in the exploration phase is \displaystyle\sigma_{t}^{2}\equiv Dt_{V}e^{-2t/t_{U}}+Dt_{U}(1-e^{-2t/t_{U}})\ , (A10) for the U -trap’s relaxation time t_{U}\equiv(\beta D\lambda_{U})^{-1} . Then, Eq. ( A8 ) becomes: \displaystyle W_{2} \displaystyle=\int_{0}^{\infty}~dt~f(t)~\int_{-\infty}^{+\infty}~dx~P_{U}(x,t)~\langle w_{2}\rangle_{0,x}\ . (A11) Using Eq. ( A4 ) in Eq. ( A8 ), we get \displaystyle W_{2} \displaystyle=\dfrac{D}{2}\int_{0}^{\tau}~dt~\dot{\lambda}\bigg[t_{U}\zeta^{2}G(t,0)+4\int_{0}^{t}~ds~G(t,s)\bigg]\ , (A12) where we can now define a dimensionless length \displaystyle\zeta\equiv\sqrt{1-(1-t_{V}/t_{U})\tilde{f}(2/t_{U})}\ . (A13) A.1 Second cumulant Using Eq. ( 6 ) we can compute the second moment W^{2}\equiv\langle w^{2}\rangle of the work. This will give us three contributions: \displaystyle W^{2}=I_{1}+I_{2}+I_{3}\ . (A14) In the following, we compute each of these contributions for harmonic exploration (shallow) and resetting (stiff) traps. Let us first compute I_{1} : \displaystyle I_{1} \displaystyle=\int_{0}^{t}~dt~f(t)~\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t|x_{0})w_{1}^{2}(x_{0})=\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})~w_{1}^{2}(x_{0}) (A15) \displaystyle=\dfrac{3}{4}D^{2}t_{V}^{2}(\lambda_{U}-\lambda_{V})^{2}\ , (A16) where we used the definition of w_{1}(x) given in Eq. ( 2 ). The computation of I_{2} is as follows: \displaystyle I_{2} \displaystyle=\int_{0}^{t}~dt~f(t)~\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t|x_{0})\langle w_{2}^{2}\rangle_{0,x_{0}^{(U)}} \displaystyle=\int_{0}^{\tau}~dt_{1}\int_{0}^{\tau}~dt_{2}~\dfrac{\dot{\lambda}(t_{1})}{2}~\dfrac{\dot{\lambda}(t_{2})}{2}A(t_{1},t_{2})\ , (A17) where A(t_{1},t_{2}) is given in Eq. ( E108 ) (see Appendix E for more details). Now let us compute I_{3} . We have \displaystyle I_{3} \displaystyle=2\int_{0}^{\infty}~dt^{\prime}~f(t^{\prime})~\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t^{\prime}|x_{0})w_{1}(x_{0})\langle w_{2}\rangle_{0,x_{0}^{(U)}} (A18) \displaystyle=(\lambda_{U}-\lambda_{V})\int_{0}^{\infty}~dt^{\prime}~f(t^{\prime})\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})~\int_{-\infty}^{+\infty}~dx_{0}^{(U)}~P_{U}(x_{0}^{(U)},t^{\prime}|x_{0})~x_{0}^{2}~\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}\langle x^{2}\rangle_{0,x_{0}^{(U)}}\ . (A19) Substituting the propagator of a Brownian particle in the exploration phase at time t : \displaystyle P_{U}(x,t|y)=\dfrac{\exp\bigg[-\dfrac{(x-y~e^{-t/t_{U}})^{2}}{2Dt_{U}(1-e^{-2t/t_{U}})}\bigg]}{\sqrt{2\pi Dt_{U}(1-e^{-2t/t_{U}})}}\ , (A20) and \langle x^{2}\rangle_{0,x_{0}^{(U)}} ( A5 ) on the right-hand side and integrating over x_{0}^{(U)} , we get \displaystyle I_{3} \displaystyle=(\lambda_{U}-\lambda_{V})\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}\int_{0}^{\infty}~dt^{\prime}~f(t^{\prime})\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm eq},V}(x_{0})~ \displaystyle\times\bigg[\bigg(x_{0}^{4}e^{-2t^{\prime}/t_{U}}+x_{0}^{2}Dt_{U}(1-e^{-2t^{\prime}/t_{U}})\bigg)~G(t,0)+2D\int_{0}^{t}~ds~G(t,s)\bigg] (A21) \displaystyle=(\lambda_{U}-\lambda_{V})~\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}\bigg[D^{2}t_{U}t_{V}\big[1-\tilde{f}(2/t_{U})\big(1-3t_{V}/t_{U}\big)\big]~G(t,0)+2D^{2}t_{V}\int_{0}^{t}~ds~G(t,s)\bigg]\ . (A22) Thus, summing I_{1} ( A16 ), I_{2} ( A22 ), and I_{3} ( A22 ), we get the second moment of work ( A14 ). By subtracting the square of the mean work ( A1 ), we can get the second cumulant of the work. Appendix B Average work for the \tanh protocol: Long-time expansion The specific protocol we consider, motivated by recent experiments Goerlich et al. 2024 is \displaystyle\lambda(t)=\lambda_{U}+(\lambda_{V}-\lambda_{U})\tanh[t/t^{*}] (B23) In the slowest protocol limit ( t^{*}\to\infty ), we can write \displaystyle\lambda(t)\approx\lambda_{U}+(\lambda_{V}-\lambda_{U})t/t^{*}=\lambda_{U}(1+\alpha t) (B24) \displaystyle\alpha\equiv\frac{\lambda_{V}-\lambda_{U}}{\lambda_{U}t^{*}} (B25) In the slowest protocol limit t^{*}\to\infty\implies\alpha\to 0 with the product \alpha t^{*} fixed so that \alpha t^{*}=\frac{\lambda_{V}-\lambda_{U}}{\lambda_{U}} . Henceforth we will replace t^{*} by \tau (since these are the same for a linear protocol). In terms of the variables t_{U}\equiv(\beta D\lambda_{U})^{-1} and t_{V}\equiv(\beta D\lambda_{V})^{-1} \displaystyle\alpha\tau=\frac{t_{U}}{t_{V}}-1 (B26) We are interested in estimating this expression \displaystyle W_{2}=\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}\bigg[\underbrace{\bigg(\int~dx_{0}~x_{0}^{2}~P_{\rm ss}(x_{0})\bigg)}_{\sigma_{\rm ss}^{2}}G(t,0)+2D\int_{0}^{t}~ds~G(t,s)\bigg]\ , (B27) where \displaystyle\sigma_{\rm ss}^{2}=Dt_{U}\zeta^{2}\ . (B28) and \zeta is the dimensionless length Eq. ( 10 ) introduced in the text. \zeta depends on both potentials as well as the distribution of times f(t) in the exploration phase. For example, in the case of an exponential distribution f(t)=re^{-rt} corresponding to a Poissonian resetting rate r , \displaystyle\zeta^{2}=\left(\frac{rt_{V}+2}{rt_{U}+2}\right)\ . (B29) and \displaystyle\sigma_{\rm ss}^{2}(r)=Dt_{U}\left(\frac{rt_{V}+2}{rt_{U}+2}\right)\ . (B30) We will now get both the limiting value as well as the first-order correction as \tau\rightarrow\infty . We use the method sketched in Kwon et al. 2013 to expand W_{2} to first order in \alpha . To do this, note that we can write W_{2} as \displaystyle W_{2}=\int_{0}^{\tau}~dt~\dfrac{\dot{\lambda}}{2}G(t,0)\bigg[\underbrace{\bigg(\int~dx_{0}~x_{0}^{2}~P_{\rm ss}(x_{0})\bigg)}_{\sigma_{\rm ss}^{2}}+2D\int_{0}^{t}~ds~g(s,0)\bigg]\ , (B31) where \displaystyle G(t,0)\equiv e^{-2\int_{0}^{t}~dt^{\prime}\frac{\lambda(t^{\prime})}{\gamma}}=e^{-(2\lambda_{U}/\gamma)(t+\alpha t^{2}/2)} (B32) and \displaystyle g(s,0)\equiv e^{2\int_{0}^{s}~dt^{\prime}\frac{\lambda(t^{\prime})}{\gamma}}=e^{(2\lambda_{U}/\gamma)(s+\alpha s^{2}/2)} (B33) where \gamma=\frac{k_{B}T}{D} . Substituting the value of \lambda(t) in Eq. ( B31 ) gives us two terms: \displaystyle W_{2}={\rm T}_{1}+{\rm T}_{2}\, (B34) where \displaystyle{\rm T}_{1} \displaystyle\equiv\dfrac{\alpha\lambda_{U}}{2}\sigma_{\rm ss}^{2}\int_{0}^{\tau}~dt~G(t,0) (B35) \displaystyle{\rm T}_{2} \displaystyle\equiv\alpha\lambda_{U}D\int_{0}^{\tau}~dt~\int_{0}^{t}~ds~g(s,0) (B36) We discuss first the following integral from T 2 : \displaystyle I\equiv D\lambda_{U}\alpha\int_{0}^{t}~ds~g(s,0) (B37) We make a change of variables (as done in Kwon et al. 2013 ) \displaystyle u^{\prime}=\frac{\lambda_{U}\alpha s}{\lambda_{V}-\lambda_{U}} (B38) with this change of variables \displaystyle I=\lambda_{U}\alpha\int_{0}^{t}~ds~g(s,0)=D(\lambda_{V}-\lambda_{U})\int_{0}^{u}du^{\prime}e^{2bu^{\prime}+c{u^{\prime}}^{2}}\ . (B39) where u\equiv\frac{\lambda_{U}\alpha t}{\lambda_{V}-\lambda_{U}} , b=\frac{\lambda_{V}-\lambda_{U}}{\gamma\alpha} and c=\frac{(\lambda_{V}-\lambda_{U})^{2}}{\gamma\lambda_{U}\alpha} . \displaystyle I=D(\lambda_{V}-\lambda_{U})\int_{0}^{u}~du^{\prime}~e^{c((2b/c)u^{\prime}+{u^{\prime}}^{2})} (B40) Note that both b and c diverge as \alpha\rightarrow 0 . We will now perform an expansion of O(\alpha) . We make a further change of variables z=b/c+u^{\prime} , with this the integral of interest becomes \displaystyle I=D(\lambda_{V}-\lambda_{U})e^{-b^{2}/c}\int_{b/c}^{u+b/c}dz~e^{cz^{2}} (B41) We make a third change of variables s=cz^{2} at which point the integral becomes \displaystyle I\equiv D(\lambda_{V}-\lambda_{U})\frac{e^{-b^{2}/c}}{2\sqrt{c}}\int_{b^{2}/c}^{c(u+b/c)^{2}}ds\frac{e^{s}}{\sqrt{s}} (B42) We integrate this by parts to get \displaystyle I \displaystyle=D(\lambda_{V}-\lambda_{U})\frac{e^{-b^{2}/c}}{2\sqrt{c}}\left[\frac{e^{s}}{\sqrt{s}}+\frac{e^{s}}{2s^{3/2}}\right] (B43) \displaystyle=D(\lambda_{V}-\lambda_{U})\frac{e^{-b^{2}/c}}{2\sqrt{c}}\frac{e^{s}}{\sqrt{s}}\bigg(1+\frac{1}{2s}\bigg) (B44) to be evaluated at the limits of the integral. \displaystyle I=D(\lambda_{V}-\lambda_{U})\frac{e^{-b^{2}/c}}{2\sqrt{c}}\bigg[\frac{e^{c(u+b/c)^{2}}}{(u+b/c)\sqrt{c}}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)-\frac{e^{b^{2}/c}}{b/\sqrt{c}}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg] (B45) \displaystyle=\frac{D(\lambda_{V}-\lambda_{U})}{2c}\bigg[\frac{e^{cu^{2}+2bu}}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)-\frac{1}{b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg] (B46) We hence have, \displaystyle W_{2}=\int_{0}^{\tau}G(t,0)\left[\frac{\lambda_{U}\alpha}{2}\sigma_{\rm ss}^{2}+I(u(t))\right]dt (B47) Making a change of variables from t to u , \displaystyle W_{2} \displaystyle=\int_{0}^{1}G(u,0)\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}+ \displaystyle+\frac{D(\lambda_{V}-\lambda_{U})^{2}}{2c\lambda_{U}\alpha}\bigg[\frac{e^{cu^{2}+2bu}}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)-\frac{1}{b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg]du (B48) \displaystyle=\int_{0}^{1}G(u,0)\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}+ \displaystyle+\dfrac{\gamma D}{2}\bigg[\frac{e^{cu^{2}+2bu}}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)-\frac{1}{b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg]du (B49) Let us evaluate the the following terms: \displaystyle G(u,0) \displaystyle=\exp\bigg[-\frac{2\lambda_{U}}{\gamma\alpha}\bigg(\xi u+\frac{\xi^{2}u^{2}}{2}\bigg)\bigg] (B50) \displaystyle e^{cu^{2}+2bu} \displaystyle=\exp\bigg[\frac{\lambda_{U}}{\gamma\alpha}\frac{(\lambda_{V}-\lambda_{U})^{2}}{\lambda_{U}^{2}}u^{2}+2\dfrac{\lambda_{U}}{\gamma\alpha}\dfrac{\lambda_{V}-\lambda_{U}}{\lambda_{U}}u\bigg] (B51) \displaystyle=\exp\bigg[\frac{2\lambda_{U}}{\gamma\alpha}\bigg(\dfrac{\xi^{2}u^{2}}{2}+\xi u\bigg)\bigg] (B52) where \xi\equiv\frac{\lambda_{V}-\lambda_{U}}{\lambda_{U}} . Hence, \displaystyle W_{2} \displaystyle=\int_{0}^{1}\bigg[G(u,0)\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}+ \displaystyle+\dfrac{\gamma D}{2}\bigg[\frac{1}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)-\frac{G(u,0)}{b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg]du (B53) \displaystyle=\int_{0}^{1}du~G(u,0)\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}-\frac{\gamma D}{2b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg]+ \displaystyle+\int_{0}^{1}~du~\dfrac{\gamma D}{2}\bigg[\frac{1}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)\bigg]du (B54) \displaystyle={\rm II}+{\rm III}\ . (B55) \displaystyle{\rm II} \displaystyle=\sqrt{\frac{\pi\alpha\gamma}{4\xi^{2}\lambda_{U}}}~e^{\frac{\lambda_{U}}{\alpha\gamma}}\left[\text{Erf}\left(\frac{\xi+1}{\sqrt{\frac{\alpha\gamma}{\lambda_{U}}}}\right)-\text{Erf}\left(\frac{1}{\sqrt{\frac{\alpha\gamma}{\lambda_{U}}}}\right)\right]\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}-\frac{\gamma D}{2b}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg] (B56) \displaystyle\approx\sqrt{\frac{\pi\alpha\gamma}{4\xi^{2}\lambda_{U}}}\bigg[\frac{\sqrt{\alpha}\sqrt{\frac{\gamma}{\lambda_{U}}}}{\sqrt{\pi}}-\frac{\sqrt{\alpha}\sqrt{\frac{\gamma}{\lambda_{U}}}e^{\frac{-\xi^{2}\lambda_{U}-2\xi\lambda_{U}}{\alpha\gamma}}}{\sqrt{\pi}(\xi+1)}\bigg]\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}-\frac{\gamma D}{2b/c}\bigg(1+\frac{1}{2b^{2}/c}\bigg)\bigg] (B57) \displaystyle\approx\dfrac{\alpha\gamma}{2\xi\lambda_{U}}\bigg[\frac{\lambda_{V}-\lambda_{U}}{2}\sigma_{\rm ss}^{2}-\dfrac{k_{\rm B}T}{2}\dfrac{\lambda_{V}-\lambda_{U}}{\lambda_{U}}\bigg] (B58) and: \displaystyle{\rm III} \displaystyle=\dfrac{\gamma D}{2}\int_{0}^{1}~du~\bigg[\frac{1}{u+b/c}\bigg(1+\frac{1}{2c(u+b/c)^{2}}\bigg)du (B60) \displaystyle=\dfrac{k_{\rm B}T}{2}\bigg[\ln\left(\frac{\lambda_{V}}{\lambda_{U}}\right)+\frac{\alpha\gamma\left(1-\frac{\lambda_{U}^{2}}{\lambda_{V}^{2}}\right)}{4\lambda_{U}}\bigg] (B61) Putting these two integrals together the \mathcal{O}(\alpha^{0}) term becomes \displaystyle W_{2}[\mathcal{O}(\alpha^{0})]=\dfrac{k_{\rm B}T}{2}\ln\left(\frac{\lambda_{V}}{\lambda_{U}}\right)=\dfrac{k_{\rm B}T}{2}\ln\left(\frac{t_{U}}{t_{V}}\right) (B62) The term \mathcal{O}(\alpha^{1}) is \displaystyle W_{2}[\mathcal{O}(\alpha^{1})] \displaystyle=\dfrac{\gamma}{4}\sigma_{\rm ss}^{2}+\dfrac{k_{\rm B}T}{2}\frac{\gamma\left(1-\frac{\lambda_{U}^{2}}{\lambda_{V}^{2}}\right)}{4\lambda_{U}}-\dfrac{k_{\rm B}T\gamma}{4\lambda_{U}} (B63) \displaystyle=\dfrac{k_{\rm B}T}{4}t_{U}\zeta^{2}+\dfrac{k_{\rm B}T}{8}t_{U}\left(1-\frac{t_{V}^{2}}{t_{U}^{2}}\right)-\dfrac{k_{\rm B}Tt_{U}}{4} (B64) \displaystyle=\dfrac{k_{\rm B}T}{4}t_{U}\bigg[\zeta^{2}-\dfrac{1}{2}\left(1+\frac{t_{V}^{2}}{t_{U}^{2}}\right)\bigg] (B65) As an example, for f(t)=re^{-rt} , this term becomes \displaystyle W_{2}[\mathcal{O}(\alpha^{1})] \displaystyle=\dfrac{\gamma}{4}\sigma_{\rm ss}^{2}+\dfrac{k_{\rm B}T}{2}\frac{\gamma\left(1-\frac{\lambda_{U}^{2}}{\lambda_{V}^{2}}\right)}{4\lambda_{U}}-\dfrac{k_{\rm B}T\gamma}{4\lambda_{U}} (B66) \displaystyle=\dfrac{k_{\rm B}T}{4}t_{U}\dfrac{2+rt_{V}}{2+rt_{U}}+\dfrac{k_{\rm B}T}{8}t_{U}\left(1-\frac{r^{2}t_{V}^{2}}{r^{2}\lambda_{U}^{2}}\right)-\dfrac{k_{\rm B}Tt_{U}}{4} (B67) \displaystyle=\dfrac{k_{\rm B}T}{4}t_{U}\bigg[\dfrac{2+rt_{V}}{2+rt_{U}}-\dfrac{1}{2}\left(1+\frac{r^{2}t_{V}^{2}}{r^{2}t_{U}^{2}}\right)\bigg] (B68) Eq. ( B68 ) multiplied by \alpha is the correction to the equilibrium free energy cost Eq. ( B62 ) at late times. An important point where this result deviates from the case studied in Kwon et al. 2013 is that the sign of the correction term Eq. ( B62 ) can be negative or positive. This implies that shorter protocols could have a lower or a higher work cost depending on the parameters. In contrast, in Kwon et al. 2013 , the sign of the correction term is always positive implying that shorter protocol durations always cost more. This is because in Kwon et al. 2013 , the protocol operates between the equilibrium states in the two traps, unlike the case we study here. Finally, we provide some details of the steps involved in approximating the {\rm Erf} function in Eq. ( B56 ) to get Eq. ( B57 ). \displaystyle{\rm IG}\equiv\int_{0}^{1}~du~G(u,0) \displaystyle=\int_{0}^{1}~du~\exp\bigg[-\frac{\lambda_{U}}{\gamma\alpha}\bigg(2\xi u+\xi^{2}u^{2}\bigg)\bigg] (B69) \displaystyle=\int_{0}^{1}~du~\exp\bigg[-\frac{\lambda_{U}\xi^{2}}{\gamma\alpha}\bigg(2u/\xi+u^{2}\bigg)\bigg] (B70) \displaystyle=e^{\lambda_{U}/(\gamma\alpha)}\int_{0}^{1}~du~\exp\bigg[-\frac{\lambda_{U}\xi^{2}}{\gamma\alpha}\bigg(1/\xi+u\bigg)^{2}\bigg] (B71) Substituting \frac{\lambda_{U}\xi^{2}}{\gamma\alpha}\bigg(1/\xi+u\bigg)^{2}=z , then we have \displaystyle 2\frac{\lambda_{U}\xi^{2}}{\gamma\alpha}\bigg(1/\xi+u\bigg)du=dz\implies du=\dfrac{dz}{2\frac{\lambda_{U}\xi^{2}}{\gamma\alpha}\bigg(1/\xi+u\bigg)} (B72) \displaystyle=\dfrac{dz}{2\sqrt{z}\sqrt{\frac{\lambda_{U}\xi^{2}}{\gamma\alpha}}} (B73) \displaystyle{\rm IG} \displaystyle=\dfrac{\sqrt{\gamma\alpha}}{2\xi\sqrt{\lambda_{U}}}e^{\lambda_{U}/(\gamma\alpha)}\int_{\frac{\lambda_{U}}{\gamma\alpha}}^{\frac{\lambda_{U}}{\gamma\alpha}(1+\xi)^{2}}~du~\dfrac{e^{-z}}{\sqrt{z}} (B74) \displaystyle=\dfrac{1}{2\xi}\dfrac{\gamma\alpha}{\lambda_{U}}\bigg[1-\dfrac{e^{-\lambda_{U}/(\gamma\alpha)(\xi^{2}+2\xi)}}{1+\xi}\bigg] (B75) Appendix C Derivation of the optimal protocol Here we derive the details of the optimal protocols used in the main text. The optimal protocol connects the exploration phase, with trap stiffness \lambda_{U} , to the relaxation phase in the sharper trap with stiffness \lambda_{V} . When the protocol begins, the particle is in the state given by Eq. ( 13 ), which for brevity we repeat here as P_{{\rm ta},U}(x_{0})=\int_{0}^{\infty}~dt_{1}~f(t_{1})~\int_{-\infty}^{+\infty}~dy~P_{{\rm eq},V}(y)P_{U}(x_{0},t_{1}|y)\ . (C76) The average work due to changing the stiffness during the protocol reads W_{2}[\{\lambda_{t}\}]=\int_{0}^{\tau}dt\left\langle\partial_{\lambda_{t}}\mathcal{U}(x_{t},\lambda_{t})\dot{\lambda}_{t}\right\rangle\ , (C77) which reduces n=1 and m=0 term on the right-hand side of Eq. ( 6 ). The optimal protocol \lambda_{t}^{\rm opt} is the one that minimizes the work functional, \frac{\delta W_{2}[\{\lambda_{t}^{\rm opt}\}]}{\delta_{\lambda_{t}^{\rm opt}}}=0 . The harmonic trap during the protocol phase is denoted \mathcal{U}(x_{t},\lambda_{t})=\frac{\lambda_{t}}{2}x_{t}^{2}\ , (C78) and has a stiffness that is subject to the boundary conditions \lambda_{0}\equiv\lambda_{U} and \lambda_{\tau}\equiv\lambda_{V} . Here, the protocol duration is fixed to \tau , and t\in(0,\tau) parametrizes the time-evolution throughout the protocol. Following Ref. Schmiedl and Seifert 2007a , we can write the mean work as W_{2}=\frac{1}{2}\left[\mathcal{V}_{t}\lambda_{t}-D\gamma\ln\mathcal{V}_{t}\right]_{0}^{\tau}+\frac{\gamma}{4}\int_{0}^{\tau}dt\frac{\dot{\mathcal{V}}_{t}^{2}}{\mathcal{V}_{t}}\ , (C79) where \mathcal{V}_{\tau}\equiv\langle x_{\tau}^{2}\rangle is shorthand notation for the variance during the protocol. The first term ( C79 ) represents boundary contributions, while the integral in the second term can be interpreted as an action to be minimized with respect to the trajectory of \mathcal{V}_{t} . The Euler-Lagrange equation takes the form [\dot{\mathcal{V}}_{t}]^{2}=2\mathcal{V}_{t}\ddot{\mathcal{V}}_{t} , with its solution \displaystyle\mathcal{V}_{t}=c_{1}(1+c_{2}t)^{2}\ . (C80) The two coefficients c_{i} can be found through the boundary conditions of the protocol. We immediately see that \mathcal{V}_{0}=c_{1} , and since at the beginning of the protocol the particle is in the state given by Eq.( C76 ), we have \displaystyle c_{1} \displaystyle=\langle x^{2}\rangle_{\text{ta,U}}=\int_{0}^{\infty}dtf(t)\int_{-\infty}^{+\infty}dx_{0}~P_{V}^{\text{eq}}(x_{0})~P_{U}(x,t|x_{0})~x^{2} (C81) \displaystyle=\int_{0}^{\infty}dtf(t)\int_{-\infty}^{+\infty}dx_{0}~P^{\rm eq}_{V}(x_{0})\left[x_{0}^{2}e^{-2t/t_{U}}+Dt_{U}(1-e^{-2t/t_{U}})\right] (C82) \displaystyle=Dt_{U}\zeta^{2}, (C83) where we substituted the dimensionless length \zeta definied in Eq. ( 10 ). The remaining constant, c_{2} , is found by directly minimizing the work W_{2}=\frac{k_{B}T}{2}\frac{t_{U}}{t_{V}}\zeta^{2}(1+c_{2}\tau)^{2}-k_{B}T\ln[1+c_{2}\tau]-\frac{k_{B}T}{2}\zeta^{2}+k_{B}Tc_{2}^{2}\tau t_{U}\zeta^{2}\ . (C84) with respect to c_{2} , i.e. by solving \partial_{c_{2}}W_{2}(c_{2})=0 . This gives c_{2}=\frac{\sqrt{\left(\frac{\tau}{\zeta^{2}t_{U}}\left(2+\tau/t_{V}\right)+1\right)}-\left(1+\tau/t_{V}\right)}{\tau\left(2+\tau/t_{V}\right)}\ . (C85) Substituting this c_{2} in W_{2} ( C84 ) gives W_{2}^{\rm opt} ( 22 ) as reported in the main text. Substituting c_{1} and c_{2} in Eq. ( C80 ), we obtain \mathcal{V}_{t}^{\rm opt} . To obtain the optimal protocol \lambda_{t}^{\rm opt} , we then use the equation of motion for the variance, \dot{\mathcal{V}}=-2D\beta\lambda\mathcal{V}+2D , which ultimately gives \lambda_{t}^{\rm opt}=\gamma\frac{1-t_{U}\zeta^{2}c_{2}(1+c_{2}t)}{t_{U}\zeta^{2}(1+c_{2}t)^{2}}\ , (C86) for c_{2} given in Eq. ( C85 ). Figure C1: a) For finite protocol durations, the optimal protocol has regions where the associated work is higher or smaller than the equilibrium free energy difference. We have used f(t)=re^{-rt} . For slow protocols, the work is always less than the equilibrium free energy, as discussed in the main text. Here rt_{U}=3 . b) Example optimal protocol, for rt_{U}=4,rt_{V}=1,r\tau=1 . c) The optimal protocol has discontinuous jumps at its initial and final stages. While the initial jump discontinuity remains finite and approaches a constant as protocol duration is increased (dot-dashed line), the final jump goes to zero. This remaining asymmetry of the jumps in the quasistatic limit is a signature of the non-equilibrium initial state. Indeed, as \tau\to\infty the initial jump is exactly the jump needed to match the variance of the initial state [given by Eq.( C83 )]. Here, rt_{U}=4 and rt_{V}=0.5 . We can separate the time-independent and time-dependent terms in Eq. C84 using Eq. C85 to get: \displaystyle W_{2}= \displaystyle\Delta F_{U\to V}^{\text{eq}}+\frac{k_{\rm B}T}{2}\left[\ln\zeta^{2}+(1-\zeta^{2})\right]\ -{k_{B}T}\log\left[\frac{\sqrt{1+\frac{2t_{V}}{\tau}+\frac{\zeta^{2}t_{U}t_{V}}{\tau^{2}}}}{(1+\frac{2t_{V}}{\tau})}+\frac{\sqrt{\zeta^{2}t_{U}t_{V}}}{\tau(1+\frac{2t_{V}}{\tau})}\right] \displaystyle- \displaystyle k_{B}T\frac{t_{U}\zeta^{2}}{\tau}\left[\frac{1}{\zeta}\sqrt{\frac{t_{V}}{t_{U}}}\frac{\sqrt{1+\frac{2t_{V}}{\tau}+\frac{\zeta^{2}t_{U}t_{V}}{\tau^{2}}}}{(1+\frac{2t_{V}}{\tau})}-\frac{(1+\frac{t_{V}}{\tau})}{(1+\frac{2t_{V}}{\tau})}\right] (C87) While cumbersome in general, it is easy to show in certain limits that the time-dependent terms in Eq. C are indeed related to the L^{2} - Wasserstein distance. If we carry out a large- \tau expansion on the time-dependent terms, it is easy to see that W_{2} can be written as W_{2}=\Delta F_{U\to V}^{\text{eq}}+\frac{k_{\rm B}T}{2}\left[\ln\zeta^{2}+(1-\zeta^{2})\right]\ +\frac{k_{B}T}{2\tau}\left[\sqrt{2t_{V}}-\zeta\sqrt{2t_{U}}\right]^{2} (C88) Interestingly the \tau -dependent term can be written as the square of a L^{2} - Wasserstein distance between two Gaussians, where one of the Gaussians is simply the Boltzmann distribution in the V -trap while the other is a Gaussian in a modified shallow trap with variance D\zeta^{2}t_{U} , which is the Gaussian projection of the steady state as mentioned before. When \zeta=1 (which is the equilibrium limit), the term simplifies to the square of a L^{2} - Wasserstein distance between the two Gaussian equilibrium Boltzmann distributions in the harmonic potentials U and V . To do the small- \tau expansion, multiply and divide the terms in both square brackets in Eq. ( C ) by \tau and expand upto \mathcal{O}(\tau^{1}) . The first term gives a \tau -independent contribution to highest order while the highest order contribution of the second term is \mathcal{O}(\tau^{1}) . Appendix D Proof of Eq. ( 21 ) In this section, we provide the intermediate steps to obtain the GL-bound mentioned in the main text. To this end, we follow Ref. Esposito and den Broeck 2011 . The KL divergence between the time-dependent and the instantaneous equilibrium distribution is \displaystyle D_{\rm KL}[\rho(t)||\rho^{\rm eq}(t)] \displaystyle\equiv\int~dx~\rho(x,t)\ln\dfrac{\rho(x,t)}{\rho^{\rm eq}(x,t)} (D89) \displaystyle=\int~dx~\rho(x,t)\ln\dfrac{\rho(x,t)}{e^{-\beta H(t)+\beta F^{\rm eq}(t)}} (D90) \displaystyle=\underbrace{\int~dx~\rho(x,t)\ln\rho(x,t)}_{-S_{\rm sys}/k_{\rm B}}+\beta[E(t)-F^{\rm eq}(t)]\ , (D91) where E(t)\equiv\int~dx~\rho(x,t)H(t) is the average energy with respect to \rho(t) , and F^{\rm eq}(t) is the instantaneous equilibrium free-energy at time t . We identify the first term on the right-hand side of Eq. ( D91 ) as the negative of the system entropy production, and rewrite: \displaystyle\beta^{-1}D_{\rm KL}[\rho(t)||\rho^{\rm eq}(t)] \displaystyle=F(t)-F^{\rm eq}(t)\ , (D92) for the non-equilibrium free energy F(t)=E(t)-TS_{\rm sys} . From the first law of thermodynamics, we have \displaystyle W=Q-\Delta E\ , (D93) where \Delta E , Q , and W , respectively, are the change in the internal energy of the system, heat absorbed by the system, and the work performed on the system. This equation can be rewritten as \displaystyle W \displaystyle=-T[\Delta S_{\rm tot}-\Delta S_{\rm sys}]-\Delta E\ , (D94) for the change in total entropy production \Delta S_{\rm tot} . We substitute \Delta S_{\rm sys}\equiv S_{\rm sys}(t)-S_{\rm sys}(0) using Eq. ( D92 ) and obtain: \displaystyle W-\Delta F^{\rm eq} \displaystyle=T\Delta S_{\rm tot}+k_{\rm B}T[D_{\rm KL}[\rho(t)||\rho^{\rm eq}(t)]-D_{\rm KL}[\rho(0)||\rho^{\rm eq}(0)]]\ . (D95) Since \Delta S_{\rm tot}\geq 0 , we find the lower bound on the work performed while varying the control parameter \lambda(t) : \displaystyle W\geq\Delta F^{\rm eq}+k_{\rm B}T[D_{\rm KL}[\rho(t)||\rho^{\rm eq}(t)]-D_{\rm KL}[\rho(0)||\rho^{\rm eq}(0)]]\ . (D96) For the control protocol \lambda(t) changing from \lambda_{U}\equiv\lambda(0) to \lambda_{V}\equiv\lambda(\tau) , we can simply translate the above expression to the average work W_{2} as given in Eq. ( 21 ) by identifying that our system starts from \rho(0)=P_{{\rm ta},U}(x) and the protocol finishes at \rho(\tau)=P(x,\tau) , and their corresponding instantaneous equilibrium probabilities, respectively, are P^{\rm eq}_{U}(x) and P^{\rm eq}_{V}(x) . Appendix E Calculation of A(t_{1},t_{2}) Let us evaluate the following average: \displaystyle A(t_{1},t_{2})=\int_{-\infty}^{+\infty}~dx_{0}~P_{{\rm ta},U}(x_{0})\underbrace{\langle x^{2}(t_{1})x^{2}(t_{2})\rangle_{0,x_{0}}}_{a(t_{1},t_{2},x_{0})}\ , (E97) where P_{{\rm ta},U}(x_{0}) is the time-average density ( A7 ), and x(t) is the particle’s position at time t in a time-dependent harmonic potential \mathcal{U}(x;\lambda(t)) such that the stiffness \lambda changes from \lambda_{U} to \lambda_{V} . Each trajectory is initialized from x_{0} drawn from the time-average distribution P_{{\rm ta},U}(x_{0}) . For a time-dependent harmonic potential, the equation of motion reads \displaystyle\dot{x}=-\beta D\lambda(t)x+\sqrt{2D}~\eta(t)\ . (E98) The solution of the above equation is \displaystyle x(t)=x_{0}g(t,0)+\sqrt{2D}\int_{0}^{t}~ds~g(t,s)~\eta(s)\ , (E99) where the first term on the right-hand side is the average position of the particle in the time-varying potential when the particle starts from x_{0} drawn from P_{{\rm ta},U}(x_{0}) ( A7 ). In the above equation ( E99 ), we have: \displaystyle g(t,s)\equiv e^{-\beta D\int_{s}^{t}~dt^{\prime}\lambda(t^{\prime})}\ . (E100) We can rewrite x(t) ( E99 ) as \displaystyle x(t)=\mu(t)+y(t)\ , (E101) where we have defined \displaystyle\mu(t) \displaystyle\equiv x_{0}g(t,0)\ , (E102) \displaystyle y(t) \displaystyle\equiv\sqrt{2D}\int_{0}^{t}~ds~g(t,s)~\eta(s)\ , (E103) where y(t) is a normal random variable with zero mean. Then, a(t_{1},t_{2},x_{0}) in Eq. ( E97 ) becomes \displaystyle a(t_{1},t_{2},x_{0}) \displaystyle=\langle x^{2}(t_{1})x^{2}(t_{2})\rangle_{0,x_{0}} (E104) \displaystyle=\langle[y^{2}(t_{1})+\mu^{2}(t_{1})+2y(t_{1})\mu(t_{1})][y^{2}(t_{2})+\mu^{2}(t_{2})+2y(t_{2})\mu(t_{2})]\rangle_{0,x_{0}}\ . (E105) Expanding the terms on the right-hand side of Eq. ( E97 ), and then, performing an average over the time-average distribution P_{{\rm ta},U}(x_{0}) ( A7 ), we get \displaystyle A(t_{1},t_{2}) \displaystyle=\langle y^{2}(t_{1})y^{2}(t_{2})\rangle+2\langle\mu^{2}(t_{1})\rangle_{x_{0}}\langle y^{2}(t_{2})\rangle+4\langle\mu(t_{1})\mu(t_{2})\rangle_{x_{0}}\langle y(t_{1})y(t_{2})\rangle+\langle\mu^{2}(t_{1})\mu^{2}(t_{2})\rangle_{x_{0}}\ , (E106) where the \langle[\cdots]\rangle_{x_{0}}\equiv\int~dx_{0}~P_{{\rm ta},U}(x_{0})[\cdots]_{0,x_{0}} [see Eq. ( E97 )]. Now, we use Wick’s theorem for Gaussian random variables: \displaystyle\langle y^{2}(t_{1})y^{2}(t_{2})\rangle=\langle y^{2}(t_{1})\rangle\langle y^{2}(t_{2})\rangle+2\langle y(t_{1})y(t_{2})\rangle^{2}\ , (E107) and rewrite the right-hand side of Eq. ( E106 ) to get \displaystyle A(t_{1},t_{2}) \displaystyle=\langle y^{2}(t_{1})\rangle\langle y^{2}(t_{2})\rangle+2\langle y(t_{1})y(t_{2})\rangle^{2}+2\langle\mu^{2}(t_{1})\rangle_{x_{0}}\langle y^{2}(t_{2})\rangle \displaystyle+4\langle\mu(t_{1})\mu(t_{2})\rangle_{x_{0}}\langle y(t_{1})y(t_{2})\rangle+\langle\mu^{2}(t_{1})\mu^{2}(t_{2})\rangle_{x_{0}}\ . (E108) The right-hand side of the above equation ( E108 ) can be calculated using the following integrals: \displaystyle\langle y^{2}(t_{i})\rangle \displaystyle=2D\int_{0}^{t_{i}}~ds~G(t_{i},s)\ , (E109) \displaystyle\langle y(t_{1})y(t_{2})\rangle \displaystyle=2D\int_{0}^{{\rm min}(t_{1},t_{2})}~ds~g(t_{1},s)g(t_{2},s)\ , (E110) \displaystyle\langle\mu^{2}(t_{i})\rangle_{x_{0}} \displaystyle=\bigg(\int_{-\infty}^{+\infty}~dx_{0}~x_{0}^{2}P_{{\rm ta},U}(x_{0})\bigg)G(t_{i},0)\ , (E111) \displaystyle\langle\mu(t_{1})\mu(t_{2})\rangle_{x_{0}} \displaystyle=\bigg(\int_{-\infty}^{+\infty}~dx_{0}~x_{0}^{2}P_{{\rm ta},U}(x_{0})\bigg)g(t_{1},0)g(t_{2},0)\ , (E112) \displaystyle\langle\mu^{2}(t_{1})\mu^{2}(t_{2})\rangle_{x_{0}} \displaystyle=\bigg(\int_{-\infty}^{+\infty}~dx_{0}~x_{0}^{4}P_{{\rm ta},U}(x_{0})\bigg)G(t_{1},0)G(t_{2},0)\ . (E113)