# Taming a Maxwell's demon for experimental stochastic resetting

Rémi Goerlich, Minghao Li, Luís B. Pires, Paul-Antoine Hervieux, Giovanni

Manfredi, Cyriaque Genet

► To cite this version:

Rémi Goerlich, Minghao Li, Luís B. Pires, Paul-Antoine Hervieux, Giovanni Manfredi, et al.. Taming a Maxwell's demon for experimental stochastic resetting. Physical Review E, 2025, 112, 10.1103/jcvp-6yw2. hal-05441756

HAL Id: hal-05441756

https://hal.science/hal-05441756v1

Submitted on 5 Jan 2026

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Taming a Maxwell's demon for experimental stochastic resetting

Rémi Goerlich<sup>1,2,3</sup> Minghao Li<sup>4</sup> Luís B. Pires<sup>3,5</sup> Paul-Antoine Hervieux<sup>1,2</sup>
Giovanni Manfredi<sup>2</sup> and Cyriaque Genet<sup>3</sup>

<sup>1</sup>Raymond & Beverly Sackler School of Chemistry, Tel Aviv University, Tel Aviv 6997801, Israel

<sup>2</sup>Université de Strasbourg, CNRS, Institut de Physique et Chimie des Matériaux de Strasbourg, UMR 7504, F-67000 Strasbourg, France

<sup>3</sup>Université de Strasbourg, CNRS, Centre Européen de Sciences Quantiques & Institut de Science et d'Ingénierie Supramoléculaires, UMR 7006, F-67000 Strasbourg, France

<sup>4</sup>Department of Physics, University of Basel, Klingelbergstrasse 82, 4056 Basel, Switzerland

<sup>5</sup>Departamento de Física, Universidade Federal de Viçosa, Viçosa, Minas Gerais, Brazil

<figure><img src="image_2.png" /></figure>

(Received 4 September 2024; revised 24 July 2025; accepted 9 October 2025; published 11 December 2025)

A diffusive process that is reset to its origin at random times, so-called stochastic resetting (SR), is an ubiquitous expedient in many natural systems. Yet, beyond its ability to improve the efficiency of target searching, SR is a true nonequilibrium thermodynamic process that brings forward new and challenging questions. Here, we show how the recent developments of experimental information thermodynamics renew the way to address SR and can lead, beyond a new understanding, to better control on the nonequilibrium nature of SR. This thermodynamically controlled SR is experimentally implemented within a time-dependent optical trapping potential. We show in particular that SR converts heat into work from a single bath continuously and without feedback. This implements a Maxwell's demon that constantly erases information. In our experiments, the erasure takes the form of a protocol that allows us to evaluate the true energetic cost of SR. We show that using an appropriate measure of the available information, this cost can be reduced to a reversible minimum while being bounded by the Landauer limit. We finally reveal that the individual trajectories generated by the demon all break ergodicity and thus demonstrate the nonergodic nature of the demon's modus operandi. Our results offer new approaches to processes, such as SR, where the informational framework provides key experimental tools for their nonequilibrium thermodynamic control.

DOI: 10.1103/jcvp-6yw2

## I. INTRODUCTION

In a stochastic resetting (SR) process, a Brownian object diffuses, either freely or in a potential, for a random time before being reset to the origin [1–6]. This simple yet rich paradigm has drawn a lot of attention recently in various fields of research [7–9]. Because it minimizes first passage times in search processes [10] SR is an efficient solution to numerous problems in nature [11–13], devices [14,15], and in algorithms used, for instance, in molecular dynamics [16,17]. SR has been shown to be experimentally accessible using optical tweezers and these implementations in the laboratory revealed the importance of finite-time dynamics and energetic costs [18–20]. More recently, and closer to natural systems, experimental SR has been realized using active self-propelled robots, in a memory-keeping environment, boosting its effective diffusion coefficient [21]. Thermodynamically, resetting brings the system to a nonequilibrium steady state (NESS) [22,23]. This implies that improving the efficiency in search process comes with an energetic cost, which has to be balanced with the gain in search time [24,25]. Quantitative characterization of that cost is currently driving intense theoretical efforts [24,26–31]. It also challenges experimentalists to fill in the gap between a theoretical, idealized SR process built upon instantaneous resetting events and its actual physical realization, necessarily involving finite-time events with a distinct thermodynamics.

Here, we meet this challenge by implementing SR on a Brownian microsphere optically trapped in water. We provide not only a new understanding of the thermodynamic significance of SR, but also new means and new tools to control such process efficiently. We first measure all the appropriate thermodynamic quantities associated with idealized SR. This leads us to show that, as predicted theoretically [24], idealized instantaneous SR drives the microsphere in a NESS where, surprisingly, heat is constantly converted into work despite the fact that the microsphere is only coupled to a single heat bath (surrounding water). We explain how this apparent breach of the second law of thermodynamics summons a Maxwell’s demon who acts, behind the scene, on the trap potential as an external agent to maintain the microsphere in this NESS. We then recognize that the nature of the demon is informational: each resetting action is an instantaneous “teleportation” event, which erases a finite amount of information available before resetting.

The thermodynamics at play in the demon's work extraction scheme is thus the one of an information machine [32,33]. Our experiment therefore connects SR with the recent experimental investigations of information engines, using optically trapped colloids [34–39] as well as macroscopic systems [40,41]. Importantly, these experimental implementations rely on closed-loop measurements and feedback mechanisms, which is not the case of our implementation of resetting. In that sense, the way we operate SR might look
close to activating an autonomous Maxwell demon where a defined subsystem autonomously reduces the entropy of another [42]. In the case of SR however, the process not only reduces entropy (like Maxwell's original demon [43]) but also extracts finite work exerted against the optical potential (as does the Szilard's engine [44]). SR is therefore best understood as an autonomous work-extracting information engine.

Of course, an experimental implementation of SR necessarily involves continuous trajectories where resetting takes a finite time and in turns, consumes a larger amount of energy [45–48]. Importantly, we show in this work that looking at an idealized SR process or at its continuous implementation corresponds either to ignore or to include the demon’s energetic cost in the description. More precisely, we demonstrate that the full energy consumption of the continuous, physical SR process, accounting for the work experimentally injected in the demon, is always larger than the work the information machine can extract. This injected work naturally restores the second law which forbids useful work extraction from a single heat bath [49]. The information machine description of resetting consisting of sequences of erasures leads us to the Landauer bound of SR [24], which sets the minimal amount of injected work necessary to operate the machine. Approaching this bound is the route toward optimal implementation of SR, where the energetic gain associated with the unique features of resetting is obtained at the minimal thermodynamic cost. To do so, we start by controlling the individual resetting protocols, using slow manipulation of the trapped microsphere. This allows to reduce the cost of resetting by a factor 4 within our experimental parameter range. These slow protocols however still fail to reach the Landauer limit. By leveraging the knowledge of the thermodynamic state of the system at each step of the resetting process, we are able to measure the exact amount of information contained within the system’s state. It is only through this knowledge that reversible resetting protocols can be designed that further reduce the thermodynamic cost of resetting. Directly in line with the spirit of the historical Szilard’s engine [32,50], these reversible protocols bring the amount of injected power into the information machine down to its minimal (Landauer) value.

Adopting this framework finally leads to another essential, yet seldom analyzed, aspect of SR. In the optical trap, SR distinguishes the region where the microsphere position is reset from the rest of the available space. While being necessary to process information, this distinction is however known to break ergodicity [32].

Our work gathers three main results: (i) an extensive experimental thermodynamic description of SR which captures its Maxwell's demon nature. Using this framework, we demonstrate that the protocol used to reset the Brownian object can be designed to reduce the cost of maintaining a steady state based on SR; (ii) a characterization of the information processed by the demon by which, exploiting a Szilard-inspired driving, we bring the cost of the information machine to its reversible minimum; (iii) a connection between the information thermodynamics description of SR and its nonergodic properties.

<figure><img src="image_3.png" /><figcaption>FIG. 1. (a) Simplified view of the optical trapping system: a 820 nm laser beam, tightly focused through a high numerical aperture objective is confining the overdamped motion of a 3 µm polysterene bead in water in a potential $V(x) = κ(t)x^2/2$. (b) Schematic representation of a resetting sequence, composed of two distinct cases: a regime of diffusion in a shallow potential of stiffness $κ_{min}$ for a stochastic duration $τ$ and quenches to $κ_{max}$ followed by equilibration waiting time of deterministic duration $τ_{wait}$. (c) Short sample of an experimental trajectory subjected to stochastic resetting at an inverse rate $λ^{-1} = 1.5$ ms. The first trajectory shown is a full one, meaning that it contains the finite-time relaxation $τ_{wait}$ sequences, visible inside the red patches, when $κ = κ_{max}$. The bottom trajectory is a decimated one, meaning that all points during the finite-time $τ_{wait}$ relaxation transient have been removed. This procedure yields the idealized -hence shorter- instantaneous SR process (resetting events are marked with red arrows). See Appendix B for experimental details.</figcaption></figure>

## II. FROM PHYSICAL RESETTING IN AN OPTICAL TRAP TO IDEALIZED SR PROCESS

In this work, we set up an experimental platform to implement SR. It consists of a Brownian microsphere subjected to a time-dependent optical potential with two states: (i) a weak potential state, allowing the stochastic position $x_t$ of the microsphere along the optical axis at time $t$ to diffuse during a time $τ$ and (ii) a strongly confining state, quenching the particle very close to $x=0$. This quench constitutes what we call a single resetting event. The time $τ$ between two consecutive quenches is drawn from an exponential distribution $P_r(τ) = λe^{-λτ}$ with constant rate $λ$, hence implementing within our optical trap a Poissonian SR process [2].

Our experimental setup is sketched in Fig. 1(a) and detailed in Appendix B. It uses a laser beam focused on a microsphere in water to induce a confining harmonic optical potential. A secondary low-power laser beam acts as a passive probe to
record in real-time the successive positions $x_t$ of the over-
damped microsphere that compose a trajectory. The stiffness $\kappa$
of the harmonic confinement is linearly related to the intensity
of the trapping beam, controlled via an accousto-optic modu-
lator programmed numerically (see details in Appendix B). If
the stiffness of the optical trap is low $\kappa = \kappa_{\min}$, then the parti-
cle explores a shallow potential, with a diffusion coefficient
$D = k_B T / \gamma$ given by Boltzmann constant $k_B$, temperature
$T$, Stokes drag coefficient $\gamma$, and a relaxation time $\tau_{\text{slow}} =
\gamma / \kappa_{\min}$. When the stiffness abruptly increases to a high value
$\kappa_{\max} \gg \kappa_{\min}$, the particle relaxes exponentially fast toward the
center of the potential $x=0$, with a relaxation time $\tau_{\text{fast}} =
\gamma / \kappa_{\max}$. This stiffness quench acts as a resetting event and, to
ensure that the particle is well reset, the potential is kept stiff
for a waiting time $\tau_{\text{wait}}$ several times larger than the relaxation
time $\tau_{\text{fast}}$. The sequence of operation corresponding to our
implementation of SR is summarized in Fig. 1(b).

This experimental realization of SR cannot but departs
from theoretical resetting processes [30,45–47] because of the
noninstantaneous nature of the relaxation. Despite this, how-
ever, an idealized SR process characterized by instantaneous
“teleportation” events can be built from experimental trajecto-
ries if one removes the parts recorded during the waiting times
$\tau_{\text{wait}}$ over which the microsphere is relaxing inside the optical
trap. Having both decimated and full trajectories is absolutely
crucial to connect the thermodynamics of the system to the
cost of the operating demon.

In Fig. 1(c), we show an experimental SR process in a har-
monic optical potential $V(x) = \kappa_{\min}x^2/2$ with $\kappa_{\min} = 3.2 \pm 0.13$ pN/µm (leading to a relaxation time $\tau_{\text{slow}} = 7.9$ ms) and
$\kappa_{\max} = 97 \pm 4.2$ pN/µm (leading to $\tau_{\text{fast}} = 0.27$ ms). The in-
verse resetting rate is $\lambda^{-1} = 1.5$ ms. The trajectory of the
microsphere within the reset potential is recorded for 300 s at a
frequency $2^{15} = 32768$ Hz. Points acquired during the waiting
times $\tau_{\text{wait}}$ are removed to form the idealized trajectory shown
in Fig. 1(c). Importantly, this decimation erases the memory of
the trajectory: there are no correlations between the position
before and after each resetting event since $\tau_{\text{wait}} > \tau_{\text{fast}}$. The
resetting events are marked by red arrows in Fig. 1(c).

For Poissonian SR in a harmonic potential, the
process reaches a nonequilibrium steady-state distri-
bution $P(x)$ that can be computed as $P(x) = \lambda \int_0^\infty e^{-\lambda t} P(x|t, x=0)dt$ [31,51,52]. Here, $P(x|t, x=0) = \exp(-x^2/2\sigma^2(t))/\sqrt{2\pi\sigma^2(t)}$ is the standard Ornstein-
Uhlenbeck probability density of position for Brownian
diffusion within the harmonic potential, giving the probability
for the particle to diffuse from 0 to $x$ in a time $t$ in the
absence of resetting. We derive in Appendix C the exact
steady-state distribution that generalizes to all real values
of the dimensionless ratio of timescales $\lambda\tau_{\text{slow}}$ the known
expression for SR in a harmonic potential [51].

In Fig. 2, we plot the probability distribution built from
this decimated trajectory. The agreement between the exper-
imental nonequilibrium steady state (red triangles) and the
analytical result confirms that the decimated experimental
trajectories are very close to those of an idealized SR pro-
cess. The agreement also shows that the experimental error
on the resetting position due to the finite value of $\kappa_{\max}$,
can be neglected. On the same graph, we plot in blue the

<figure><img src="image_4.png" /><figcaption>FIG. 2. Probability distribution of position $P(x)$ of a 300 s long ideal, decimated SR process (red triangles) with rate $\lambda$ in a potential $V(x) = \kappa_{\min}x^2/2$ together with the exact result derived in Appendix C, using all experimental parameters (black solid line). The equilibrium distribution $P_{\text{eq}}(x)$ of a normal Ornstein-Uhlenbeck process in the same potential $V(x)$ (blue circles) is a Gaussian (black dashed line) as expected for a trapped Brownian object. The steady-state SR probability distribution $P(x)$ significantly differs both from $P_{\text{eq}}(x)$ and from the steady-state distribution $P_{\text{free}}(x) = \frac{1}{2}\sqrt{\lambda/D}\exp[-\sqrt{\lambda/D}|x|$ of a free SR process (black dotted line) with $D = k_B T / \gamma$—see Ref. [2]. This clearly demonstrates the combined effect of a confining potential $V(x)$ and SR.</figcaption></figure>

equilibrium distribution of the normal Ornstein-Uhlenbeck
process without resetting. This diffusion in the harmonic
potential $V(x)$ is characterized by a Gaussian distribution
$P_{\text{eq}}(x) = \sqrt{\frac{\kappa_{\min}}{2\pi k_B T}} e^{-\kappa_{\min}x^2/2k_B T}$. It is clear that the SR process,
confining the motion inside the trap, reaches a distribution
that strongly differs from the equilibrium Gaussian probability
density.

### III. SR IN A HARMONIC POTENTIAL EMULATES A MAXWELL'S DEMON

Both for decimated or full trajectories, SR brings the sys-
tem into a NESS with continuous energy exchanges with the
heat bath. As we now explain and describe in Fig. 3, each re-
setting event can be seen as the action of a Maxwell’s demon.
The ideal, instantaneous, version of the resetting event shows
a net work extraction, while the full, continuous, version of
the same event reveals the cost payed by the demon, which of
course exceeds what is apparently gained.

For an idealized process, SR yields trajectories by which
stochastic internal energies $u(t)$ and system's stochastic en-
tropies $s(t)$ can be measured [53]. Both are then combined
in nonequilibrium free energies $f(t)$. We use the center of
the trap $x=0$ as a reference to build the free energy dif-
ference associated with one resetting event $\Delta f(t) = \Delta u(t) -
T\Delta s(t)$ where $\Delta u(t) = V(x=0) - V(x_t)$. The abrupt change
in stochastic internal energy results from a resetting event
triggered by an external agent whose role is played by the
Maxwell's demon sketched in Fig. 3. The resetting event is
also accompanied by a difference in the system's stochastic
entropy stemming from the shift in position $\Delta s(t) = s(x =
0) - s(x_t)$.

A single resetting event is detailed in the top left part of
Fig. 3. First, during diffusion in-between resetting events, heat
builds up, absorbed from the bath by the microsphere starting
<figure><img src="image_5.png" /></figure>

FIG. 3. Working principle of the SR as a Maxwell’s demon. On the top left of the figure, a single instantaneous resetting event is shown: a single Brownian trajectory is diffusing from $x = 0$ at $t = 0$ until $x(\tau)$ at random time $t = \tau \approx 10$ ms, time at which it is instantaneously reset to $x = 0$. The explicit mechanism triggering the resetting event is for now unknown and is represented by a yellow spark. From a thermodynamic perspective, this trajectory is composed of two sequences: before resetting, the diffusing system absorbs a stochastic amount of heat from the surrounding heat bath and transforms it into internal energy as it explores the external potential $q(x_t) \rightarrow u(x_t) = \kappa_{min}x_t^2/2$. At the resetting event, the particle experiences a net displacement $\Delta x = x_t$ induced by the same external potential. This event corresponds to some stochastic work $w(x_t) = -u(x_t)$ exerted against the potential. Combining both sequences, it clearly appears that the absorbed heat is converted into work. The accumulation of sequential resetting events in steady state (bottom left) therefore constitutes a stationary Maxwell’s demon where the system absorbs heat at a constant rate $\dot{Q}$ (blue arrow) from the single heat bath and fully converts it into work with a rate $\dot{W}$ (orange arrow). However, the agent triggering the resetting event can be explicitly described (top large black arrow) as an external *demon*. As explained in the main text, each resetting event is achieved by a stiffness protocol $\kappa(t)$ under the form of a quench of the potential from a low $\kappa_{min}$ to a high $\kappa_{max}$ for a finite time. The stochastic work $w^{ext}(x_t)$ needed for the quench can be evaluated with the standard tools of stochastic energetics. Again, in the steady state (bottom right), this corresponds to a net power $\dot{W}^{ext}$ engaged by the demon. This cost is bounded by the nonequilibrium second law and must be considered on the energetic balance of the whole system (red horizontal arrow) to recover thermodynamic consistency.

at $x = 0$. This occurs in the constant shallow potential ($\kappa_{min}$) with no work exchanged. Heat therefore is fully converted into internal energy. Then, at the resetting event, this stored internal energy is instantaneously converted into the work $\Delta w(t) = -\Delta u(t)$ [24]. No heat is involved during this instantaneous event and the free energy describing this sequence reads $\Delta f(t) = -\Delta w(t) - T\Delta s(t)$. Importantly, at the center of the potential, $V(x=0) = 0$ which implies that $\Delta w > 0$, i.e., that stochastic work is extracted from the system. Overall therefore, the heat absorbed during the diffusive sequence is fully converted into work at the resetting event. Interestingly, up to a change of reference frame, the work extraction when the microsphere jumps from $x(t)$ to $x=0$ is the same as in an instantaneous shift of the potential from $x=0$ to $x(t)$, as was implemented in information engines [37,54]. However, in contrast with such engines, extracting work in resetting does not demand to resort to any a closed-loop measurement nor any feedback mechanism.

Our platform gives access to the motion of the optically trapped microsphere over long times and hence to idealized trajectories that have undergone many such resetting events and have converged to their steady-state distribution (see Fig. 2). With such trajectories, we measure the average work production rate as $\dot{W} = \lambda\langle\Delta w\rangle = \lambda\langle V(x_t) \rangle$ where the brackets $\langle\dots\rangle$ denotes the average taken in the steady-state distribution $P(x)$ as $\int \dots P(x)dx$.

This average work production rate is always positive, as seen in Fig. 4(b), where we display $\dot{W}$ experimentally extracted from our idealized SR trajectories, as a function of the mean resetting time $\lambda^{-1}$, keeping the same $\kappa_{min}$ and $\kappa_{max}$. The experimental results are complemented by numerical simulations (see Appendix B for details).

In the NESS, the average heat production rate $\dot{Q}$ is related to the nonvanishing probability current $J(x) = \left(-\frac{1}{\gamma}\frac{dV(x)}{dx} - D\partial_x\right)P(x)$ maintaining the NESS distribution different from the equilibrium solution $P_{eq}(x)$ in the external potential
<figure><img src="image_6.png" /><figcaption>FIG. 4. (a) Probability currents $J(x)$ for the equilibrium trajectories in the optical trap (blue circles) and for a trajectory undergoing resetting with inverse rate $\lambda^{-1} = 1.26$ ms (red triangles). The exact result (black dashed line) derives from the analytical SR NESS probability density $P(x)$. The sign of the NESS current may appear as counter-intuitive but it has a simple physical meaning: this local current directed away from the origin compensates exactly the nonlocal resetting jumps toward the origin, to maintain the NESS. (b) Work $\dot{W}$ and heat $\dot{Q}$ production rates experimentally measured for an SR process with inverse resetting rates $\lambda^{-1}$ ranging from 1.26 to 3.52 ms. The vanishing total rate $\dot{W} + \dot{Q} = 0$ measured for all $\lambda$ demonstrates the first law of thermodynamics for resetting. Experimental data are compared with numerical simulations (dashed lines) performed in conditions similar to the experiments. Comparing the motional variances of the measured trajectories to the numerical results leads to a correction of the experimental calibration, as detailed in Appendix B. (c) Experimentally measured medium entropy production rate $\dot{S}^m = \dot{Q}/T$ (blue circles), resetting entropy production rate $\dot{S}^{\text{rst}}$ (red triangles) and total entropy production rate $\dot{S}^{\text{tot}}$ (gray-blue squares). The latter is positive for all $\lambda$. All entropy productions decrease in the $\lambda^{-1} \to \infty$ limit of equilibrium.</figcaption></figure>

[22,24]. We plot the experimentally measured current in Fig. 4(a) both in equilibrium and in the SR-induced NESS. In the latter, a net current is induced from both sides of the center $x=0$ of the optical potential, with opposite signs as the manifestation of the confining effect of SR—see Fig. 2. This is the consequence of the breaking of the detailed-balance condition imposed by the resetting events at the level of each single trajectory. Since the current can be evaluated using the experimental distribution $P(x)$ of the recorded trajectories, the average heat build-up rate exchanged with the bath given by $\dot{Q} = \int J(x) \frac{dV(x)}{dx} dx$ can be experimentally measured [24]. In Fig. 4(b), we plot the measured average heat production rate $\dot{Q} < 0$ for all probed $\lambda^{-1}$: heat is on average absorbed from

the bath over the full resetting sequence and transformed into work $\dot{W} > 0$.

This analysis clearly shows that the idealized SR in a confining potential emulates a true Maxwell's demon that converts heat into work from a single bath at constant temperature, as sketched on the left panel in Fig. 3. The steady-state thermodynamic balance is summarized in the bottom left part of the sketch. Our results thus experimentally confirm the prediction of Ref. [24]. Importantly, in the idealized framework, the external potential is constant and there is no change in internal energy in the steady state. As a direct thermodynamic consequence, the first law for resetting reads $\dot{Q} + \dot{W} = 0$, as verified in Fig. 4(b). The magnitudes of both heat and work production rates decrease when $\lambda^{-1}$ increases, i.e., when the trajectory undergoes fewer resetting events. In the limit of infinite $\lambda^{-1}$, the system is back to equilibrium, without resetting and no exchange of energy.

## IV. PROTOCOL-DEPENDENT ERASURE OF INFORMATION AND LANDAUER'S PRINCIPLE FOR REAL SR

We now take a different look at the thermodynamics of resetting, by exploring and controlling the energetic cost of the demon's action itself. Each resetting event also implies a change in information, which, in line with Landauer's principle, sets bounds on the minimal energy consumption of the demon [24]. Starting from this information bound, we proceed by engineering the operation of the demon to minimize its own dissipation and reach its best performances. The informational nature of resetting is seen in the expression taken by $\Delta s = s(x=0) - s(x_t) = k_B \ln[P(x_t)/P(0)]$ that reads as a difference in stochastic Shannon entropy $s(x_t) = -k_B \ln[P(x_t)]$. Since $P(0)$ is the maximum of the distribution function (see Fig. 1), $\langle \Delta s \rangle < 0$, meaning that the entropy of the SR trajectory is reduced. In a steady-state SR process with rate $\lambda$, the average difference gives the resetting entropy production rate $\dot{S}^{\text{rst}} = \lambda \langle \Delta s \rangle$.

The heat build-up rate $\dot{Q}$ discussed above gives a second entropic contribution associated with the medium entropy $\dot{S}^m = \dot{Q}/T$. In Fig. 4(c) we plot the evolution of experimentally measured entropy production rates as a function of $\lambda^{-1}$. As heat and work in the first law [Fig. 4(b)], both entropic rates decrease as the system approaches thermodynamic equilibrium for large $\lambda^{-1}$. In the steady state, $\dot{S}^{\text{rst}}$ and $\dot{S}^m$ are combined into the total entropy production rate which is shown as gray-blue squares in Fig. 4(c). As expected by the second law (detailed in Appendix D), this total entropy production rate $\dot{S}^{\text{tot}} = \dot{S}^m - \dot{S}^{\text{rst}}$ [24] is always positive and decreases with $\lambda^{-1}$.

The average rate of free energy, explicitly measured as $\lambda \langle \Delta f \rangle = -\dot{W} - T \dot{S}^{\text{rst}}$, allows us to compare the minimal informative cost of the Maxwell's demon with the thermodynamics of its physical implementation. On the one hand, the informative cost associated with idealized SR is composed of instantaneous events, with no additional energetic footprint other than $\Delta f$. On the other hand, the real machinery of the demon is composed of the full trajectories recorded in the experimental implementation of SR. These trajectories are the consequence of a series of optical potential quenches
(as shown on the right panel of Fig. 3) where the stiffness increases from $κ_{min}$ to $κ_{max}$ following a given protocol. These protocols possess their own thermodynamic costs that must be evaluated. All together, these costs at the level of each protocol build up the actual amount of energy that must be injected in the system by the Maxwell's demon for the information machine to operate. This contribution to the thermodynamic balance is shown with the red horizontal arrow in the bottom of Fig. 3. It is a strong asset of our experimental system to allow us not only to access this cost, but also to control and minimize it.

To measure the real energetic cost of the demon, the full trajectories, including the waiting times $τ_{wait}$ are analyzed. They are Langevin trajectories that experience a time-dependent potential and whose thermodynamics is perfectly captured within the framework of stochastic thermodynamics [30,55–59]. Within this framework, the stochastic external work cost of a single resetting event reads

$$w^{\text{ext}}(t) = \frac{1}{2} \int_{0}^{t} \dot{\kappa}(t')x_{t}^{2}dt'. \quad (1)$$

The time-integral of work for a resetting event should span all the durations where $\dot{\kappa} \neq 0$. In our experiment, different choices of the individual protocol $κ(t)$ connecting $κ_{min}$ and $κ_{max}$ to implement each resetting will therefore induce different amounts of work, according to Eq. (1). According to the nonequilibrium second law, this work is bounded from below by the nonequilibrium free energy with $w^{\text{ext}}(t) > Δf(t)$ [24].

The time-averaged work production rate over a long trajectory of duration $t_{tot} \gg \lambda^{-1}$ (containing many resetting events) is simply $\dot{W}^{\text{ext}} = w^{\text{ext}}(t_{tot})/t_{tot}$. This external applied work obviously depends on the choice of $κ(t)$ connecting the same initial $κ_{min}$ and final $κ_{max}$ stiffnesses at the same rate $λ$. Therefore, the nonequilibrium free-energy bound can be tested by seeking for protocols $κ(t)$ that minimize $\dot{W}^{\text{ext}}$. Doing so, we test the dependence on the choice of $κ(t)$ and measure the real thermodynamic cost of maintaining the SR system in a NESS.

We design smooth protocols for the same resetting sequences at a given rate $λ$, but where each increase in stiffness follows $κ(t) = \frac{1}{2}(Δκ)\tanh(\frac{t}{ζ}) + \frac{1}{2}(κ_{max} + κ_{min})$. This allows us to perform SR with protocols ranging from abrupt step-like changes for small $ζ$ to slow drivings for large $ζ \gg τ_{fast}$, thus approaching the quasistatic limit. Two example protocols connecting the same $κ_{min}$ and $κ_{max}$ are displayed in the inset of Fig. 5. Each protocol is applied in the optical trap and the corresponding long-time series of positions $x_t$ are recorded with their associated cost $\dot{W}^{\text{ext}}$ measured. The protocol $κ(t)$ determines the shape of each single resetting event, but it is independent of the sequence of resettings, entirely determined by the rate $λ$. In other words, the same sequence of SR can be applied on the system with different local protocols $κ(t)$.

In parallel to $\dot{W}^{\text{ext}}$, we measure the average rate of the resetting free energy $λ\langleΔf\rangle = -\dot{W} - T\dot{S}^{\text{rst}}$ for each time series. As clearly seen in Fig. 5 $λ\langleΔf\rangle$ is, as expected, independent on the choice of $κ(t)$ while the external work rate $\dot{W}^{\text{ext}}$ strongly depends of $ζ$. Strikingly, we observe that the external work rate is always larger than this constant nonequilibrium free energy rate with $\dot{W}^{\text{ext}} > λ\langleΔf\rangle = 0.12 \pm 7 \times 10^{-3}$ [$k_B T/\text{ms}$], confirming in the SR steady state the

<figure><img src="image_7.png" /><figcaption>FIG. 5. (Inset) Time evolutions of two different protocols $κ(t)$ for a single resetting event connecting the same $κ_{min} = 2.18$ pN/μm and $κ_{max} = 95$ pN/μm. The parameter $ζ$ governs the shape of the protocol, ranging from a very abrupt steplike protocol with $ζ = 0.03$ ms (gray-blue line), to a very slow close-to-quasistatic protocol for a large $ζ \approx 1$ ms (red line), compared to the relaxation time in the stiff resetting potential is $τ_{fast} = γ/κ_{max} = 0.26$ ms. The relaxation time of the sphere optically trapped in the external potential is $τ_{slow} = γ/κ_{min} = 11.5$ ms. Each class of protocol is then implemented for every individual resetting event forming a long SR process. Hence, in each case, the recorded trajectory experiences SR with the exact same parameters $κ_{min}$, $κ_{max}$ and $λ$, the only difference being the abruptness of every single potential quench. (main plot) Associated stochastic work rate $\dot{W}^{\text{ext}}$ (red circles) experimentally measured with Eq. (1), applying the standard tools of stochastic thermodynamics to the full trajectory with the time-dependent protocol. As imposed by the second law, this external work rate $\dot{W}^{\text{ext}}$ is always larger than the free energy rate $-\dot{W} - T\dot{S}^{\text{rst}}$, measured on the idealized instantaneous resetting process (black circles and black solid line). As clearly seen, $\dot{W}^{\text{ext}}$ decreases for large $ζ$, when each resetting event is closer to the quasistatic limit but does not reach the free-energy bound. Instead, it asymptotically reaches a quasistatic limit (dashed red line) derived with the exact experimental parameters in Appendix E. The experimental data are in good agreement with numerical simulations (blue solid line) performed in conditions similar to the experiments.</figcaption></figure>

nonequilibrium second law. We also calculate that the average free energy rate is larger than the work rate $\dot{W} = 0.032 \pm 3 \times 10^{-3}$ [$k_B T/\text{ms}$] the demon can extract. In a steady state such as the one considered here with constant internal energy, the free energy $λ\langleΔf\rangle$ is equal to $T\dot{S}^{\text{tot}}$.

The free-energy bound $\dot{W}^{\text{ext}} > λ\langleΔf\rangle$ can be interpreted as the ultimate Landauer's limit for an idealized SR NESS [24]. Indeed, we remind that idealized SR means that each resetting event of the position $x_t$ is an instantaneous erasure of information. According to Landauer, this erasure must necessarily release a quantity of heat in the bath equal to the cost of energy needed to reset [58,60–63]. This minimal cost of energy is given by $Δf$. Averaged over the entire SR process, $λ\langleΔf\rangle$ thus corresponds to the Landauer's limit.

As seen in Fig. 5, $\dot{W}^{\text{ext}}$ decreases for slower protocols with larger $ζ$. This is a first central result of this work: the protocol used to implement resetting in an experimental set-up can be designed to reduce the cost of maintaining the SR system in a NESS. We however stress that, while this cost $\dot{W}^{\text{ext}}$ decreases,
it does not reach the free-energy bound $\lambda \langle \Delta f \rangle$. Within our experimental realization, this bound is therefore not tight [31]. At large $\zeta$, the external work rate only reaches asymptotically a quasistatic limit which is carefully derived in Appendix E.

Pushing down further $\dot{W}^{\text{ext}}$ is only possible if the thermodynamic transformation corresponding to the erasure process becomes reversible. But in the context of SR, the duration between the repeated interruptions of the diffusion performed at random times is shorter than equilibration. Each resetting event is thus triggered on a system out of equilibrium. Whether it is possible or not to perform in a reversible way the series of interruptions that makes up SR is a key thermodynamical question. As we now show, this question is positively answered by handling more precisely the quantity of average information available at each resetting.

V. HANDLING INFORMATION ALLOWS TO OPERATE THE MACHINE REVERSIBLY

We focus on a single resetting event along a continuous trajectory with time $t=0$ taken just after one last resetting and waiting time sequence. At $t=0$, the trajectory starts diffusing from $x \approx 0$ in the (shallow) potential. In our case of harmonic confinement, the state of the system at time $t$ is described by the Gaussian probability density $P(x|t, x=0)$ of the position of the diffusing sphere—see above—with a variance that grows deterministically, starting with a very small value $\sigma_i^2 = k_B T / \kappa_{\text{max}}$. If the system is let to diffuse for infinite time, then the variance will eventually reach $\sigma_f^2 = k_B T / \kappa_{\text{min}}$, obeying equipartition of energy in the shallow potential: the system will have reached equilibrium. But when a resetting event happens at a random finite time $\tau > 0$, the variance still possesses an intermediate value $\sigma^2(\tau)$ which does not correspond to its equilibrium value $\sigma_f^2$.

Therefore, if the demon triggers the next resetting event at time $\tau$ by merely increasing the stiffness starting from $\kappa_{\text{min}}$, even quasistatically, then the process will not be reversible. To be reversible, the transformation used to reset must ensure that the instantaneous state of the system described by $P(x_t)$ is at equilibrium at every instant of time.

To build a reversible transformation starting from a nonequilibrium state, one can start by adjusting the external constraints to the state in which the system lies, so that it becomes an equilibrium state with the new constraints. On our platform, we adjust the stiffness of the potential (our external constrain) as to enforce equipartition at the time $\tau$ of resetting with $\kappa(\tau) = k_B T / \sigma^2(\tau) > \kappa_{\text{min}}$ so that the state characterized $\sigma^2(\tau)$ now stands for an equilibrium state in the new potential. The transformation used to reset now starts at equilibrium and the stiffness can then increase quasistatically toward $\kappa_{\text{max}}$. Doing so, the system remains at equilibrium at every time along the protocol. This protocol is schematized on Figs. 6(a) and 6(b) where the instantaneous adjustment of $\kappa$ at $\tau = 2.5$ ms is clearly visible. For all times $t > \tau$ the system is at equilibrium and the variance obeys equipartition $\sigma^2(t > \tau) = k_B T / \kappa(t > \tau)$ until the next resetting sequence. Being reversible, this transformation does not dissipate any entropy.

Considering now the whole sequence starting from $t = \tau^{-}$ bringing the system from a nonequilibrium state to an

<figure><img src="image_8.png" /><figcaption>FIG. 6. (a) Succession of reversible quenches from $\kappa_{\text{min}} = 8.18$ pN/µm to $\kappa_{\text{max}} = 78.90$ pN/µm. In contrast with the simple quasistatic drive used in Fig. 5, here the value of $\kappa$ is abruptly increased at the beginning of each resetting protocol. The amplitude of the discontinuity is a random variable, function of the time elapsed since the last resetting. (b) Detailed explanation of a single reversible protocol. From time $t=0$ to the random time $t=\tau$ the particle diffuses in the harmonic potential according to a Gaussian probability density $P(x|t, x=0)$ of increasing variance $\sigma^2(t)$ (blue line). At time $\tau$ the variance $\sigma^2(\tau)$ has not yet reached its equilibrium value $k_B T / \kappa_{\text{min}}$ (its slow relaxation is continued as blue dashed line). To reversibly bring back the system into a potential of stiffness $\kappa_{\text{max}}$, the first step consists in instantaneously adapting the potential to the variance $\sigma^2(\tau)$. This is done by increasing the stiffness to $\kappa(\tau) = k_B T / \sigma^2(\tau)$. The stiffness is then slowly (quasistatically) increased until $\kappa_{\text{max}}$, keeping the system close to equilibrium for all times $t > \tau$. The dashed red line corresponds to the quasistatic, smooth protocol $\kappa(t)$ implemented above -see inset of Fig. 5. (c) Experimentally measured external power as a function of the protocol smoothness parameter $\zeta$ while keeping a constant $\lambda^{-1} = 5$ ms with $\tau_{\text{slow}} = 3.1$ ms and $\tau_{\text{fast}} = 0.23$ ms. The external power is shown for protocols approaching quasistaticity for large $\zeta$ ($\dot{W}_{\text{rev}}^{\text{ext}}$, red circles) but also for protocols approaching reversibility for large $\zeta$, as described above (denoted $\dot{W}_{\text{rev}}^{\text{ext}}$, blue-gray triangles). Both analytical values of the quasistatic limit (dashed red line) and the reversible limit (blue-gray line) are shown as well as the measured average rate of free-energy difference (black circles and line). The measured work with instantaneous equilibration reaches the reversible value for large $\zeta$ while the simple slow protocol agrees with the quasistatic limit.</figcaption></figure>
equilibrium state, the reversible work is composed of two contributions [32,49]: (i) the equilibrium free-energy difference $\Delta F_{eq} = \frac{k_B T}{2} \ln(\frac{\kappa_{max}}{\kappa_{min}})$ between both equilibrium states characterized by $\sigma_i^2$ and $\sigma_f^2$, and (ii) the excess of free energy between the nonequilibrium and the equilibrium states. As detailed in Appendix F this excess is given by the relative entropy $k_B I(\tau)$ between the state described by $P(x|\tau, x=0)$ and the equilibrium state whose probability density is approached for long times as $P(x|\tau \to \infty, x=0) = P_{eq}(x)$, and multiplied by $T$. As such therefore, this quantity quantitatively measures the distance of the system from equilibrium.

This quantity truly embodies the average information available at the instant $t = \tau$ of resetting and is evaluated as a Kullback-Leibler divergence between $P(x|\tau, x=0)$ and $P_{eq}(x)$ [49]. In the case of Gaussian densities, this divergence simplifies into a relation between variances (as detailed in Appendix F)

$$k_B T I(\tau) = \frac{-k_B T}{2} (\ln[\theta] + 1 - \theta) \ge 0, \quad (2)$$

where $\theta = \frac{\sigma^2(\tau)}{\sigma_f^2} = \frac{\sigma^2(\tau)\kappa_{min}}{k_B T}$. Importantly, $I(\tau)$ is still a random variable of the random resetting time $\tau$. Its average contribution is evaluated by integrating it over the resetting times probability distribution $\langle I(\tau) \rangle_{\tau} = \int I(\tau)P(\tau)d\tau$. A positive $\langle I(\tau) \rangle_{\tau}$ allows to engage a work smaller than equilibrium free-energy difference. In our experimental realization, each resetting event ends by the abrupt decrease of the stiffness back to $\kappa_{min}$, initiating the next diffusing sequence. This re-expansion of the trapping volume also produces a work $\frac{k_B T}{2} [\frac{\kappa_{min}}{\kappa_{max}} - 1]$ which must be added to the contribution of the reversible compression in the total average reversible power

$$\dot{W}_{\text{rev}}^{\text{ext}} = \lambda \left( \underbrace{\Delta F_{\text{eq}} - k_B T \langle I(\tau) \rangle_{\tau}}_{\text{reversible compression}} + \underbrace{\frac{k_B T}{2} \left[ \frac{\kappa_{\text{min}}}{\kappa_{\text{max}}} - 1 \right]}_{\text{re-expansion}} \right) \quad (3)$$

injected in the system by our Maxwell's demon.

## VI. SZILARD-LIKE PROTOCOLS PERFORM SR AT MINIMAL REVERSIBLE COSTS

Interestingly, this reversible transformation is analogous to operating a Szilard engine made of a box containing a single ideal gas particle [50]. In the Szilard thought-experiment, the probability density of the position of the particle is uniform across the volume of the box at thermal equilibrium. The first informational step consists in measuring on which side of the box the particle is. This input of information evidently breaks the uniformity of the probability density and thereby brings the system into a nonequilibrium state. This first step corresponds in our experiments to the resetting event when information on the system (namely, its distance from equilibrium) can be extracted through the knowledge of the motional variance $\sigma^2(\tau)$ at time $\tau$ of the trigger. The second step in the Szilard experiment consists in instantaneously inserting a partition isolating both halves of the box. This corresponds to our instantaneous increase of stiffness from $\kappa_{min}$ to $\kappa(\tau)$ matching the external constraints to bring the state of the system at equilibrium. Finally the partition is quasistatically moved until the full volume is retrieved, as in our quasistatic

increase of $\kappa(t > \tau)$. This protocol is ensuring minimal cost since it prevents dissipation [32,49,63]. In this process, no measurement of the random variable $x(\tau)$ is needed, which corresponds to an autonomous (open-loop) operation of the information engine. However, the instantaneous equilibration at $t = \tau$ relies on the knowledge of the sequence of durations $\tau$ between resetting events. This random variable is, in our case, known a priori, which keeps the process purely autonomous. In a more general case, beyond the scope of this work, the measurement of $\tau$ would imply a thermodynamic cost and might lead to nontrivial tradeoffs between the cost of precise measurements and the benefit of instantaneous equilibration.

We implemented experimentally this reversible protocol using the fact that $\sigma^2(\tau)$ is uniquely related to the time elapsed since the last resetting. This implies that the random values of $\kappa(\tau)$ are known for a given time series of resetting times $\tau$. We measure the Brownian trajectories under a Poissonian sequence of reversible quenches and compare in Fig. 6(c) the injected power $\dot{W}_{\text{rev}}^{\text{ext}}$ to the case of quasistatic drive. Remarkably, the reversible protocols bring the demon's cost below the quasistatic limit, reaching the minimal cost of reversibility. This constitutes the second central result of our work and shows the strong experimental relevance of the informational framework: a correct Szilard-like control allows to perform resetting at the minimal reversible cost.

We however note again that the Landauer bound $\Delta f$ [24] is not reached, even in the reversible limit. This discrepancy probably stems from two main reasons. First, the reversible work $W_{\text{rev}}$ is derived within experimental parameters, notably, as a transition between two finite stiffnesses. This contrasts with $\Delta f$ that assumes instantaneous resetting to the exact, nonfluctuating position $x=0$. Second, as underlined above, even if the relative entropy $k_B I(\tau)$ is a random variable, it remains an average quantity with respect to the stochastic variable $x_i$ since it only depends on the variance $\sigma^2(\tau)$. There necessarily exist rare fluctuations, where the microsphere diffusion during this finite time strongly differs from its expected behavior characterized by $\sigma^2(\tau)$. In this respect—and keeping in mind that such strategies go beyond the scope of the present work—one further step can be taken if a feedback loop is implemented to give instantaneous access to $x_i$ for $0 < t < \tau$. One could then for instance rely on the empirical probability density of positions $x_{0<i<\tau}$ that would allow the protocol to account for such fluctuations of the microscopic trajectory [64]. One could also replace $\sigma^2(\tau)$ by $x_i^2$. The extreme case of $x_i^2 \sim 0$ illustrates this strategy well since in that situation, the best protocol would correspond immediately and simply to increase $\kappa$ to $\kappa_{max}$ at $t = \tau$. In our experiments however, no feedback is involved so that our approach gives the best strategy available.

We insist here that the protocol $\kappa(t)$ presented here goes beyond the identification of energetic bounds for resetting because it provides an operational tool to generate SR stationary states with a minimal energetic cost. This is done through reversible transformations, which all imply slow operations—slow meaning over timescales much larger than the relaxation time $\tau_{\text{fast}}$. We however note that the clear separation of timescales between the shallow and stiff potentials allows to perform reversible transformations within a short time with
respect to the characteristic correlation time of the system, in the shallow potential. In cases where speed is pivotal, as it may be the case in search processes, the field of swift state-to-state transformations provides tools which could be adapted here to reset the system even faster, albeit with a larger energetic cost [65,66]. Optimal control techniques have been further developed to mitigate acceleration and energetic cost [59] with very recent application to resetting [67].

## VII. STOCHASTIC RESETTING, INFORMATION, AND ERGODICITY BREAKING

In this last section, we experimentally tackle the question of ergodicity of SR. As presented in the previous sections, SR shares conceptual similarities with information engines and can thermodynamically be described as such. Interestingly, ergodicity-breaking is a common feature of most information engines [32,35,68]. For instance, in a Szilard engine, ergodicity is broken when the state of the system is measured and quenched by inserting a potential barrier, preventing the exploration of the full phase space [34,35,38]. It is in fact this nonergodic post-measurement state which forms the energetic resource: energy is extracted during the recovering of ergodicity, i.e., the expansion of the engine [69]. Ergodicity must be broken and recovered in a similar way to implement any type of information processing, as for example in experimental verification of Landauer's principle on the energetic cost of erasure [60,62,70] It is interesting to ask how this property extends to the case of SR and whether it allows to understand better the link between SR and information processing.

A prerequisite for the existence of ergodic observables, is the so-called mixing property of the stochastic process, which requires that the diffusing particle spends in all region of phase-space a time proportional to the steady-state probability measure of this region. Our experimental result shows that, like diffusion and drift-diffusion [71], the Ornstein-Uhlenbeck process driving resetting is also mixing since (i) it is stationary and (ii) its autocorrelation function decays to zero [as shown Fig. 7(d)]. It implies that ergodic observables may exist. More precisely, for such stationary and mixing processes, ergodicity of an observable is defined as the equality of time averages and ensemble averages in the limit of infinite time and infinitely large ensembles. The definition of ergodicity becomes operational on finite data by studying the mean-squared-displacement (MSD) of a Brownian trajectory. An apposite criterion has been developed recently to evaluate ergodicity breaking over finite time and ensembles [72–74]. Using this ergodicity-breaking criterion, we demonstrate in this section, the nonergodicity of the time-averaged MSD for the SR process recorded on our platform while verifying its ergodicity for a normal Brownian diffusion without resetting. Intuitively, one may expect ergodicity breaking to arise from the same mechanism breaking the detailed-balance: the presence of large resetting jumps with waiting times drawn from an exponential distribution. Indeed, a long but finite SR trajectory containing rare large jumps cannot be similar to another trajectory, hinting that ergodicity may be effectively broken over finite time.

To study ergodicity quantitatively in this context, we build an ensemble of trajectories by cutting one long

<figure><img src="image_9.png" /><figcaption>FIG. 7. (a), (b) The EA-MSD (red line) coincides with the TEA-MSD (blue line) for both the normal Brownian motion (BM) in a harmonic potential (a) and in the presence of resetting (b). However, the ensemble of individual TA-MSD (light-gray lines in the background) show a different ensemble variance. In the case of resetting, the ensemble variance of TA-MSD does not collapse in the limit of large $T/\Delta$ (small $\Delta$), denoting a weak ergodicity breaking, which is captured by the ergodic criterion. (c) Ergodic criterion $\epsilon(\Delta)$ both for an equilibrium trajectory in the harmonic potential without resetting (normal BM, blue circles) and for a SR process in the same potential (red triangles). The analytical expression for $\epsilon(\Delta)$ (black dashed line) coincides with the experimental result for normal BM while the measured values for a SR process are significantly different. Long time drift in the experimental setup had to be corrected with a method detailed in Appendix G (for the normal BM, gray circles correspond to the uncorrected $\epsilon(\Delta)$, for the SR, both corrected and uncorrected data are superimposed). (d) Ensemble-averaged correlations $\langle x_t x_{t+\Delta} \rangle$ as a function of time lag $\Delta$ for normal BM (blue line) and SR (light-blue ($\lambda^{-1} = 3.52$ ms) line to red ($\lambda^{-1} = 1.26$ ms) line, i.e., with the same rates as in Fig. 4). (e) For a specific time lag $\Delta = 0.5$ ms, we show the deviation of the ergodic criterion with respect to its equilibrium value as a function of resetting rate ($\epsilon_{\Delta} - \epsilon_{\Delta}^{eq}$ corresponds to the distance between the red triangles and blue circles on panel (a), for one fixed value of $\Delta$). Experimental data (red triangles) spanning $\lambda^{-1} \in [1.26, 3.52]$ ms are complemented by numerical simulations (yellow circles) over an extended range of rates $\lambda_{\text{sim}}^{-1} \in [1, 10^3]$ ms.</figcaption></figure>
recorded steady-state trajectory into shorter subtrajectories. The recorded trajectory is characterized by $κ_{min} = 2.9 \pm 0.15$ and $κ_{max} = 83 \pm 2.1$ pN/µm and a rate $\lambda^{-1} \approx 6.1$ ms. We also verify ergodicity of a normal Brownian motion in exactly the same $V(x)$ external harmonic potential. After removing the waiting times, we obtain a 240 s long SR trajectory that is cut into an ensemble of 800 individual trajectories of a total time $T = 0.3$ s. Each individual 0.3 s long subtrajectory therefore contains many resetting events (on average, from 86 events for $\lambda^{-1} = 3.52$ ms to 238 events for $\lambda^{-1} = 1.26$ ms), and spans over 35 slow relaxation times $\tau_{slow} \approx 8.7 \pm 1$ ms. The MSD can be evaluated in three distinct ways:

(1) the time-averaged MSD (denoted as TA-MSD) is studied on each individual ith trajectory $x_i^i$ from the ensemble. It reads as:

$$ \text{TA-MSD}^i \equiv \overline{\delta^2 x^i(\Delta)} = \frac{1}{T - \Delta} \int_0^{T - \Delta} (x_{i+\Delta}^i - x_i^i)^2 dt. $$

Since it is measured over trajectories of finite lengths, the TA-MSD is a random variable which possesses a finite ensemble variance;

(2) over the ensemble, an instantaneous ensemble-averaged MSD $\langle \delta^2 x^i(\Delta) \rangle$ (denoted as EA-MSD) can be computed, by summing over all trajectories instead of integrating over time;

(3) both averaging can be combined and the set of individual TA-MSD$^i$ can be averaged over the ensemble to build the time-ensemble-averaged MSD (denoted as TEA-MSD).

As discussed in details in previous works [75-77], a first necessary condition for ergodicity is the convergence of TEA-MSD toward the EA-MSD in the large $T/\Delta$ limit. This is verified on Figs. 7(a) and 7(b) where we see that the TEA-MSD agrees with the EA-MSD apart from small deviation for short $\Delta$ [77]. However, this is only a necessary condition for ergodicity since it can hide a strong ensemble variance of individual TA-MSD$^i$. Such ensemble variance is visible in Fig. 7(b) (light-gray individual curves) and was posited in Ref. [71] for the case of free Brownian motion subjected to SR. This ensemble variance implies that individual subtrajectories strongly differ from each other, breaking the ergodic condition. Therefore, a strong ergodicity criterion (both necessary and sufficient condition) is the vanishing of the ensemble variance of TA-MSD$^i$ in the large $T/\Delta$ limit.

This ensemble variance of individual TA-MSD is well captured by the criterion

$$ \epsilon(\Delta) = \frac{\langle \delta^2 x^i(\Delta) \rangle^2}{\langle \delta^2 x^i(\Delta) \rangle^2 - 1}, \quad (4) $$

which can be computed analytically for standard Brownian motion in a harmonic potential [75,77]. The criterion evaluated in Fig. 7(c) for the SR process (red triangles) clearly reveals the nonergodic nature of SR: the decay rate of $\epsilon(\Delta)$ for short $\Delta$ is strongly hindered in the presence of resetting. In contrast, the evolution of $\epsilon(\Delta)$ for normal Brownian motion in the same external potential (blue circles) in Fig. 7(b) ensures the ergodicity of the experimental setup when no resetting is performed. These two results, verified with numerical simulations in Appendix G, show that resetting is the sole mechanism breaking ergodicity. This experimental finding extends to the case of SR Ornstein-Uhlenbeck processes

the existing results on ergodicity of SR processes [71,78-81]. We reveal that in that case, ergodicity measured on finite data is broken by the anomalous ensemble variance of individual TA-MSD. This constitutes the third main result of this work.

To gain further insight on this nonergodic feature, we perform numerical simulations of an Ornstein-Uhlenbeck process with resetting, with a broad range of resetting rates, as detailed in Appendix G. The ergodic criterion $\epsilon(\Delta)$ is probed in each case, and its deviation from its equilibrium, ergodic, value for a fixed $\Delta$ is plotted as a function of the inverse resetting rate in Fig. 7(e) (yellow circles). Interestingly, while $\epsilon_\Delta(\lambda)$ does converge to equilibrium in the limit of large $\lambda^{-1}$, it shows a strong departure from the ergodic value $\epsilon_\Delta^{eq}(\lambda)$ with a nonmonotonic behavior for short resetting times. Our experimental data (red triangles) agree quantitatively with these results, but only span a limited range of resetting rates, imposed by the features of our experiments.

An interesting perspective opens here when comparing our experimental observations with an exact calculation of MSD and TA-MSD for Ornstein-Uhlenbeck under resetting, which could be derived in line with existing results for free Brownian motion [71]. The rate function of the TA-MSD, as a time-integrated observable, could be derived to study its large deviations [82]. It is interesting to recall here the aforementioned equivalence between our implementation of SR in a harmonic potential and large class of information engines [37,54] that proceed by shifting the potential, instead of resetting the particle. When following a single step of such information engine or, similarly, a single resetting event in our experiment, ergodicity is locally broken by the extreme localization of the particle after measurement/resetting. Remarkably, we showed that this local ergodicity-breaking induces an effective ergodicity-breaking over long yet finite trajectories, containing many resetting events. Similar results could be observed on feedback engines [37,39,54], further strengthening the link between SR and information engine.

VIII. CONCLUSION

In summary, we studied SR induced on a microsphere diffusing in a confining optical potential by recording real-time stochastic trajectories. A simple manipulation of these trajectories gave us access to the ideal, instantaneous limit of SR which reveals its Maxwell's demon nature, extracting work from a single temperature heat bath. We then confronted the idealized thermodynamics of the demon to the actual cost involved in making SR real, showing that the cost of operating the demon always exceeds the work it extracts. The nature of the continuous trajectories of real SR, namely a succession of transitions from nonequilibrium to equilibrium states, allowed us to extract the average information available at each resetting event. We recovered the nonequilibrium second law where the SR free-energy bounds, from below, the external work needed to reset the system. This informational approach allows to interpret this bound as the Landauer's limit of idealized SR. In addition, the capacity to handle the available information led us to reach the reversible limit of operating SR. In this limit of reversibility, we showed how SR can be described as a series of Szilard-like protocols [49,50]. This assessment of quantitative bounds
put on this stochastic process as an information machine has obviously consequences in understanding natural phenomena, given the ubiquity of SR [11–13,83]. Finally, our experiment gives a clear illustration of the fundamental connection between information processing and the breaking of ergodicity that manifests itself in each irreversible resetting event. We anticipate that our results will provide new directions for the application of information thermodynamics in nonequilibrium experiments, but will also offer new analysis tools in terms of ergodicity breaking [32,34,35]. In addition, by demonstrating fundamental bounds on the operation of search processes such as stochastic resetting, our work directly impacts their frugal implementations in devices and their biological functioning [12,13]. Such concerns on the thermodynamic costs of SR are currently fueling an intense theoretical research effort [67,84,85]. The drive to getting closer to natural systems opens numerous challenges at the crossroad between resetting and active matter [8,21,86,87]. Thermodynamic control of nonequilibrium and active systems forms a significant challenge in itself [88]. It becomes clear that the new possibilities offered by SR in close connection with active systems call for a renewed approach to decipher, control and possibly optimize their thermodynamic performances.

## ACKNOWLEDGMENTS

We sincerely thank Yael Roichman, Shlomi Reuveni and Kristian S. Olsen for inspiring discussions. This work is part of the Interdisciplinary Thematic Institute QMat of the University of Strasbourg, CNRS and Inserm. It was supported by the following programs: IdEx Unistra (ANR-10-IDEX- 0002), SFRI STRATUS project (ANR-20-SFRI-0012), the Interdisciplinary Thematic Institute ITI-CSC of the University of Strasbourg, and USIAS (ANR-10-IDEX- 0002-02) under the framework of the French Investments for the Future Program. The support of the French Agence Nationale de la Recherche (ANR), under grant ANR-23-CE30-0042 (project FENNEC) is also acknowledged.

## APPENDIX A: OUTLINE

We provide in this Appendix additional details on experimental, numerical, and theoretical aspects. Appendix B gives a detailed account of the experimental and numerical methods used in this work. In Appendix C, we derive the stationary distribution of a particle undergoing Poissonian SR in a harmonic trap. Appendix D completes the derivation of the system, medium and resetting entropies used in the main manuscript, as proposed in Ref. [24]. In Appendix E, we give a full derivation of the quasistatic limit of the external applied work. We detail the mechanism of nonmonotonic relaxation of the variance, from which stems the nonreversible nature of such quasistatic protocols. These results justify the quasistatic bound presented in the main text. In the next Appendix F, we derive the minimal reversible work, from an explicit measure of the information content of each resetting event. This corresponds to the minimal work cost measured in the main text when the correct reversible protocol is applied. Finally, in Appendix G, we detail the experimental construction of the ergodicity criterion used, but also explain the method

of drift correction implemented throughout the analysis. It also contains results of numerical simulations performed to further explore the ergodic properties of Ornstein-Uhlenbeck processes under stochastic resetting, expanding the range of parameters with respect to what is accessible through the experiments.

## APPENDIX B: EXPERIMENTAL AND NUMERICAL METHODS

We detail here how SR is performed and measured within an optical trap together with the calibration method used. We also explicitly show how the trajectories are manipulated when going from their full, continuous form, to their ideal, decimated version. All the informational thermodynamic analysis of the main manuscript is based on this distinction. Finally, we give a detailed description of our numerical simulations.

### 1. Experimental realization of SR in an optical trap

Our experimental setup consists in optically trapping, in a harmonic potential, an overdamped single dielectric bead (3 µm polystyrene sphere) in a fluidic cell filled with dionized water at room temperature $T = 296$ k. The harmonic potential is induced by focusing inside the cell a linearly polarized Gaussian beam (800 nm, CW 5 W Ti:Sa laser, Spectra Physics 3900S) through a high numerical aperture objective (Nikon Plan Apo VC, $60 \times$, NA = 1.20 water immersion, Obj1 in Fig. 8). The intensity of this trapping beam is controlled by an acousto-optic modulator (Gooch and Housego 3200s, AOM in Fig. 8) using a digital-to-analogue card (NI PXIe 6361) and a PYTHON code.

The instantaneous position $x(t)$ of the sphere along the optical axis is measured by recording the light scattered off the sphere using a low-power 639 nm laser (CW 30 mW laser diode, Thorlabs HL6323MG), sent on the bead via a second objective (Nikon Plan Fluor Extra Large Working Distance, $60 \times$, NA = 0.7, Obj2 on the figure). The scattered light is

<figure><img src="image_10.png" /><figcaption>FIG. 8. Simplified view of the optical trapping setup. The sphere is suspended in water inside the *Sample* cell inserted between the two objectives Obj1 and Obj2. The 820 nm trapping beam is drawn in pink. The intensity of this beam controlled by the acousto-optic modulator (AOM). The instantaneous position of the trapped bead is probed using the auxiliary 639 nm laser beam, drawn in orange, whose scattered signal is sent to a high-frequency photodiode.</figcaption></figure>
collected by Obj1 and recorded by a photodiode (100 MHz, Thorlabs Det10A). The recorded signal (in V/s) is amplified using a low noise amplifier (SR560, Stanford Research) and then acquired by an analog-to-digital card (NI PCI-6251). The signal is filtered through a 0.3 Hz high-pass filter at 6 dB/oct to remove the DC component and through a 100 kHz low-pass filter at 6 dB/oct to prevent from aliasing. The scattered intensity varies linearly with the instantaneous position of the trapped bead $x(t)$ for small displacements. We make sure to work in the linear response regime of the photodiode so that the recorded signal is linear with the scattered intensity, resulting eventually in a voltage trace well linear with $x(t)$.

To build a SR process, we modulate in time the intensity of the trapping laser using the AOM. To design the SR associated with the expected characteristics, we rely on the precise determination of the stiffness of the optical trap in which the microsphere diffuses. We therefore calibrate the relation between the voltage send to the AOM driver and the stiffness $\kappa$ of the optical potential. In Fig. 9(a) we show the power spectral density (PSD) of the recorded trajectories for six values of voltages, spanning the beginning of the dynamical bandwidth of the AOM. An issue here is that, as the stiffness increases, the motional variance of the microsphere decreases, making it harder to probe. For stiffnesses larger than ca. 40 pN/µm we can hardly obtain a good PSD. We can however assume that the linear increase of $\kappa$ with driving voltage is unaffected by this probing issue. We therefore probe the onset of this linearity (driving voltage from 0.01 to 0.4 V) and extrapolate the linear relation over the whole dynamical bandwidth of the AOM, as shown Fig. 9(b). This gives a maximal stiffness $\kappa_{max} = 83.1 \pm 2.1$ pN/µm for the resetting event.

From the same PSD fit, we can extract a calibration factor $\beta$ from the ratio between the amplitude of the measured PSD in V$^2$/Hz and the expected value in m$^2$/Hz depending on the diffusion coefficient of the microsphere in water $D = k_B T / \gamma \approx 0.16$ µm/s. This calibration factor allows to obtain trajectories in meter out of the recorded time series of voltages.

In Fig. 10, we show a full time series of recorded points (taken over a few milliseconds). The synchronized recording of the trajectory $x(t)$ (Fig. 10, top panel) and the time series of stiffness changes $\kappa(t)$ (Fig. 10, middle panel, normalized) allows to build the *ideal* instantaneous resetting. By removing points during the waiting times where $\kappa(t) = \kappa_{max}$ (marked as vertical red stripes) we obtain instantaneous resetting events. The confrontation of the full and decimated trajectories is the backbone of our entire work. In Fig. 10 (lower panel) we show the position's probability distribution for the full trajectories, for the decimated trajectory (also shown in the main text), together with the equilibrium reset-free distribution and both analytical results. As seen, the presence of the waiting times in the trajectories affects the center of the distribution with, as expected, an accumulation of points near $x = 0$. The tails are not affected. Even in the decimated case (yellow triangles) the head of the distribution is slightly rounded with respect to the analytical cusp, due to the $\sqrt{k_B T / \kappa_{max}}$ intrinsic ensemble variance on the resetting positions. As discussed in the main text, this slight deviation does not affect the thermodynamic

<figure><img src="image_11.png" /></figure>

FIG. 9. (Upper panel) Power spectral densities of the microsphere motion for various trapping laser intensities. The circles are experimentally measured PSD, the dashed lines are Lorentzian fits, from which the cutoff frequency is extracted (blue vertical lines). Shaded patches represent the limits on the frequencies used for the Lorentzian fit. We gradually restrain the bandwidth as we go to high stiffnesses where the measured amplitude of the signal decreases. (Lower panel) Stiffnesses extracted from the fit of PSDs at different driving voltage of AOM (hence different trapping laser intensity) with a linear fit giving the relation between driving voltage and in situ stiffness. This allow us to know the maximal usable stiffness given the working power (400 mW in the input of AOM) of our Ti:Sap laser at $\kappa_{max} = 83.1 \pm 2.1$ pN/µm.

results, which still fit the analytical result, derived for error-free resetting.

## 2. Numerical simulations

The experimental results presented in this paper are complemented by numerical simulations. To be able to reproduce numerically both the idealized instantaneous resetting as well as the full physical realization as we do with experimental data, we simulate the entire experimental scheme.
<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /><figcaption>FIG. 10. (Upper panels) Small subpart of an experimental realization of a typical Poissonian finite-time stochastic resetting sequence. On this figure, we show the full time series of both the modulation potential and the recorded time series. We highlight with red stripes the time regions over which the potential is kept stiff, which correspond to the resetting events. By removing the points within such time regions, one obtains an idealized instantaneous resetting process. (Lower panel) Probability distribution of the full trajectory measured in the optical trap (red squares) together with the distribution of the decimated idealized trajectory (yellow triangles) in agreement with the analytical distribution described in the main text (black line). We also show the equilibrium distribution (blue circles) together with the analytical Gaussian profile (black dashed line).</figcaption></figure>

Numerical SR processes are, like in the experiments, solutions of a Langevin equation with a time-dependent external potential, which stiffness varies from $κ_{min}$ to $κ_{max}$, both fed with experimental values. The Langevin equation is solved using a standard Euler scheme [89]. Both the random white noise simulating the thermal bath and the random distributions of

times $τ$ used to devise the resetting sequence are generated using built-in PYTHON pseudo-random number generators.

The trajectories obtained from these simulations perfectly compare with the experimental time series and can be analyzed the same way. These simulated trajectories are used to correct small calibration offsets in the recorded trajectories, obtained by comparing the motional variances of simulated and recorded trajectories in a steady state. This gives a constant correction on the calibration factor $\tilde{β} = 0.822β$ that does not modify the dynamics of any observed effect reported in our work.

## APPENDIX C: STATIONARY DISTRIBUTIONS

Trapped Brownian trajectories undergoing a SR process are distributed according to a steady-state probability distribution function that depends both on the confining potential and the resetting parameters. In our case, the Brownian microsphere is optically trapped in a harmonic potential $V(x) = \frac{1}{2}κ_{min}x^2$, where $κ_{min} \sim 1$ pN/µm is the stiffness of the confining potential (in contrast with $κ_{max} \sim 100$ pN/µm which corresponds to the potential quench associated with each resetting event). This confining potential, together with the viscous drag $γ$ experienced by the microsphere in the fluid, induce a characteristic time $τ_{slow} = κ_{min}/γ \sim 10^{-3}$ s in the dynamics.

The steady-state solution for the Fokker Planck equation with stochastic resetting is [31]

$$P(x) = \lambda \int_{0}^{\infty} d\tau e^{-\lambda \tau} G(x|\tau, 0), \quad (C1)$$

where $λ$ is the rate of the Poissonian stochastic resetting and $G(x|τ, 0)$ is the propagator of a given stochastic process that is reset to. For a Wiener process, the propagator is

$$G(x|\tau, 0) = \frac{1}{\sqrt{4\pi D\tau}} \exp\left(-\frac{x^2}{4D\tau}\right). \quad (C2)$$

Therefore, the corresponding integral to solve is

$$P(x) = \frac{\lambda}{\sqrt{4\pi D}} \int_{0}^{\infty} \frac{d\tau}{\sqrt{\tau}} \exp \left[ -\left( \lambda\tau + \frac{x^2}{4D\tau} \right) \right] \quad (C3)$$

now, let $u = \sqrt{\tau}$, the integral becomes then

$$\begin{aligned} P(x) &= \frac{\lambda}{\sqrt{\pi D}} \int_{0}^{\infty} du \exp \left( -\lambda u^2 - \frac{x^2}{4Du^2} \right) \\ &= \frac{1}{2} \sqrt{\frac{\lambda}{D}} \exp \left( -\sqrt{\frac{\lambda}{D}} |x| \right). \end{aligned} \quad (C4)$$

This corresponds to a Laplace (biexponential) distribution, known steady state for free Brownian motion undergoing Poissonian resetting. This Laplace-distribution is also represented in Fig. 2 in the main text.

For an Ornstein-Uhlenbeck process (Brownian motion in a harmonic potential), the propagator is given by

$$G(x|\tau, 0) = \sqrt{\frac{\kappa_{\min}}{2\pi k_B T (1 - e^{-2\tau/\tau_{\text{slow}}})}} \exp\left(-\frac{\kappa_{\min}}{2k_B T} \cdot \frac{x^2}{1 - e^{-2\tau/\tau_{\text{slow}}}}\right), \quad (C5)$$
<figure><img src="image_14.png" /><figcaption>FIG. 11. Experimental histograms (triangles) together with their exact distributions Eq. (C9) (solid lines) for a large range of resetting rates from $\lambda = 283$ Hz to $\lambda = 795$ Hz while $\tau_{slow}^{-1} = 159$ Hz. As a comparison, the Gaussian probability distribution of a Brownian trajectory in the same potential $V(x)$ with the characteristic relaxation time $\tau_{slow}$ is also shown (black dashed line) together with the associated experimentally measured histogram (blue circles).</figcaption></figure>

where the parameter $\tau_{slow} = \gamma/\kappa_{min}$ where $\kappa_{min}$ is the stiffness of the background potential (in contrast with the sharp potential used to apply resetting). For simplicity, we define $a = 1/2\tau_{slow}D = \kappa_{min}/2k_B T$ and $b = 2/\tau_{slow}$. Thus, the steady state PDF can be written as

$$P(x) = \sqrt{\frac{a}{\pi}} \int_{0}^{\infty} d\tau re^{-\lambda\tau} \frac{1}{\sqrt{1 - e^{-b\tau}}} \exp\left(-\frac{ax^2}{1 - e^{-b\tau}}\right). \quad (C6)$$

Applying the change of variable $u = e^{-\lambda\tau}$ leads to $e^{-b\tau} = u^p$ where $p = b/\lambda$. The integral thus becomes

$$P(x) = \sqrt{\frac{a}{\pi}} \int_{0}^{1} du \frac{1}{\sqrt{1 - u^p}} \exp\left(-\frac{ax^2}{1 - u^p}\right). \quad (C7)$$

A second change of variable defined by $w = 1 - u^p$, where $du = -\frac{1}{p}(1-w)^{\frac{1}{p}-1}dw$, gives the expression for the probability distribution

$$P(x) = \sqrt{\frac{a}{\pi}} \int_{0}^{1} dw \frac{1}{p} (1-w)^{\frac{1}{p}-1} w^{-1/2} \exp\left(-\frac{ax^2}{w}\right). \quad (C8)$$

According to Gradshteyn and Ryzhik [52], our integral leads to the final result:

$$P(x) = \frac{1}{p} \sqrt{\frac{a}{\pi}} \Gamma\left(\frac{1}{p}\right) e^{-\frac{ax^2}{2}} (ax^2)^{-\frac{1}{4}} W_{\frac{1}{4}-\frac{1}{p}, \frac{1}{4}}(ax^2), \quad (C9)$$

where $W_{k,m}(x)$ is the Whittaker function.

The result Eq. (C9) is used in the main text and agrees very well with the distribution for a SR process in a harmonic potential measured experimentally on decimated trajectories. This agreement validates our experimental realization of SR. In Fig. 11, we show the agreement between experimentally measured steady-state distributions and the result Eq. (C9) for various resetting rates, ranging from 283 to 795 Hz. The

analytical expression precisely captures the experimental behavior over a large spatial range as well as over an extended variation of parameters. One can note that the steady states share a sharp central peak similar to the exponential distribution of free SR process, while the tails tend to follow the (Ornstein-Uhlenbeck) Gaussian tails. For small values of the dimensionless ratio of timescales $\lambda\tau_{slow}$, the distribution is close to the Gaussian corresponding to a trajectory without resetting while the distribution is progressively more sharply peaked around the resetting position $x = 0$ when the resetting rate increases, departing more strongly from the Gaussian distribution.

Importantly, this result generalizes the expression known in the literature for SR in a harmonic potential, expressed in terms of negative order Hermite's polynomials [51].

We emphasize indeed that if the two results coincide exactly for integer values of $\lambda\tau_{slow}$, then our result, based on the Whittaker function, is not restricted to integer ratio between the resetting rate and the characteristic pulsation, since the parameter $k$ and $m$ of $W_{k,m}(x)$ function can take arbitrary real values.

## APPENDIX D: ENTROPY AND THE SECOND LAW OF THERMODYNAMICS FOR RESETTING

The second term in the nonequilibrium free energy is proportional to the average rate of stochastic Shannon entropy change $\Delta s$. The mean resetting entropy production rate is obtained by averaging $\Delta s$ over resetting events:

$$\dot{S}^{\text{rst}} = \lambda \langle \Delta s \rangle = k_B \lambda \int \ln \left[ \frac{P(x)}{P(0)} \right] P(x) dx. \quad (D1)$$

This quantity does not account for the contribution of the diffusive trajectory between successive resetting events. This contribution enters in the heat production rate, to which is associated a dissipation of entropy in the medium, $\dot{S}^m = \dot{Q}/T$. Finally, the total entropy production rate of a Brownian trajectory experiencing SR reads $\dot{S}^{tot} = \dot{S}^m + \dot{S}^{sys} - \dot{S}^{rst} \ge 0$ [24,30]. The system entropy $\dot{S}^{sys} = k_B \frac{d}{dt} \int P(x) \ln[P(x)] dx$ vanishes in the steady state [28,90]. Therefore, the total entropy production rate

$$\dot{S}^{\text{tot}} = \dot{S}^{\text{m}} - \dot{S}^{\text{rst}} \ge 0 \quad (D2)$$

is a positive quantity, only reaching zero in the limit of equilibrium. As such, it is interpreted as the second law of thermodynamics for a SR process [24,31,49].

## APPENDIX E: QUASISTATIC LIMIT OF THE EXTERNAL WORK

Here we derive the external work rate expended in the limit of quasistatic resetting events. As detailed in the main text, the external work is evaluated as

$$\langle w^{\text{ext}}(t) \rangle = \frac{1}{2} \int_{0}^{t} \dot{\kappa}(t') \langle x_{t'}^2 \rangle dt', \quad (E1)$$

where $\dot{\kappa}(t)$ is the time-derivative of the imposed protocol and $\langle x^2(t) \rangle$ is the motional variance of the microsphere, characterizing the response of the system to this specific protocol $\kappa(t)$.

The motional variance obeys a simple differential equation:

$$\frac{d\langle x^2(t) \rangle}{dt} = \frac{-2\kappa(t)}{\gamma} \langle x^2(t) \rangle + 2D. \quad (E2)$$
<figure><img src="image_15.png" /><figcaption>FIG. 12. Schematic explanation of a sequence of diffusion and quasistatic resetting. For $t \in [0, t_m]$ the particle diffuses in the shallow potential $\kappa = \kappa_{min}$ with an increasing variance $\langle x^2(t) \rangle_{\text{before}}$. For $t \in [t_m, t_m + \tau_w]$ the stiffness gradually increases and the variance $\langle x^2(t) \rangle$ is nonmonotonic.</figcaption></figure>

We begin by imposing a protocol $\kappa(t) = \frac{\Delta\kappa}{\tau_w}(t - t_m) + \kappa_{min}$ connecting $\kappa_{min}$ to $\kappa_{max}$ in a linear way with characteristic time $\tau_w$ and starting at time $t_m$. The response of the variance to this protocol can be obtained by solving numerically Eq. (E2) for this protocol. In the limit of very large $\tau_w$ (the quasistatic limit) we expect no difference with the hyperbolic tangent

protocol used in the experiment. The evolution of the variance $\langle x^2(t) \rangle$ during the resetting event takes the form

$$ \langle x^2(t) \rangle = (c_1 \times \exp[f(t)] + c_2 \exp[g(t)] \times \text{erfi}[h(t)]), \quad (E3) $$

where $f$, $g$, and $h$ are simple functions of time obtained in the numerical solution of Eq. (E2), erfi is the imaginary error function and $c_1$ and $c_2$ are matching constants. Before the beginning of the resetting event, for times $t \in [0, t_m]$, the variance evolves according to

$$ \frac{d\langle x^2(t) \rangle_{\text{before}}}{dt} = \frac{-2\kappa_{\min}}{\gamma} \sigma^2(t) + 2D, \quad (E4) $$

with the solution

$$ \langle x^2(t_m) \rangle_{\text{before}} = \left( \frac{k_B T}{\kappa_{\min}} - \frac{k_B T}{\kappa_{\max}} \right) e^{-2\kappa_{\max}t_m/\gamma} + \frac{k_B T}{\kappa_{\max}}. \quad (E5) $$

This corresponds to the spontaneous relaxation of the variance in the shallow potential of stiffness $\kappa_{min}$ after the last resetting event, at time $t = 0$ evaluated at time $t_m$, with initial condition $\langle x^2(0) \rangle_{\text{before}} = k_B T / \kappa_{max}$. The evolution of the variance before and after the resetting starts is schematized in Fig. 12. The constants $c_1$ and $c_2$ in Eq. (E3) can be expressed by matching the value of the initial value of $\langle x_m^2 \rangle$ to the final value of $\langle x^2(t_m) \rangle_{\text{before}}$ at the time $t_m$. This, combined with the solution Eq. (E3), allows to express the variance $\langle x^2(t) \rangle$ which is not only a functional of the protocol $\kappa(t > t_m)$ but also, through its initial condition set by $\sigma^2(t_m)$, a function of the time elapsed since the previous resetting event.

The resulting expression of the time-dependent variance reads

$$ \langle x^2(0 < t < \tau_w) \rangle = \frac{k_B T}{\kappa_{\max} \kappa_{\min} \sqrt{\gamma \Delta \kappa}} \left\{ \sqrt{\gamma \Delta \kappa} \cdot \left( \kappa_{\max} \exp \left[ \frac{\kappa_{\min}}{\gamma \tau_w} \left( t_m^2 + \frac{\kappa_{\min} \tau_w^2}{\Delta \kappa} \right) \right] + \Delta \kappa \exp \left[ \frac{\kappa_{\min}}{\gamma} \left( -t_m + \frac{t_m^2}{\tau_w} + \frac{\kappa_{\min} \tau_w}{\Delta \kappa} \right) \right] \right. \\ \left. - \kappa_{\max} \kappa_{\min} \sqrt{\pi \tau_w} \cdot \exp \left[ \frac{t_m^2 \kappa_{\min}}{\gamma \tau_w} \right] \cdot \text{erfi} \left[ \frac{\kappa_{\min} \sqrt{\tau_w}}{\sqrt{\gamma \Delta \kappa}} \right] \right\} \cdot \exp \left[ -\frac{2}{\gamma \tau_w} \left( \frac{t^2 \Delta \kappa}{2} - t \cdot (t_m \Delta \kappa + \kappa_{\min} \tau_w) \right) \right. \\ \left. - \frac{2}{\gamma} \left( t_m \kappa_{\min} + \frac{t_m^2 \kappa_{\max}}{\tau_w} + \frac{\kappa_{\min}^2 \tau_w}{\Delta \kappa} \right) \right] + \frac{k_B T \sqrt{\pi \tau_w}}{\sqrt{\gamma \Delta \kappa}} \cdot \exp \left[ -\frac{2}{\gamma \tau_w} \left( \frac{t^2 \Delta \kappa}{2} - t \cdot (t_m \Delta \kappa + \kappa_{\min} \tau_w) \right) \right] \\ \left. - \frac{(t_m \Delta \kappa - \kappa_{\min} \tau_w)^2}{\gamma \Delta \kappa \tau_w} \right] \cdot \text{erfi} \left[ \frac{(t - t_m) \Delta \kappa + \kappa_{\min} \tau_w}{\sqrt{\gamma \Delta \kappa \tau_w}} \right], $$

where $\Delta\kappa = \kappa_{max} - \kappa_{min}$. It follows an intuitive profile, which we represent in Fig. 12. After the last resetting event, when the stiffness is decreased, the variance starts to increase in the shallow $\kappa_{min}$ potential according to Eq. (E5). At time $t = t_m$, the next resetting event starts with a gradual increase of the stiffness, eventually quenching again the state to equilibrium in the potential of stiffness $\kappa_{max}$. This quench forces the variance to decrease to $k_B T / \kappa_{max}$ but the slow increase of $\kappa$ yields a nonmonotonic behavior for the variance. It depends on $t_m$, as described in Fig. 13.

For small values of $t_m$ the variance is strongly nonmonotonic in its return phase (blue line in Fig. 13, upper panel). Indeed, from 0 to $t_m$, the variance increases in the shallow potential but remains very close to the equilibrated value

$k_B T / \kappa_{max}$ it had reached within the stiff potential of the previous quench. When the stiffness $\kappa(t)$ starts at $t = t_m$ to quasistatically increase from $\kappa_{min}$ toward $\kappa_{max}$, the variance keeps increasing sensibly before it decreases again toward the target value $k_B T / \kappa_{max}$, following equipartition $\langle x^2(t) \rangle = k_B T / \kappa(t)$ over $t \gg t_m$. In the opposite limit of a large waiting time since last resetting (red line in Fig. 13, upper panel), the variance had time to relax close to $k_B T / \kappa_{min}$ so that when the stiffness starts to increase at $t_m$, the variance simply decreases monotonically following equipartition. For all cases in between, the variance transients in a nonmonotonic way.

Importantly, the nonmonotonic evolution of variance for short diffusive times $t_m$ reveals the nonequilibrium initial condition (equipartition breaking) and demonstrates why a
<figure><img src="image_16.png" /><figcaption>FIG. 13. (Upper panel) Variance decay $\langle x^2(t) \rangle$ as a function of time for different initial conditions, set by the time since last resetting. For clarity we set the last resetting event to have ended at time $t=0$ and plot the variance evolution starting from the different values of $t_m$. Therefore, the relaxation of the variance between both resetting events is visible through the envelope of the initial value of $\langle x^2(t) \rangle$ which draws the exponential decay Eq. (E5). The variance in the stiff trap is underline by a horizontal solid line, met in the long time-limit. The variance in the shallow trap is underline by a horizontal dashed line, it would be reached only for very long $t_m$ by the exponential relaxation in the shallow trap. (Lower panel) work of a resetting event as a function of the time since last reset (blue solid line) together with the probability of the same time $t_m$ (red dashed line).</figcaption></figure>

quasistatic driving is not reversible in that case and thus cannot correspond to the minimal expense of work. The instantaneous adjustment of $\kappa$ described in the main text as well as in the next section of the Appendix precisely serves at canceling this transient evolution, ensuring equipartition at all times. In the following, we derive the work associated with such nonoptimal quasistatic process, while the work expense of a reversible protocol will be derived in Appendix F.

The variance $\langle x^2(t) \rangle$ is an averaged quantity with respect to the stochastic position $x(t)$ but remains a random variable due to the randomness of the waiting time $t_m$ since last resetting which is drawn from the distribution $P(t_m) = \lambda e^{-\lambda t_m}$. The mean power to maintain a resetting steady state using quasistatic protocols reads

$$ \dot{W}_{\text{QS}} = \lambda \int_{0}^{\infty} P(t_m)W(t_m)dt_m, \qquad (\text{E6}) $$

where the work contribution of a resetting event occurring at a time $t_m$ after the previous resetting reads

$$ W(t_m) = \frac{1}{2} \int_{t_m}^{t_m + \tau_w} \dot{\kappa}(t) \langle x^2(t) \rangle dt, \qquad (\text{E7}) $$

where $\tau_w$ is the duration of the waiting time $\tau_{\text{wait}}$ in the stiff protocol, which, in the quasistatic limit corresponds to the protocol duration and $\langle x^2(t) \rangle$ the variance derived above. As seen Fig. 13 (lower panel), the work $W(t_m)$ increases with $t_m$ (blue solid line), reflecting the fact that that it is, on average, more costly to reset a particle which has diffused for a long time. However, this event also possesses a decreasing probability $P(t_m)$ in this Poissonian resetting scheme (red dashed line). Overall, the mean power $\dot{W}_{\text{QS}}$ takes into account both of these effects on average.

On the one side, $W(t_m)$ is an intermediate analytical quantity, which is not accessible experimentally, since it relies on an ensemble averaging over noise to measure $\langle x^2(t) \rangle$ without averaging over resetting times $t_m$. With our experimental procedure, these two averaging procedures cannot be taken independently. On the other side, the resulting average power $\dot{W} = \lambda \int P(t_m)W(t_m)dt_m$, where both averages over noise and $t_m$ have been taken, is a well defined experimental quantity. As explained in the main text, this average power is evaluated as an accumulation of work events along each trajectories experiencing independent resetting processes over the total duration of the trajectory $w_{\text{tot}}/t_{\text{tot}}$ where $t_{\text{tot}}$ large with respect to any characteristic timescale of the system. $\dot{W}_{\text{QS}}$ corresponds to the analytical quasistatic limit (red dashed line in Fig. 5) to the experimentally measured $\dot{W}^{\text{ext}}$ (circles in Fig. 5).

## APPENDIX F: REVERSIBLE LIMIT AND SZILARD-LIKE PROTOCOLS

As seen in the previous section, when a resetting event occurs, the system is in a dynamical nonequilibrium state: its motional variance transients between $k_B T / \kappa_{\text{max}}$ and $k_B T / \kappa_{\text{min}}$. The corresponding nonmonotonic evolution of the variance after the start of the new resetting shown in Fig. 13 therefore reveals that a quasistatic increase of the stiffness cannot correspond to a reversible driving of the system. It is however possible to obtain a reversible transformation by relying on a protocol similar to the one proposed by Szilard [50]. To do so, we instantaneously change at the new resetting time $t_m$ the stiffness to $\kappa(t_m) = k_B T / \langle x^2(t_m) \rangle$. This ensures that the system is at equilibrium at time $t_m$ and that, by quasistatically increasing $\kappa$, it remains at equilibrium until $\kappa = \kappa_{\text{max}}$. Importantly, these reversible Szilard-like equilibrium-to-equilibrium protocols accumulate in the long steady state (composed of many of such protocols) to a nonequilibrium steady state. Indeed, even if individual transformations are reversible, their ensemble still corresponds to a constant driving, maintaining the PDF different from the stationary equilibrium Gaussian in the potential $\kappa_{\text{min}}x^2/2$.

We now look at the thermodynamic cost of such a protocol. It is composed of four steps:

(1) Initially, the system is out of equilibrium with $\langle x^2(t_m) \rangle \neq k_B T / \kappa(t_m)$;

(2) the stiffness is increased to ensure equipartition $\kappa(t_m) = k_B T / \langle x^2(t_m) \rangle$: the system is now at equilibrium;

(3) the stiffness is increased quasistatically until $\kappa_{\text{max}}$ the system remains at equilibrium, with final variance $\langle x^2(t \gg t_m) \rangle = k_B T / \kappa_{\text{max}}$. This terminates the resetting operation;

(4) the stiffness is abruptly decreased to $\kappa_{\text{min}}$ again, initiating the next diffusing sequence.
The first three steps correspond to a transformation bringing the system from a nonequilibrium state to an equilibrium. The total entropy generated $\Sigma$ to carry such a three-step transformation can be precisely evaluated using a well known approach based on the nonequilibrium second law [32,49,63] and reads

$$T\Sigma = W - \Delta F_{\text{eq}} - k_B T \mathcal{D}(P_i || P_i^{\text{eq}}) + k_B T \mathcal{D}(P_f || P_f^{\text{eq}}), \quad (\text{F1})$$

where $\mathcal{D}(P||P_{\text{eq}}) = \int P(x) \ln(P(x)/P_{\text{eq}}(x))dx$ is the Kullback-Leibler divergence (or relative entropy) between the state $P(x)$ and the corresponding equilibrium. The equilibrium free energy is derived from the equilibrium partition functions and reads $\Delta F_{\text{eq}} = \frac{k_B T}{2} \ln(\frac{\kappa_{\text{max}}}{\kappa_{\text{min}}})$: It relates both equilibria in harmonic potentials of stiffness $\kappa_{\text{min}}$ and $\kappa_{\text{max}}$.

$P_i(x)$ corresponds to the state of the system when the transformation begins, and $P_f(x)$ to the state of the system when the transformation ends. In our case, for all times

$t \in [t_m, t_m + \tau_w]$ the corresponding (target) equilibrium state $P_f^{\text{eq}}(x)$ is a Gaussian of standard deviation $\sigma_f^{\text{eq}} = \sqrt{k_B T / \kappa_{\text{max}}}$. Since equilibrium is reached at the end of the transformation, hence $\mathcal{D}(P_f || P_f^{\text{eq}}) = 0$. At the start $t = t_m$ of the resetting sequence, however, the system still lies in the a nonequilibrium state characterized by

$$P_i(x) = \frac{1}{\sqrt{2\pi\sigma_i^2}} e^{-x^2/2\sigma_i^2}, \quad (\text{F2})$$

which differs from $P_i^{\text{eq}}(x)$ which is a Gaussian of standard deviation $\sigma_i^{\text{eq}} = \sqrt{k_B T / \kappa_{\text{min}}}$. The initial Kullback-Leibler divergence can therefore be evaluated using

$$\ln \left( \frac{P_i(x)}{P_i^{\text{eq}}(x)} \right) = \frac{1}{2} \left( -x^2 \left[ \frac{1}{\sigma_i^2} - \frac{1}{\sigma_{i, \text{eq}}^2} \right] + \ln \left[ \frac{\sigma_{i, \text{eq}}^2}{\sigma_i^2} \right] \right), \quad (\text{F3})$$

leading to

$$\begin{aligned} \mathcal{D}(P_i || P_i^{\text{eq}}) &= \frac{1}{2\sqrt{2\pi\sigma_i^2}} \int_{-\infty}^{+\infty} e^{-x^2/2\sigma_i^2} \left( -x^2 \left[ \frac{1}{\sigma_i^2} - \frac{1}{\sigma_{i, \text{eq}}^2} \right] + \ln \left[ \frac{\sigma_{i, \text{eq}}^2}{\sigma_i^2} \right] \right) dx, \\ &= -\frac{1}{2} \ln \left( \frac{\sigma_i^2}{\sigma_{i, \text{eq}}^2} \right) - \frac{1}{2\sqrt{2\pi\sigma_i^2}} \left[ \frac{1}{\sigma_i^2} - \frac{1}{\sigma_{i, \text{eq}}^2} \right] \int_{-\infty}^{+\infty} x^2 e^{-x^2/2\sigma_i^2} dx, \end{aligned}$$

where we recognize the motional variance $\sigma_i^2 \equiv \int x^2 P_i(x) dx$ in the last term. Using the notation $\theta = \sigma_i^2 / \sigma_{i, \text{eq}}^2$, the Kullback-Leibler divergence between the two Gaussian distributions,

$$\mathcal{D}(P_i || P_i^{\text{eq}}) = \frac{-1}{2} (\ln \theta - [\theta - 1]), \quad (\text{F4})$$

is a positive quantity since $\ln \theta < [\theta - 1]$. This is the expression used in the main text.

From a thermodynamic perspective, a reversible driving where the system is at thermal equilibrium at all times corresponds to a transformation with non-entropy production $\Sigma = 0$. From Eq. (F1), this leads to the definition of the minimal reversible work

$$W_{\text{rev}}^{\text{rst}} = \Delta F_{\text{eq}} - \frac{k_B T}{2} (\ln \theta - [\theta - 1]), \quad (\text{F5})$$

which is smaller than the equilibrium free-energy difference. Perfectly in line with the nonequilibrium second law [49], we show that using a correct evaluation of the initial distance to equilibrium allows reducing the thermodynamic cost of the transformation below the standard equilibrium limit $\Delta F_{\text{eq}}$. Note that the work $w_{\text{rev}}^{\text{rst}}$ is still a random variable of the elapsed time $t_m$ separating the two successive resetting events by defining the value of the variance $\sigma_i^2$ entering the definition of $\theta$.

The total work expended through all 4 steps described above should however also take into account the work that is exchanged when the stiffness is abruptly decreased at the end of the resetting sequence. The cost of such steplike transformation of the potential can be easily evaluated as $\frac{k_B T}{2} (\frac{\kappa_{\text{min}}}{\kappa_{\text{max}}} - 1)$ [59].

The average minimal power needed to maintain the system in a SR NESS using such reversible increases of stiffness for each resetting event reads

$$\dot{W}_{\text{rev}}^{\text{ext}} = \lambda \left( \Delta F_{\text{eq}} - k_B T \int_0^{\infty} \mathcal{D}(P_i(x, \tau) || P_i^{\text{eq}}(x)) \lambda e^{-\lambda \tau} d\tau + \frac{k_B T}{2} \left[ \frac{\kappa_{\text{min}}}{\kappa_{\text{max}}} - 1 \right] \right),$$

which is the expression used in the main text taking $t_m \equiv \tau$ and with the identification $\int_0^\infty \mathcal{D}(P_i(x, \tau) || P_i^{\text{eq}}(x)) \lambda e^{-\lambda \tau} d\tau = \langle \mathcal{D}(P_i(x, \tau) || P_i^{\text{eq}}(x)) \rangle_\tau = \langle I(\tau) \rangle_\tau$ as the average information erased by the successive resetting events.

## APPENDIX G: ERGODICITY AND DRIFT CORRECTION

Ergodicity of the stochastic processes at play is evaluated in a statistical ensemble of individual subtrajectories, drawn out of a long time series of position $x(t)$.

In Fig. 14, we show a schematic representation of how a statistical ensemble is built out of a single time series of position. On each individual subtrajectory, we can compute the time-averaged mean-square-displacement (TA-MSD)

$$\text{TA-MSD}^i \equiv \overline{\delta^2 x^i(\Delta)} \equiv \frac{1}{\overline{T} - \Delta} \int_0^{\overline{T} - \Delta} (x_{i+\Delta}^i - x_i^i)^2 dt, \quad (\text{G1})$$

where $\overline{T}$ is the total time of the measured subtrajectory. Because of the finite size of subtrajectories, an ensemble variance is still visible on the ensemble TA-MSD as seen in Fig. 14 (lower right panel). Ergodicity, as explained in the main text, is probed by looking at the evolution of this
<figure><img src="image_17.png" /><figcaption>FIG. 14. Schematic representation of the method used to build an ensemble of trajectories out of a single long time series of positions. The single 2.5 s trajectory yields an ensemble of 10 individual 0.25 s subtrajectories. The associated 10 individual TA-MSD are shown in the lower right graph, together with their mean (gray-blue dashed line).</figcaption></figure>

ensemble variance as a function of $T/\Delta$, a necessary and sufficient condition for the process to be ergodic being the vanishing of the ensemble variance for short $\Delta$. However, if the experimental setup suffers from low-frequency drift on the 300 s long experiments, then this ensemble variance will be combined with a systematic trend that will lead to an overestimation of the ergodic criterion $\epsilon(\Delta) \sim \text{var}(\text{TA-MSD})$. In this Appendix, we propose a novel method to decipher systematic from statistic ensemble variance of TA-MSD, by relying on their very short-time limit. This allows to correct for drifts and clearly unveil the differences between an ergodic normal Brownian motion in a potential and a nonergodic SR process.

We consider here, as in the section of the main text focused on the Landauer's limit, a 300 second-long trajectory that can be recast into an ensemble of a thousand subtrajectories of 0.3 s each, diffusing in an optical potential of stiffness $\kappa_{\min} = 2.9 \pm 0.15 \text{ pN/}\mu\text{m}$. We study both a normal Brownian motion diffusing in the aforementioned potential as well as a SR process in which the optical potential is increased to $\kappa_{\max} \approx 83 \text{ pN/}\mu\text{m}$ at a rate $\lambda^{-1} = 20 \omega_{\max}^{-1} \approx 6.1 \text{ ms}$. Each TA-MSD is computed as a time integral on individual subtrajectories of total time $T = 0.3 \text{ s}$. By comparing TA-MSDs at different absolute times, we can detect low-frequency drifts. To achieve the best accuracy, we probe TA-MSD for very short time lag $\Delta = 0.061 \text{ ms}$ where the statistical ensemble variance of TA-MSD is the smallest.

In Fig. 15(a) we show the value of TA-MSD at $\Delta = 0.061 \text{ nm}$ from blue to green for each chronologically ordered subtrajectory as a function of the absolute time of the experiment. It corresponds to a vertical cut in a TA-MSD plot such as displayed Figs. 7(a) and 7(b). Superimposed to the expected ensemble variance, we observe a systematic trend that can be

<figure><img src="image_18.png" /></figure>

<figure><img src="image_19.png" /><figcaption>FIG. 15. (a) Short time lag TA-MSD $\delta_x^2(\Delta = 0.061 \text{ ms})$ for each individual chronologically ordered subtrajectories as a function of the absolute time in seconds. We clearly observe a systematic trend well captured by the combination of linear decrease and a $\approx 10 \text{ s}$ sinusoidal evolution. The magnitude of the drift is of the order of 1.4 nm (mean displacement). (b) Associated ergodic criterion, both for a normal Brownian motion in a potential of stiffness $\kappa_{\min}$ and for an SR process in the same potential. We show the raw data measured from the calibrated photodiode as well as the same observable on data where the 1.4 nm mean displacement drift on the 300 s has been corrected for.</figcaption></figure>

fitted with a guess function, combination of negative constant slope and a 10 s sinusoidal oscillation. The fit gives the black continuous line in Fig. 15(a) and is used to correct, as a function of time, the calibration factor used to convert measured voltages into meter.

For both the raw measured data and the data corrected by the aforementioned method, we compute the ergodic criterion $\epsilon(\Delta)$ probing the ensemble variance of TA-MSD as a function of lag-time $\Delta$. In Fig. 15(b) we show the effect of the drift correction displaying the ergodic criterion $\epsilon(\Delta)$ for a normal Brownian without correction (blue circles) and with calibration correction (red triangles). Remarkably, the minute correction fitted on the short time-limit of TA-MSD very neatly recasts the ergodic criterion of the expected analytical result (black dashed line), computed for a Brownian motion in a potential of stiffness $\kappa = 83 \text{ pN/}\mu\text{m}$. On the one hand, this proves that the short time lag deviation of $\epsilon$ for normal Brownian motion is solely due to drift and not to a physical ergodicity breaking. On the other hand, the ergodic criterion evaluated on the SR process is strongly departing from this trend and does not vanish for short $\Delta$. Furthermore, the
probed magnitudes of $\epsilon$ are significantly larger and are therefore not affected by the drift (the statistical ensemble variance of TA-MSD is larger than the systematic trend) as seen in the equality of the ergodic criterion for the raw data (yellow squares) and corrected data (purple circles). This assesses the validity of the test: the deviation for SR process is not due to drift, but to a genuine physical ergodicity breaking.

## Numerical simulations

To complement the experimental results on ergodicity, we performed numerical simulations to investigate the same quantities. On Figs. 16(a) and 16(b) we show the TA-MSD and EA-MSD obtained from simulation results, giving the same behavior as in the experiments shown in the main text. To gain insight on the anomalous ensemble variance of TA-MSD for short $\Delta$, we show on Figs. 16(c) and 16(d) the ensemble histogram (over 3000 independent trajectories) of the individual TA-MSD for lags $\Delta$ ranging from 0.7 ms (blue line) down to 0.03 ms (red line). In the case of equilibrium diffusion in the absence of resetting, the distribution collapses to a Dirac $\delta$ distribution, as expected. In the case of an Ornstein-Uhlenbeck process with resetting however, a finite distribution remains.

As in the main text, this ensemble variance is studied with the ergodic criterion $\epsilon(\Delta)$, which is shown in Fig. 16(e) with (red triangles) and without (blue circles) resetting. The nonergodic nature of the resetting case is, again, revealed by the hindered decay of $\epsilon(\Delta)$ for small $\Delta$. We complement this result with the case of free Brownian motion (BM) with resetting, and an Ornstein-Uhlenbeck process with a modified stiffness $\kappa_{\text{eff}}$, as explained in the caption.

In Fig. 17, we show the ergodic criterion for a broad range of resetting rates. It is obtained from numerical simulations of 3000 independent Ornstein-Uhlenbeck processes under resetting over $10^4$ time-steps with equal time-steps as in the experiment (i.e., $\approx 2^{-15} \approx 3 \times 10^{-5}$ s). In Fig. 17, $\epsilon(\Delta)$ clearly shows the progressive convergence toward equilibrium for large mean resetting times, as expected. This evolution, however, seems to be nonmonotonic. We plot as a function of $\lambda^{-1}$ in Fig. 17(b) the deviation $\epsilon_{\Delta} - \epsilon_{\Delta}^{\text{eq}}$ between the ergodic criterion in the presence of resetting with respect to its equilibrium counterpart in the absence of resetting. The yellow triangles correspond to a fixed $\Delta = 0.3$ ms (underlined with a vertical line on panel (a)) and clearly display a nonmonotonic convergence toward equilibrium. This evolution gets smeared out in a regime of intermediate $\Delta$ (here $\Delta \sim 1.5$ ms) where the different $\epsilon(\Delta)$ cross. Their long-time limit (short $\lambda^{-1}$) shows opposite scalings.

We finally seek for a qualitative link between ergodicity breaking and the ability to process information can be made quantitative [71, 78, 79]. As a tentative move in that direction, we measure the mean deviation between $\epsilon(\Delta)$ [triangles for NESS and circles for equilibrium, in Fig. 7(b)] from the expected trend for equilibrium $\epsilon^{\text{eq}}(\Delta)$ [black dashed line in Fig. 7(b)]. The root-mean-square error $E_{\epsilon-\epsilon^{\text{eq}}}(\lambda) = \sqrt{\frac{1}{T} \int_0^T |\epsilon(\Delta) - \epsilon^{\text{eq}}(\Delta)|^2 d\Delta}$ gives a simple quantification of

<figure><img src="image_20.png" /><figcaption>FIG. 16. (a), (b) Numerical simulation results. The EA-MSD (red line) coincides with the TEA-MSD (blue line), ensemble average of individual TA-MSD both for the normal Ornstein-Uhlenbeck process (a) and in the presence of resetting (b). However, the ensemble of individual TA-MSD (light lines in the background) shows a different ensemble variance. In the case of resetting, the ensemble variance of TA-MSD does not collapse in the limit of large $T/\Delta$, denoting a weak ergodicity breaking, well captured by the ergodic criterion. (c), (d) Histograms of the individual TA-MSD measured over the ensemble, for different lag-time, ranging from 0.7 ms (blue line) down to 0.03 ms, i.e., the inverse of the experimental acquisition frequency (red line), both for the normal Ornstein-Uhlenbeck process (c) and in the presence of resetting (d). (e) Ergodic criterion $\epsilon(\Delta)$ obtained from numerical simulations both for an equilibrium trajectory in the harmonic potential without resetting [normal Brownian motion (BM), blue circles] and for an SR process in the same potential (red triangles). The analytic expression for $\epsilon(\Delta)$ (black dashed line) coincides with the simulation result for normal BM while the measured values for an SR process are significantly different. To add credence to this result, we compare it with two additional cases: free Brownian motion under resetting with equal rate (orange squares) which has been shown to be nonergodic from the point of view of TA-MSD as well as a normal BM with a modified stiffness (light-blue circles) defined as $\kappa_{\text{eff}} = k_B T / \langle x_{\text{st}}^2 \rangle$. This is done to have the same variance as the Ornstein-Uhlenbeck process under resetting and to rule out a mere scaling effect.</figcaption></figure>
<figure><img src="image_21.png" /></figure>

FIG. 17. (a) Ergodic criterion $\epsilon(\Delta)$ obtained from simulating an Ornstein-Uhlenbeck process with stochastic resetting with mean resetting times $\lambda^{-1}$ ranging from 1 to $10^3$ ms (red to light-blue line), together with the case without resetting (blue line) and its analytical expression (black dashed line). One can observe the convergence of $\epsilon(\Delta)$ to the equilibrium case as $\lambda^{-1}$ increase, implying fewer resetting event. (b) Deviation $\epsilon_{\Delta} - \epsilon_{\Delta}^{\text{eq}}$ for fixed $\Delta$ of 0.3ms (yellow triangles) and 1.5 ms (red squares) as a function of the mean resetting time.

ergodicity breaking. For equilibrium, this deviation should be zero and should only account for experimental errors [single turquoise circle on the left of Fig. 7(c)]. When resetting is turned on, the deviation (blue circles) increases with the

<figure><img src="image_22.png" /></figure>

FIG. 18. Root-mean-square error $\mathcal{E}(\lambda)$ between the measured ergodic criterion $\epsilon(\Delta)$ and its equilibrium counterpart as a quantitative measure of ergodicity breaking (deep blue circles) as a function of the total entropy production in units of $k_B T / \tau_{\text{slow}}$, where $\tau_{\text{slow}} = \gamma / \kappa_{\text{min}}$, for the same resetting rates $\lambda$ as the thermodynamics of Figs. 4(b) and 4(c). We also represent the same error measured in the same experiment in the absence of resetting (turquoise circle in the bottom left) and a linear fit of all measured deviation points $\mathcal{E}_{\epsilon-\epsilon^{\text{eq}}}(\lambda)$ (red line).

resetting rate $\lambda$, as the system is pushed further away from equilibrium. As seen in Fig. 7(c), $\mathcal{E}_{\epsilon-\epsilon^{\text{eq}}}(\lambda)$ scales linearly with total entropy production $\dot{S}_{\text{tot}}(\lambda)$. It is interesting to note that, here, the total entropy production is proportional to the average rate of free-energy difference, which quantifies an average distance from equilibrium. The average rate free-energy also quantifies the optimal performances of resetting in steady states, as it provides a lower bound for its energetic cost. Our result therefore hints that the performances of the SR, interpreted as an information engines, are bounded by its quantitative ergodicity-breaking. The simple proposed measure $\mathcal{E}_{\epsilon-\epsilon^{\text{eq}}}$ should be refined to gain insight on the exact ergodicity-breaking mechanisms at play, which can depend on time lag. This, however, is beyond the scope of this work. We only stress that the correlation observed experimentally in Fig. 18 can be explored in other contexts of information-to-work conversion schemes [35].

[1] S. C. Manrubia and D. H. Zanette, Stochastic multiplicative processes with reset events, Phys. Rev. E **59**, 4945 (1999).

[2] M. R. Evans and S. N. Majumdar, Diffusion with stochastic resetting, Phys. Rev. Lett. **106**, 160601 (2011).

[3] L. Kusmierz, S. N. Majumdar, S. Sabhapandit, and G. Schehr, First order transition for the optimal search time of Lévy flights with resetting, Phys. Rev. Lett. **113**, 220602 (2014).

[4] M. Montero, A. Masó-Puigdellosas, and J. Villarroel, Continuous-time random walks with reset events, Eur. Phys. J. B **90**, 176 (2017).

[5] A. Chechkin and I. M. Sokolov, Random search with resetting: A unified renewal approach, Phys. Rev. Lett. **121**, 050601 (2018).

[6] M. R. Evans, S. N. Majumdar, and G. Schehr, Stochastic resetting and applications, J. Phys. A: Math. Theor. **53**, 193001 (2020).

[7] M. Magoni, S. N. Majumdar, and G. Schehr, Ising model with stochastic resetting, Phys. Rev. Res. **2**, 033182 (2020).

[8] V. Kumar, O. Sadekar, and U. Basu, Active Brownian motion in two dimensions under stochastic resetting, Phys. Rev. E **102**, 052129 (2020).

[9] G. Perfetto, F. Carollo, M. Magoni, and I. Lesanovsky, Designing nonequilibrium states of quantum matter through stochastic resetting, Phys. Rev. B **104**, L180302 (2021).

[10] A. Stanislavsky and A. Weron, Optimal non-Gaussian search with stochastic resetting, Phys. Rev. E **104**, 014125 (2021).

[11] D. Boyer and C. Solis-Salas, Random walks with preferential relocations to places visited in the past and their application to biology, Phys. Rev. Lett. **112**, 240601 (2014).

[12] E. Roldán, A. Lisica, D. Sánchez-Taltavull, and S. W. Grill, Stochastic resetting in backtrack recovery by RNA polymerases, Phys. Rev. E **93**, 062411 (2016).

[13] P. C. Bressloff, Modeling active cellular transport as a directed search process with stochastic resetting and delays, J. Phys. A: Math. Theor. **53**, 355001 (2020).
[14] C. Roberts, E. Sezik, and E. Lardet, Ratchet-mediated resetting: Current, efficiency, and exact solution, *J. Phys. A: Math. Theor.* **57**, 325001 (2024).

[15] S. Pal, D. Boyer, L. Dagdug, and A. Pal, Channel-facilitated transport under resetting dynamics, *J. Chem. Phys.* **161**, 144114 (2024).

[16] O. Blumer, S. Reuveni, and B. Hirshberg, Stochastic resetting for enhanced sampling, *J. Phys. Chem. Lett.* **13** 11230 (2022).

[17] O. Blumer, S. Reuveni, and B. Hirshberg, Combining stochastic resetting with metadynamics to speed-up molecular dynamics simulations, *Nat. Commun.* **15**, 240 (2024).

[18] O. Tal-Friedman, A. Pal, A. Sekhon, S. Reuveni, and Y. Roichman, Experimental realization of diffusion with stochastic resetting, *J. Phys. Chem. Lett.* **11**, 7350 (2020).

[19] B. Besga, A. Bovon, A. Petrosyan, S. N. Majumdar, and S. Ciliberto, Optimal mean first-passage time for a Brownian searcher subjected to resetting: Experimental and theoretical results, *Phys. Rev. Res.* **2**, 032029(R) (2020).

[20] B. Besga, F. Faisant, A. Petrosyan, S. Ciliberto, and S. N. Majumdar, Dynamical phase transition in the first-passage probability of a Brownian motion, *Phys. Rev. E* **104**, L012102 (2021).

[21] A. Altshuler, O. L. Bonomo, N. Gorohovsky, S. Marchini, E. Rosen, O. Tal-Friedman, S. Reuveni, and Y. Roichman, Environmental memory facilitates search with home returns, *Phys. Rev. Res.* **6**, 023255 (2024).

[22] M. R. Evans, S. N. Majumdar, and K. Mallick, Optimal diffusive search: Nonequilibrium resetting versus equilibrium dynamics, *J. Phys. A: Math. Theor.* **46**, 185001 (2013).

[23] I. M. Sokolov, Linear response and fluctuation-dissipation relations for Brownian motion under resetting, *Phys. Rev. Lett.* **130**, 067101 (2023).

[24] J. Fuchs, S. Goldt, and U. Seifert, Stochastic thermodynamics of resetting, *Europhys. Lett.* **113**, 60009 (2016).

[25] J. C. Sunil, R. A. Blythe, M. R. Evans, and S. N. Majumdar, The cost of stochastic resetting, *J. Phys. A: Math. Theor.* **56**, 395001 (2023).

[26] A. Pal and S. Rahav, Integral fluctuation theorems for stochastic resetting systems, *Phys. Rev. E* **96**, 062135 (2017).

[27] D. Gupta, C. A. Plata, and A. Pal, Work fluctuations and Jarzynski equality in stochastic resetting, *Phys. Rev. Lett.* **124**, 110608 (2020).

[28] A. Pal, S. Reuveni, and S. Rahav, Thermodynamic uncertainty relation for systems with unidirectional transitions, *Phys. Rev. Res.* **3**, 013273 (2021).

[29] S. Gupta and A. M. Jayannavar, Stochastic resetting: A (very) brief review, *Front. Phys.* **10**, 789097 (2022).

[30] D. Gupta and C. A. Plata, Work fluctuations for diffusion dynamics submitted to stochastic return, *New J. Phys.* **24**, 113034 (2022).

[31] F. Mori, K. S. Olsen, and S. Krishnamurthy, Entropy production of resetting processes, *Phys. Rev. Res.* **5**, 023103 (2023).

[32] J. M. R. Parrondo, J. M. Horowitz, and T. Sagawa, Thermodynamics of information, *Nat. Phys.* **11**, 131 (2015).

[33] R. Goerlich, L. Hoek, O. Chor, S. Rahav, and Y. Roichman, Experimental realizations of information engines: Beyond proof of concept, *Europhys. Lett.* **149**, 61001 (2025).

[34] S. Toyabe, T. Sagawa, M. Ueda, E. Muneyuki, and M. Sano, Experimental demonstration of information-to-energy conversion

and validation of the generalized Jarzynski equality, *Nat. Phys.* **6**, 988 (2010).

[35] E. Roldán, I. A. Martínez, J. M. R. Parrondo, and D. Petrov, Universal features in the energetics of symmetry breaking, *Nat. Phys.* **10**, 457 (2014).

[36] T. Admon, S. Rahav, and Y. Roichman, Experimental realization of an information machine with tunable temporal correlations, *Phys. Rev. Lett.* **121**, 180601 (2018).

[37] G. Paneru, D. Y. Lee, T. Tusty, and H. K. Pak, Lossless Brownian information engine, *Phys. Rev. Lett.* **120**, 020601 (2018).

[38] M. Ribezzi-Crivellari and F. Ritort, Large work extraction and the Landauer limit in a continuous Maxwell demon, *Nat. Phys.* **15**, 660 (2019).

[39] T. K. Saha, J. N. Lucero, J. Ehrich, D. A. Sivak, and J. Bechhoefer, Maximizing power and velocity of an information engine, *Proc. Natl. Acad. Sci. USA* **118**, e2023356118 (2021).

[40] M. Lagoin, C. Crauste-Thibierge, and A. Naert, Human-scale Brownian ratchet: A historical thought experiment, *Phys. Rev. Lett.* **129**, 120606 (2022).

[41] O. Chor, A. Sohachi, R. Goerlich, E. Rosen, S. Rahav, and Y. Roichman, Many-body Szilárd engine with giant number fluctuations, *Phys. Rev. Res.* **5**, 043193 (2023).

[42] J. V. Koski, A. Kutvonen, I. M. Khaymovich, T. Ala-Nissila, and J. P. Pekola, On-chip Maxwell's demon as an information-powered refrigerator, *Phys. Rev. Lett.* **115**, 260602 (2015).

[43] J. C. Maxwell, *Theory of Heat*, 3rd ed. (Dover Publications, Oxford, UK, 1871), Chap. 22.

[44] L. Szilard, On the decrease of entropy in a thermodynamic system by the intervention of intelligent beings, *Behav. Sci.* **9**, 301 (1964).

[45] D. Gupta, C. A. Plata, A. Kundu, and A. Pal, Stochastic resetting with stochastic returns using external trap, *J. Phys. A: Math. Theor.* **54**, 025003 (2021).

[46] A. S. Bodrova and I. M. Sokolov, Resetting processes with noninstantaneous return, *Phys. Rev. E* **101**, 052130 (2020).

[47] G. Mercado-Vásquez, D. Boyer, S. N. Majumdar, and G. Schehr, Intermittent resetting potentials, *J. Stat. Mech.* (2020) 113203.

[48] I. Santra, S. Das, and S. K. Nath, Brownian motion under intermittent harmonic potentials, *J. Phys. A: Math. Theor.* **54**, 334001 (2021).

[49] M. Esposito and C. V. den Broeck, Second law and Landauer principle far from equilibrium, *Europhys. Lett.* **95**, 40004 (2011).

[50] L. Szilard, über die entropieverminderung in einem thermodynamischen system bei eingriffen intelligenter wesen, *Z. Phys.* **53**, 840 (1929).

[51] A. Pal, Diffusion in a potential landscape with stochastic resetting, *Phys. Rev. E* **91**, 012113 (2015).

[52] I. S. Gradshteyn and I. M. Ryzhik, *Table of Integrals, Series, and Products*, 7th ed. (Elsevier/Academic Press, Amsterdam, 2007), pp. 1170–1171.

[53] U. Seifert, Entropy production along a stochastic trajectory and an integral fluctuation theorem, *Phys. Rev. Lett.* **95**, 040602 (2005).

[54] D. Y. Lee, J. Um, G. Paneru, and H. K. Pak, An experimentally-achieved information-driven Brownian motor shows maximum power at the relaxation time, *Sci. Rep.* **8**, 12121 (2018).
[55] K. Sekimoto, Langevin Equation and Thermodynamics, Prog. Theor. Phys. Suppl. **130**, 17 (1998).

[56] K. Sekimoto, *Stochastic Energetics* (Springer-Verlag, Berlin, Heidelberg, 2010).

[57] S. Ciliberto, Experiments in stochastic thermodynamics: Short history and perspectives, Phys. Rev. X **7**, 021051 (2017).

[58] J. Bechhoefer, S. Ciliberto, S. Pigolotti, and E. Roldán, Stochastic thermodynamics: experiment and theory, J. Stat. Mech. (2020) 064001.

[59] Y. Rosales-Cabara, G. Manfredi, G. Schnoering, P.-A. Hervieux, L. Mertz, and C. Genet, Optimal protocols and universal time-energy bound in Brownian thermodynamics, Phys. Rev. Res. **2**, 012012(R) (2020).

[60] A. Bérut, A. Arakelyan, A. Petrosyan, S. Ciliberto, R. Dillenschneider, and E. Lutz, Experimental verification of Landauer's principle linking information and thermodynamics, Nature (London) **483**, 187 (2012).

[61] Y. Jun, M. Gavrilov, and J. Bechhoefer, High-precision test of Landauer's principle in a feedback trap, Phys. Rev. Lett. **113**, 190601 (2014).

[62] E. Lutz and S. Ciliberto, Information: From Maxwell's demon to Landauer's eraser, Phys. Today **68**(9), 30 (2015).

[63] S. Ciliberto and E. Lutz, The physics of information: From Maxwell to Landauer, in *Energy Limits in Computation*, edited by C. Lent, A. Orlov, W. Porod, and G. Snider (Springer, Cham, 2019), pp. 155-175.

[64] H. Touchette, The large deviation approach to statistical mechanics, Phys. Rep. **478**, 1 (2009).

[65] I. A. Martínez, A. Petrosyan, D. Guéry-Odelin, E. Trizac, and S. Ciliberto, Engineered swift equilibration of a Brownian particle, Nat. Phys. **12**, 843 (2016).

[66] David Guéry-Odelin, C. Jarzynski, C. A. Plata, A. Prados, and E. Trizac, Driving rapidly while remaining in control: Classical shortcuts from Hamiltonian to stochastic dynamics, Rep. Prog. Phys. **86**, 035902 (2023).

[67] D. Gupta, K. S. Olsen, and S. Krishnamurthy, Thermodynamic cost of recurrent erasure, Commun. Phys. **8**, 355 (2025).

[68] A. B. Boyd, D. Mandal, and J. P. Crutchfield, Correlation-powered information engines and the thermodynamics of self-correction, Phys. Rev. E **95**, 012152 (2017).

[69] J. M. Horowitz and J. M. Parrondo, Optimizing non-ergodic feedback engines, Acta Phys. Pol. B **44**, 803 (2013).

[70] S. Dago, J. Pereda, N. Barros, S. Ciliberto, and L. Bellon, Information and thermodynamics: Fast and precise approach to Landauer's bound in an underdamped micromechanical oscillator, Phys. Rev. Lett. **126**, 170601 (2021).

[71] V. Stojkoski, T. Sandev, L. Kocarev, and A. Pal, Autocorrelation functions and ergodicity in diffusion with stochastic resetting, J. Phys. A: Math. Theor. **55**, 104003 (2022).

[72] R. Metzler and J. Klafter, The random walk's guide to anomalous diffusion: A fractional dynamics approach, Phys. Rep. **339**, 1 (2000).

[73] W. Deng and E. Barkai, Ergodic properties of fractional Brownian-Langevin motion, Phys. Rev. E **79**, 011112 (2009).

[74] A. G. Cherstvy and R. Metzler, Ergodicity breaking, ageing, and confinement in generalized diffusion processes with position and time dependent diffusivity, J. Stat. Mech. (2015) P05010.

[75] R. Metzler, J.-H. Jeon, A. G. Cherstvy, and E. Barkai, Anomalous diffusion models and their properties: Non-stationarity, non-ergodicity, and ageing at the centenary of single particle tracking, Phys. Chem. Chem. Phys. **16**, 24128 (2014).

[76] M. Li, O. Sentissi, S. Azzini, G. Schnoering, A. Canaguier-Durand, and C. Genet, Subfemtonewton force fields measured with ergodic Brownian ensembles, Phys. Rev. A **100**, 063816 (2019).

[77] R. Goerlich, M. Li, S. Albert, G. Manfredi, P.-A. Hervieux, and C. Genet, Noise and ergodic properties of Brownian motion in an optical tweezer: Looking at regime crossovers in an Ornstein-Uhlenbeck process, Phys. Rev. E **103**, 032132 (2021).

[78] V. Stojkoski, T. Sandev, L. Kocarev, and A. Pal, Geometric Brownian motion under stochastic resetting: A stationary yet nonergodic process, Phys. Rev. E **104**, 014121 (2021).

[79] W. Wang, A. G. Cherstvy, H. Kantz, R. Metzler, and I. M. Sokolov, Time averaging and emerging nonergodicity upon resetting of fractional Brownian motion and heterogeneous diffusion processes, Phys. Rev. E **104**, 024105 (2021).

[80] D. Vinod, A. G. Cherstvy, R. Metzler, and I. M. Sokolov, Time-averaging and nonergodicity of reset geometric Brownian motion with drift, Phys. Rev. E **106**, 034137 (2022).

[81] E. Barkai, R. Flaquer-Galmés, and V. Méndez, Ergodic properties of Brownian motion under stochastic resetting, Phys. Rev. E **108**, 064102 (2023).

[82] J. M. Meylahn, S. Sabhapandit, and H. Touchette, Large deviations for Markov processes with resetting, Phys. Rev. E **92**, 062148 (2015).

[83] A. G. Cherstvy, A. B. Kolomeisky, and A. A. Kornyshev, Protein DNA interactions: Reaching and recognizing the targets, J. Phys. Chem. B **112**, 4741 (2008).

[84] K. S. Olsen, D. Gupta, F. Mori, and S. Krishnamurthy, Thermodynamic cost of finite-time stochastic resetting, Phys. Rev. Res. **6**, 033343 (2024).

[85] K. S. Olsen and D. Gupta, Thermodynamic work of partial resetting, J. Phys. A: Math. Theor. **57**, 245001 (2024).

[86] I. Santra, U. Basu, and S. Sabhapandit, Run-and-tumble particles in two dimensions under stochastic resetting conditions, J. Stat. Mech. (2020) 113206.

[87] I. Abdoli and A. Sharma, Stochastic resetting of active Brownian particles with Lorentz force, Soft Matter **17**, 1307 (2021).

[88] L. K. Davis, K. Proesmans, and É. Fodor, Active matter under control: Insights from response theory, Phys. Rev. X **14**, 011012 (2024).

[89] G. Volpe and G. Volpe, Simulation of a Brownian particle in an optical trap, Am. J. Phys. **81**, 224 (2013).

[90] D. M. Busiello, D. Gupta, and A. Maritan, Entropy production in systems with unidirectional transitions, Phys. Rev. Res. **2**, 023011 (2020).