Introduction

The analysis of heat engines has played a key role since the birth of thermodynamics1. The advent of quantum thermodynamics has followed a similar path, with the design and characterization of quantum heat engines2,3. Early theoretical proposals4 have been adapted for their implementation with current platforms for quantum technologies, including trapped ions5,6,7, nitrogen-vacancy centers8, ultracold gases9, and NMR systems10. Technological advances have motivated studies beyond canonical equilibrium involving coherence, squeezing, negative temperatures11,12,13,14,15, and genuine nonequilibrium protocols, although such processes typically reduce efficiency due to irreversibility. Driving schemes such as shortcuts to adiabaticity16,17,18 fast-forward a quantum adiabatic evolution in finite time, but their exact implementation can be challenging19 and aims for the same efficiency of adiabatic thermal cycles.

Designing quantum heat engines utilizing many-body systems as a working medium is necessary for their scaling17,20 and paves the way to harness a wide variety of phenomena without a single-particle counterpart, including quantum statistics21,22, interparticle interactions9,23,24,25, and critical phenomena26. As many-body systems generally thermalize, the working medium follows equilibrium states if subject to slow operations. Hence, most previous studies have considered working medium at thermal equilibrium. Yet, several many-body systems feature constraints that forbid canonical thermalization27 and present genuine prethermal phases in which quantum simulators28,29 could perform reversible operations. A natural question is whether this scenario could be advantageous in increasing the performance of quantum heat engines. An important precedent in this regard is the study of quantum heat engines that harness many-body localization30.

This article investigates the impact of prethermalization27 in extended many-body systems on the engine efficiency, revealing that its advantage, relative to thermalizing working media, is universally determined by the temperatures of the thermal baths. In particular, prethermal heat engines that operate at negative temperatures exhibit a universal efficiency boost.

We consider Otto cycles operating between two thermal baths and performing work through a tunable parameter χ. Without altering the baths, we compare prethermalization against thermalization during the adiabatic strokes, highlighting the role of the many-body working medium, whereas previous works focused on prethermal baths in few-body engines31. We consider the following strokes depicted in Fig. 1:

  1. (i)

    Adiabatic transformation. The system starts at thermal equilibrium with the bath, then it evolves in isolation, slowly changing χ and possibly exploring prethermal phases. It exchanges work \({{{{\mathcal{W}}}}}_{1}\), but not heat, and the entropy is conserved.

  2. (ii)

    Isochore transformation. At constant χ, the system reaches thermal equilibrium with the second bath exchanging heat \({{{{\mathcal{Q}}}}}_{1}\), but not work.

  3. (iii)

    The cycle is closed with another adiabatic stroke exploring a prethermal phase, exchanging work \({{{{\mathcal{W}}}}}_{2}\), and a isochoric transformation, exchanging heat \({{{{\mathcal{Q}}}}}_{2}\).

The system is governed by a Hamiltonian of the form H(χ) = H0(χ) + ϵV, where the perturbation governed by the small parameter ϵ governs prethermalization. Specifically, we assume the unperturbed Hamiltonian H0(χ) features N conserved charges \({\{{Q}_{j}\}}_{j=1}^{N}\), which may depend on χ, and satisfy [QjH0(χ)] = 0. The small perturbation ϵV is assumed to break some charges and deforms the others \({Q}_{j}\to {Q}_{j}^{{\prime} }={Q}_{j}+\delta {Q}_{j}(\epsilon )\), in such a way that \([{Q}_{j}^{{\prime} },H(\chi )]=0\) for \(j\in \{1,\ldots,{N}^{{\prime} } < \, N\}\). This is a fairly common scenario. For example, resonant tunneling in multicomponent ultracold gases32 or tunneling in adjacent superfluids33 breaks inter-species particle number conservation, Floquet-engineered Hamiltonians showcase symmetries broken at finite driving frequencies34, and integrable systems35,36 have infinitely many conservation laws broken by perturbations.

Fig. 1: Thermal vs prethermal Otto cycles.
figure 1

The thermodynamic ensemble (thermal plane) describing the adiabatic strokes of a thermalizing working medium is described by a few conserved charges, including the energy, and the control parameter χ. Prethermal working matter is characterized by a larger number of charges, exploring prethermal phases.

Isolated quantum systems with weakly-broken conserved charges undergo prethermalization: after a fast timescale tpth decided by microscopic processes37, the system relaxes to the maximally-entropic state compatible with the conservation laws of the unperturbed Hamiltonian H0. This is the prethermal phase. Then, on a slow time scale tth tpth usually polynomially growing in ϵ−138,39,40, relaxation to a steady state determined by the reduced set of charges is observed. This is the thermal phase, where only few charges like the Hamiltonian and the particle number are conserved. For commuting charges, the two phases are described by generalized Gibbs ensemble (GGE) \(\hat{\rho }={Z}^{-1}{e}^{-{\sum }_{j}{\beta }_{j}{Q}_{j}}\)35,41 where the appropriate charges and generalized inverse temperatures βj are considered. Although the GGE excludes certain nonergodic mechanisms, such as many-body localization30,42 and fractons43, it remains very general.

To highlight the impact of conservation laws only, we consider adiabatic processes where the adiabatic strokes follow the appropriate GGE, being it prethermal (tpth χ/(dχ/dt) tth) or thermal (tth χ/(dχ/dt)), and compare the two cases in the small ϵ limit. This adiabaticity requirement is much less stringent than quantum adiabaticity44, whose time scale diverges in the absence of an energy gap, as is common in the thermodynamic limit. Our focus is on the cycle’s efficiency, namely the ratio between the total work \({{{\mathcal{W}}}}={{{{\mathcal{W}}}}}_{1}+{{{{\mathcal{W}}}}}_{2}\) and the absorbed heat \({{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}=\max ({{{{\mathcal{Q}}}}}_{1},{{{{\mathcal{Q}}}}}_{2})\)

$$\eta={{{\mathcal{W}}}}/{{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}.$$
(1)

We unveil a universal efficiency enhancement: Thermalizing medium is more efficient for a positive bath temperature, whereas prethermalization is convenient at a negative temperature. This holds whenever all the charges conserved by the thermalizing dynamics, with the exception of the Hamiltonian H0(χ), are independent of the control parameter χ, while the whole set of prethermal charges can depend on χ. We provide analytical proof for infinitesimal cycles on the basis of general thermodynamic inequalities without any assumption on the number of conservation laws, the form of interactions, or the dimensionality of the system. We furthermore demonstrate our findings using finite cycles with integrable systems, i.e., minimal interacting one-dimensional models featuring infinitely many conservation laws, amenable to many-body analytical computations far from equilibrium35,45,46,47. An interaction-driven quantum Otto cycle has been experimentally realized in a three-dimensional atomic cloud across the BEC-BCS crossover9, and nearly-integrable variants are also possible23. However, realizing negative temperatures requires Hamiltonians with a finite maximum energy: this is not possible in continuous systems, but it is conceivable in experiments on a lattice14,48,49. As a proof of concept, we concretely discuss how our findings can be probed in state-of-the-art quantum gas microscopes, realizing integrable spin chains50 with tunable integrability-breaking perturbations. In this context, we discuss how to engineer negative temperature states and measure the work done during the (pre)thermal adiabatic strokes.

Results

The adiabatic flow equations

We begin studying the evolution of the state during the adiabatic strokes. In the limit of slow changes of the control parameter χ, the system instantaneously follows a GGE with evolving generalized temperatures, which we conveniently arrange in a vector \({\{{\beta }_{j}\}}_{j}\to {{{\boldsymbol{\beta }}}}\). As advanced in the introduction, we consider the limit where the perturbation breaking conservation laws is infinitesimal ϵ → 0, such that its effect is solely to break certain charges, without substantially altering the remaining ones.

We derive the flow equations that govern the adiabatic strokes in the prethermal states, since the thermal case follows similarly. To this end, it is convenient to approximate the smooth evolution as a sequence of sudden increments χ → χ + dχ separated by a waiting time dt. The adiabatic limit dχ/dt → 0 is then taken, considering a large waiting time, in such a way that the system prethermalizes to the new generalized inverse temperatures βpth(χ + dχ). Let Qj(χ) be the parametrically χ − dependent charge, and 〈…〉χ,β be the expectation value in the prethermal state at χ. The parameters βpth are determined by charge conservation \({\langle {Q}_{j}(\chi+{{{\rm{d}}}}\chi )\rangle }_{\chi,{{{{\boldsymbol{\beta }}}}}^{{{{\rm{pth}}}}}(\chi )}={\langle {Q}_{j}(\chi+{{{\rm{d}}}}\chi )\rangle }_{\chi+{{{\rm{d}}}}\chi,{{{{\boldsymbol{\beta }}}}}^{{{{\rm{pth}}}}}(\chi+{{{\rm{d}}}}\chi )}\). To linear order, one gets the flow equations

$${C}_{{{{\rm{pth}}}}}{\partial }_{\chi }{{{{\boldsymbol{\beta }}}}}^{{{{\rm{pth}}}}}+{A}_{{{{\rm{pth}}}}}{{{{\boldsymbol{\beta }}}}}^{{{{\rm{pth}}}}}=0,$$
(2)

where the χ − dependence is omitted to ease the notation. Above, we defined the static covariance matrix as the connected charge-charge correlators \({[{C}_{{{{\rm{pth}}}}}]}_{i,j}={\langle {Q}_{i}{Q}_{j}\rangle }_{{{{\rm{c}}}}}\), and the susceptibility matrix \({[{A}_{{{{\rm{pth}}}}}]}_{i,j}={\langle {Q}_{i}{\partial }_{\chi }{Q}_{j}\rangle }_{{{{\rm{c}}}}}\). Here we defined the connected correlators as \({\langle {{{{\mathcal{O}}}}}_{1}{{{{\mathcal{O}}}}}_{2}\rangle }_{{{{\rm{c}}}}}\equiv \langle {{{{\mathcal{O}}}}}_{1}{{{{\mathcal{O}}}}}_{2}\rangle -\langle {{{{\mathcal{O}}}}}_{1}\rangle \langle {{{{\mathcal{O}}}}}_{2}\rangle\). In addition, Eq. (2) implies the adiabatic evolution of the charges

$${\partial }_{\chi }\langle {Q}_{j}\rangle=\langle {\partial }_{\chi }{Q}_{j}\rangle .$$
(3)

The derivation of Eqs. (2) and (3) is reported in Methods. The thermal flow equations are identical to Eq. (2), restricted to the proper conserved charges and inverse temperatures βth.

To relate the flow equations (2) and the conventional notion of adiabaticity based on entropy, it is instructive to define the free energy associated with the GGE through the partition function as \({{{\mathcal{F}}}}=-\log {{{\rm{Tr}}}}\left[{e}^{-{\sum }_{j}{\beta }_{j}{Q}_{j}}\right]\), from which the entropy S is defined through canonical thermodynamic identities \({{{\mathcal{F}}}}={\sum }_{j}{\beta }_{j}\langle {Q}_{j}\rangle -S\). By taking the time derivative of the last expression and comparing it with \(\frac{{{{\rm{d}}}}{{{\mathcal{F}}}}}{{{{\rm{d}}}}t}\) obtained from the partition function, one reaches

$$\frac{{{{\rm{d}}}}S}{{{{\rm{d}}}}t}=\frac{{{{\rm{d}}}}\chi }{{{{\rm{d}}}}t}{\sum}_{j}{\beta }_{j}\left({\partial }_{\chi }\langle {Q}_{j}\rangle -\langle {\partial }_{\chi }{Q}_{j}\rangle \right).$$
(4)

Notice that Eq. (3) implies \(\frac{{{{\rm{d}}}}S}{{{{\rm{d}}}}t}=0\), and it follows from the flow equations (2) that the adiabatic strokes are reversible in the conventional sense, regardless of whether the working medium is described by a thermal or prethermal phase. Therefore, both adiabatic strokes done with a thermalizing and prethermalizing medium belong to the class of reversible operations: our goal is now to understand which choice benefits the engine’s efficiency. Eq. (2) is difficult to solve as it is highly nonlinear, since the expectation values evolve with the complex many-body state. Further progress can be made in generic infinitesimal cycles and in integrable models where the static covariance matrix A and the susceptibility matrix C can be analytically computed.

Universal efficiency boost in infinitesimal cycles

Although infinitesimal cycles cannot be reliably used to deduce the behavior of finite cycles, they already provide a good indication. Furthermore, we found infinitesimal cycles to be amenable of analytical universal results. Our findings are universal in the sense that they rely solely on general thermodynamic inequalities, without making any assumptions about the number of conserved quantities, the form of interactions, or the dimensionality of the system. Hence, they have the broadest applicability.

We consider two thermal baths at β and β + δβ, and the two strokes running from χ to χ + δχ. The change in internal energy during a stroke is obtained by expanding the integrated equation (3), where we consider the Hamiltonian as the conserved charge \(\Delta \langle H\rangle=\int_{\chi }^{\chi+\delta \chi }{{{\rm{d}}}}{\chi }^{{\prime} }{\langle {\partial }_{{\chi }^{{\prime} }}H\rangle }_{({\chi }^{{\prime} },{{{\boldsymbol{\beta }}}}({\chi }^{{\prime} }))}\). We find

$$\Delta \langle H\rangle=\delta \chi \langle {\partial }_{\chi }H\rangle+\frac{{(\delta \chi )}^{2}}{2}\left[{\partial }_{\chi }\langle {\partial }_{\chi }H\rangle+{\partial }_{\chi }{\beta }_{j}{\partial }_{{\beta }_{j}}\langle {\partial }_{\chi }H\rangle \right],$$
(5)

where repeated indices are summed and terms \({{{\mathcal{O}}}}{(\delta \chi )}^{3}\) are neglected. Expectation values are computed on the initial thermal state, and the choice of flow equations (2) determines the evolution through thermal or prethermal states. Work is obtained by summing the two contributions from β and β + δβ, and expanding in δβ. Notice that the flow equation (2) does not affect the first order  ~ δχ contribution, but only the second order  ~ δχ2. Therefore, differences in the two cycles appear at order  ~δχ2. Combining Eq. (2) and the identity \({\partial }_{{\beta }_{j}}\langle {\partial }_{\chi }H\rangle=-{\langle {Q}_{j}{\partial }_{\chi }H\rangle }_{{{{\rm{c}}}}}\), the work difference \(\delta {{{\mathcal{W}}}}\equiv {{{{\mathcal{W}}}}}^{{{{\rm{pth}}}}}-{{{{\mathcal{W}}}}}^{{{{\rm{th}}}}}\) is determined by the covariance and susceptibility matrices. The result is further simplified if all charges in the thermal state, except for the Hamiltonian itself, are χ − independent. In fact, Ai,j vanishes for all indices j of the charges of the thermalizing dynamics, with the exception of the Hamiltonian itself. Ai,j may be non-zero for other prethermal charges, but these do not couple to the initial bath β and lead to

$$\delta {{{\mathcal{W}}}}=-\beta {(\delta \chi )}^{2}{\left[{A}_{{{{\rm{pth}}}}}^{T}{C}_{{{{\rm{pth}}}}}^{-1}{A}_{{{{\rm{pth}}}}}-{A}_{{{{\rm{th}}}}}^{T}{C}_{{{{\rm{th}}}}}^{-1}{A}_{{{{\rm{th}}}}}\right]}_{H,H},$$
(6)

where […]H,H denotes the diagonal element in the Hamiltonian direction, and β is the canonical inverse temperature. The sign of Eq. (6) crucially depends on β, with \(\delta {{{\mathcal{W}}}}\) having a sign opposite to β. In fact, the matrix product in Eq. (6) is reformulated within hydrodynamic projections51,52 (see Methods) as the norm of a vector subtracting its projection onto a smaller subspace, which is always positive. After having considered the work difference, we now focus on the absorbed heat and note that both the thermal and prethermal strokes start with the same energy 〈Hχ,β. After the first adiabatic stroke, they will have reached internal energies \({\langle H\rangle }_{\chi,{{{\boldsymbol{\beta }}}}}+{{{{\mathcal{W}}}}}_{1}^{{{{\rm{th}}}},{{{\rm{pth}}}}}\). The absorbed heat is then computed as the difference in internal energy determined by the second bath, identical for the two working media, and the end of the adiabatic protocol \({{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}^{{{{\rm{th}}}},{{{\rm{pth}}}}}={\langle H\rangle }_{\chi+\delta \chi,{{{\boldsymbol{\beta }}}}+\delta {{{\boldsymbol{\beta }}}}}-{\langle H\rangle }_{\chi,{{{\boldsymbol{\beta }}}}}-{{{{\mathcal{W}}}}}_{1}^{{{{\rm{th}}}},{{{\rm{pth}}}}}\). Inspection of Eq. (5) shows that \({{{{\mathcal{W}}}}}_{1}^{{{{\rm{pth}}}}}-{{{{\mathcal{W}}}}}_{1}^{{{{\rm{th}}}}}={{{{\mathcal{W}}}}}_{2}^{{{{\rm{pth}}}}}-{{{{\mathcal{W}}}}}_{2}^{{{{\rm{th}}}}}=\frac{1}{2}\delta {{{\mathcal{W}}}}\), whence it follows that \({{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}^{{{{\rm{th}}}}}-{{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}^{{{{\rm{pth}}}}}=\frac{1}{2}\delta {{{\mathcal{W}}}}\). Therefore, the relative efficiency can be written as \(\frac{{\eta }^{{{{\rm{pth}}}}}}{{\eta }^{{{{\rm{th}}}}}}=\left(1+\frac{\delta {{{\mathcal{W}}}}}{{{{{\mathcal{W}}}}}^{{{{\rm{th}}}}}}\right){\left(1-\frac{\delta {{{\mathcal{W}}}}}{2{{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}^{{{{\rm{th}}}}}}\right)}^{-1}\) and it is thus greater than one for \(\delta {{{\mathcal{W}}}} > 0\), which implies ηpth > ηth. We conclude that infinitesimal Otto cycles operating with thermal medium are more efficient than prethermal ones at positive temperatures, whereas the opposite holds for negative β.

Prethermal finite cycles in integrable models

We next explore the persistence of the efficiency inequality for finite cycles in nearly integrable models38,53. These systems are realized in cold atoms36, have infinitely many conserved charges, are strongly interacting, and are yet amenable to exact analytical computations, making them ideal candidates for our scope. In GGEs, the expectation values of charges, the covariance and susceptibility matrices can be computed exactly within the framework of Thermodynamic Bethe Ansatz (TBA)54; see Methods. We focus on two prototypical examples: the Ising model

$${H}_{{{{\rm{Ising}}}}}=-{\sum}_{j}\left({\sigma }_{j+1}^{x}{\sigma }_{j}^{x}+h{\sigma }_{j}^{z}\right),$$
(7)

and the XXZ spin chain

$${H}_{{{{\rm{XXZ}}}}}=-J{\sum}_{j}\left({\sigma }_{j+1}^{x}{\sigma }_{j}^{x}+{\sigma }_{j+1}^{y}{\sigma }_{j}^{y}+\Delta {\sigma }_{j+1}^{z}{\sigma }_{j}^{z}\right),$$
(8)

where \({\sigma }_{j}^{x,y,z}\) are canonical Pauli matrices acting on the j-th site. Notice that for the sake of simplicity, we work in dimensionless energy units. We consider homogeneous infinite systems and use as control parameters the magnetic field h → χ and the anisotropy Δ → χ respectively. The Ising model is a canonical example of an integrable system, equivalent to noninteracting fermions with momentum λ and dispersion \(e(\lambda )=2\sqrt{{(\cos \lambda -h)}^{2}+{\sin }^{2}\lambda }\); see Supplementary Discussion 1 for details. We choose it primarily for pedagogical reasons55 and for its broad relevance from non-equilibrium physics37,56 to quantum engines57,58,59. The XXZ chain is a paradigmatic example of an interacting integrable model60 implemented in quantum simulators50,61,62,63,64,65; see Supplementary Discussion 2 for details of its thermodynamics. In the Ising chain, many-body eigenstates can be described as a gas of free fermionic quasiparticles with momentum density ρ(λ) and extensive energy 〈HIsing〉 = L∫dλe(λ)ρ(λ), with L the system size (See Supplementary Discussion)55, where we removed the ground state energy. Choosing the function ρ(λ) is equivalent to fix the parameters βj of the GGE35, see Methods and Supplementary Discussion 1. On thermal states, it has Fermi-Dirac statistics \(\rho (\lambda )=\frac{1}{2\pi }{({e}^{\beta e(\lambda )}+1)}^{-1}\). The same picture holds in the XXZ chain, albeit interactions dress the excitations and deform thermal distributions through nonlinear integral equations (See Supplementary Discussion). The flow equations Eq. (2) can be reformulated in the quasiparticle basis within Generalized Hydrodynamics (GHD)45,46,47,66, a non-perturbative framework for nearly integrable systems. In homogeneous systems with slow-varying interactions, the GHD equations are67

$${\partial }_{\chi }\rho (\lambda )+{\partial }_{\lambda }({F}^{{{{\rm{eff}}}}}(\lambda )\rho (\lambda ))=0.$$
(9)

The effective force Feff captures the many-body effect of varying interactions, and it vanishes for noninteracting models such as the Ising chain; see Methods for details. In Fig. 2, we show the efficiencies for infinitesimal cycles for Ising and XXZ chains, in a broad spectrum of parameters. Thermal states in the Ising chain are determined solely by the energy. By contrast, in the XXZ model we consider integrability-breaking perturbations that preserve the total magnetization \({\sum }_{j}{\sigma }_{j}^{z}\), resulting in thermal states with two conserved quantities. Notice that the total magnetization does not depend on the anisotropy, i.e., our control parameter. As expected from our general argument, prethermal states are more efficient than thermal ones at negative temperatures. In Fig. 3, we consider exemplificative cases of finite cycles numerically solving Eq. (9) (See Supplementary Discussion). For finite strokes, the gain becomes comparable with the efficiency itself, and is generally larger for the Ising chain. This is due to the fact that thermal states in the XXZ chain have two conserved charges rather than one as in the Ising case, allowing them to be closer to the GGE. More details are provided in Supplementary Discussion 2.

Fig. 2: Thermal vs Prethermal infinitesimal Otto cycles in integrable models.
figure 2

We show the relative efficiency of thermal-prethermal infinitesimal Otto cycles and the thermal infinitesimal efficiency in the Ising (7) (a, b) and antiferromagnetic J = − 1 XXZ (8) (c, d) chains with average magnetization 〈σz〉 = 0.45. We use as tunable parameters the magnetization h and anisotropy Δ, respectively. To plot efficiencies independent of the cycle size, we focus on skewed cycles where the absorbed heat is much larger than the work, \({{{\mathcal{W}}}} \, \ll \, {{{{\mathcal{Q}}}}}_{{{{\rm{abs}}}}}\), or equivalently δχ δβ. In this regime, the efficiency scales as η ~ δχ and ηpth/ηth − 1 ~ δχ/δβ, and the data is rescaled to factor out the explicit dependence on the size of the infinitesimal stroke. Explicit formulas are obtained from Eq. (5) and reported in Supplementary Discussion. Notice that the regions of large relative efficiency are related to regions of vanishing thermal efficiency.

Fig. 3: Finite Otto cycles in integrable models.
figure 3

On the horizontal and vertical axes, we show the control parameter and the energy difference from the ground state (normalized with respect to the system size), respectively. In each panel, both cycles are represented and the values of the efficiencies are reported. Panels (a, b): Ising chain with cold(hot) reservoirs at temperatures \({\beta }_{{{{\rm{C}}}}}^{-1}\)(\({\beta }_{{{{\rm{H}}}}}^{-1}\)) respectively. Specifically, in (a) we consider negative temperatures \(({\beta }_{{{{\rm{C}}}}}^{-1},{\beta }_{{{{\rm{H}}}}}^{-1})=(-0.70,-0.69)\) and in (b) positive temperature \(({\beta }_{{{{\rm{C}}}}}^{-1},{\beta }_{{{{\rm{H}}}}}^{-1})=(0.30,0.48)\). Panels (c, d): analog cases for the XXZ chain (8) with J = − 1 and fixed magnetization 〈σz〉. The temperatures of the baths in (c) and (d) are \(({\beta }_{{{{\rm{C}}}}}^{-1},{\beta }_{{{{\rm{H}}}}}^{-1})=(-0.175,-0.150)\) and \(({\beta }_{{{{\rm{C}}}}}^{-1},{\beta }_{{{{\rm{H}}}}}^{-1})=(0.5,2.0)\). These examples show that the general conclusions for infinitesimal cycles remain valid also for finite operations. A quantitative measure of the GGE's departure from canonical equilibrium and further cases are reported in Supplementary Discussion.

Quantum engine simulators

The perfect isolation of quantum simulators that makes long-time coherent dynamics and negative temperature possible hampers quantum engines requiring heat exchanges with thermal baths23,28,29,68. Nonetheless, current platforms can already probe the two adiabatic strokes of the Otto cycle separately. The XXZ chain (8) with positive spin exchange J > 0 is realized in one-dimensional gases at unit filling69, encoding the z − direction of the spin in two hyperfine levels. Convenient platforms for our scopes are Lithium-based implementations in optical lattices61, where Δ is tunable thanks to a Feschbach resonance, and quantum gas microscopes50 due to their ability to conduct single-site measurements and operations. The current XXZ chain quantum microscope with Rubidium atoms50 lacks a Feshbach resonance, fixing Δ 1. However, quantum microscopes with Lithium are also available70, and could combine the advantages of the two platforms in the near future. The tunable transverse confinement efficiently breaks integrability, interpolating between a one-dimensional and a ladder geometry50. The use of thermal baths at negative temperature generally requires engineering for their preparation. In this regard, negative temperatures can be realized by selectively exciting spins in high-energy configurations and evolving them in the presence of integrability-breaking perturbations that induce thermalization. For example, such states for the XXZ chain in the ferromagnetic phase could be an antiferromagnetic spin arrangement. Atom imaging provides snapshots of the z − magnetization, from which arbitrary zz correlations can be obtained50. Directly probing the energy requires measurements in the other spin directions as well, but adiabatic operations conveniently give direct access to energy differences through integration of Eq. (3) which, for the case of a tunable Δ, requires measuring \(\langle {\sigma }_{j+1}^{z}{\sigma }_{j}^{z}\rangle\) only. In the absence of a tunable Δ, time-dependent magnetic traps \({H}_{{{{\rm{XXZ}}}}}+{\sum }_{j}{B}_{j}(t){\sigma }_{j}^{z}\) can be used to exert work, as suggested in refs. 20,29,69. Indeed, smooth traps break integrability weakly, resulting in long-lived prethermal states53,71,72. This possibility, however, pivots (pre)thermalization timescales to the trap’s size: on the typical sizes of a few tens of spins, a conservative estimation suggests timescales of various tens of spin-exchange times, challenging the present coherence time. Instead, (pre)thermalization after homogeneous quenches in Δ requires  ~5 spin-exchanges73, and thus is more convenient.

Discussion

In this article, we unveiled the universal impact of conservation laws and prethermalization on quantum engines. By focusing on Otto cycles, we have established general thermodynamic inequalities showing how the relative efficiency of small cycles with thermal or prethermal working medium is entirely determined by the baths’ temperature. Specifically, a thermal working medium is more efficient at positive temperatures, whereas prethermal media enhance the engine efficiency at negative temperatures. Although the use of negative temperatures generally requires population inversion, one can anticipate scenarios in which the benefits of their use outperform their cost, if not fundamentally, in practice. We focused on integrable models as a concrete case of study, showing the persistence of our conclusions beyond small cycles, where Generalized Hydrodynamics provides exact quantitative insight into far-from-equilibrium quantum matter. Our findings are of direct relevance to state-of-the-art quantum simulators. While we thoroughly discussed the realization of the XXZ model in quantum gas microscopes, other platforms such as Rydberg atoms in optical tweezers74, superconducting qubits75, and trapped ions76 could also be employed. Fermi-Hubbard quantum microscopes with Feschbach resonances, offer another natural platform70 in the context of nearly-integrable models. However, as shown by our analysis of infinitesimal cycles, our results are of broad relevance beyond integrability itself and apply generally whenever a conservation quantity can be selectively broken and are thus of broad experimental relevance. It is worth emphasizing that, albeit we focused on quasi-static protocols, (pre)thermalization time scales are driven by microscopic processed37,38,39,40 that are usually fast compared with other typical scales in experiments36, suggesting our results can also be predictive for finite-time protocols. Interesting future directions involve exploring the consequences of nonthermal baths, which may be realized by coupling different portions of isolated quantum many-body systems29, and considering driving protocols in finite time, and their role on the tradeoff between the efficiency and power, and (pre)thermalization.

Methods

Derivation of the flow equations

We derive the flow equations (2), which govern the adiabatic evolution. From the partition function \(Z(\chi,{{{\boldsymbol{\beta }}}})={{{\rm{Tr}}}}\left[{e}^{-{\sum }_{i}{\beta }_{i}{Q}_{i}(\chi )}\right]\), one has the standard thermodynamic equalities \({\langle {Q}_{j}(\chi )\rangle }_{\chi,{\beta }_{i}}=-{\partial }_{{\beta }_{i}}\log Z(\chi,{{{\boldsymbol{\beta }}}})\), \({\langle {\partial }_{\chi }{Q}_{j}(\chi )\rangle }_{\chi,{\beta }_{i}}=-{\partial }_{\chi }\log Z(\chi,{{{\boldsymbol{\beta }}}})\), while the second mixed derivatives give connected correlation functions. Promoting β to be χ − dependent in the adiabatic stroke, and imposing charge conservation \({\langle {Q}_{j}(\chi+\delta \chi )\rangle }_{\chi,{{{\boldsymbol{\beta }}}}(\chi )}={\langle {Q}_{j}(\chi+\delta \chi )\rangle }_{\chi+\delta \chi,{{{\boldsymbol{\beta }}}}(\chi+\delta \chi )}\) to first order in δχ, the flow equations Eq. (2) immediately follow. Similarly, the generic variation of a charge can also be obtained with changes in χ and βi, leading to δQj〉 = δχ〈∂χQj〉 − ∑iCjiδβi − δχiAjiβi. Imposing that β evolves with the flow equations, ∂χQj〉 = 〈∂χQj〉 follows.

Hydrodynamic projections

Historically, hydrodynamic projections51,52 have been introduced to isolate the slow, long-wavelength dynamics of a many-body system by projecting onto conserved quantities. We use this framework to conveniently rewrite Eq. (6) and make its sign explicit. Due to the infinitesimal nature of the perturbation, the leading-order effect is the suppression of certain conserved quantities, rather than their deformation. Consequently, the set of conserved quantities under thermalizing dynamics spans a strict subspace of those preserved in the prethermal regime. One introduces a scalar product in the vector space of the observable through their connected correlator \(\langle {{{{\mathcal{O}}}}}_{1}| {{{{\mathcal{O}}}}}_{2}\rangle \equiv {\langle {{{{\mathcal{O}}}}}_{1}{{{{\mathcal{O}}}}}_{2}\rangle }_{{{{\rm{c}}}}}\). We define the projector on the conserved charges of the (pre)thermal dynamics as \({{\mathbb{P}}}^{{{{\rm{pth}}}}({{{\rm{th}}}})}={\sum }_{i,j}^{N({N}^{{\prime} })}{[{C}_{{{{\rm{pth}}}}({{{\rm{th}}}})}^{-1}]}_{i,j}\left\vert {Q}_{i}\rangle \langle {Q}_{j}\right\vert\), where the inverse static covariance matrix C−1 is introduced for a properly normalized projection \({{\mathbb{P}}}^{{{{\rm{pth}}}}({{{\rm{th}}}})}\vert {Q}_{j}\rangle=\vert {Q}_{j}\rangle\). In this language, Eq. (6) is rewritten as the difference of the norm of a vector projected on different subspaces

$$\delta {{{\mathcal{W}}}}=-\beta {(\delta \chi )}^{2}\left[\langle {\partial }_{\chi }H| {{\mathbb{P}}}^{{{{\rm{pth}}}}}| {\partial }_{\chi }H\rangle -\langle {\partial }_{\chi }H| {{\mathbb{P}}}^{{{{\rm{th}}}}}| {\partial }_{\chi }H\rangle \right].$$
(10)

Since the space of thermal conserved charges is included in the prethermal one \(\left.\right[\langle {\partial }_{\chi }H| {{\mathbb{P}}}^{{{{\rm{pth}}}}}| {\partial }_{\chi }H\rangle -\langle {\partial }_{\chi }H| {{\mathbb{P}}}^{{{{\rm{th}}}}}| {\partial }_{\chi }H\rangle \ge 0\), proving the sign of \(\delta {{{\mathcal{W}}}}\) depends only on β.

Integrable systems

Multiparticle scattering events in integrable models are factorized into two-by-two elastic scattering events, entirely parametrized by their scattering phase. In interacting integrable models, the rapidity λ and root density ρ(λ) generalize the momentum and momentum density of the free systems, respectively. An additional degree of freedom labeling quasiparticles of different species is present in several cases, such as in the XXZ model54, and is here omitted for brevity. The expectation value of the conserved charges takes the form \(\frac{1}{L}\langle {Q}_{i}\rangle=\int{{{\rm{d}}}}\lambda \,{q}_{i}(\lambda )\rho (\lambda )\), with qi(λ) being the charge eigenvalue. The scattering phase \(\Theta (\lambda -{\lambda }^{{\prime} })\) between two excitations of rapidity λ and \({\lambda }^{{\prime} }\) depends on the rapidity difference. Thermal states and GGEs are described within the thermodynamic Bethe ansatz (TBA) framework54. More precisely, the state is parametrized by nonlinear integral equations

$$\varepsilon (\lambda )=\mathop{\sum}_{i}{\beta }_{i}{q}_{i}(\lambda )+\int\frac{{{{\rm{d}}}}{\lambda }^{{\prime} }}{2\pi }\varphi (\lambda -{\lambda }^{{\prime} })\log (1+{e}^{-\varepsilon ({\lambda }^{{\prime} })}),$$
(11)

where the scattering kernel is defined as φ(λ) ≡ ∂λΘ(λ). The pseudoenergy ε(λ) parameterizes the state through the filling function \(\vartheta (\lambda )={(1+{e}^{\varepsilon (\lambda )})}^{-1}\), which is then connected to the root density as \(\rho (\lambda )=\vartheta (\lambda )\frac{{({\partial }_{\lambda }p)}^{{{{\rm{dr}}}}}}{2\pi }\), with p(λ) the momentum of a quasiparticle. In general, the dressing of a bare quantity τ(λ) is given as a solution of the linear integral equation \({\tau }^{{{{\rm{dr}}}}}(\lambda )=\tau (\lambda )-\left[\varphi \,*\, \vartheta {\tau }^{{{{\rm{dr}}}}}\right](\lambda )\). For brevity, we define the convolution \([\varphi \,*\, \tau ](\lambda )=\int{{{\rm{d}}}}{\lambda }^{{\prime} }\varphi (\lambda -{\lambda }^{{\prime} })\tau ({\lambda }^{{\prime} })\). The static covariance matrix is analytically determined as \({\langle {Q}_{i}{Q}_{j}\rangle }_{{{{\rm{c}}}}}=-{\partial }_{{\beta }_{i}}\langle {Q}_{j}\rangle\)(See Supplementary Discussion)

$$\frac{1}{L}{\langle {Q}_{i}{Q}_{j}\rangle }_{{{{\rm{c}}}}}{\simeq }^{L\to \infty }\int{{{\rm{d}}}}\lambda \,{q}_{i}^{{{{\rm{dr}}}}}\rho (1-\vartheta ){q}_{j}^{{{{\rm{dr}}}}},$$
(12)

where denotes equality in the thermodynamic limit. The susceptibility matrix follows from \({\langle {Q}_{i}{\partial }_{\chi }{Q}_{j}\rangle }_{{{{\rm{c}}}}}=-{\partial }_{{\beta }_{i}}\langle {\partial }_{\chi }{Q}_{j}\rangle\), where 〈∂χQj〉 is computed by means of the Hellmann-Feynman theorem67

$$\frac{1}{L}\langle {\partial }_{\chi }{Q}_{j}\rangle \simeq \int{{{\rm{d}}}}\lambda \left({\partial }_{\chi }{q}_{j}\rho+\frac{1}{2\pi }{\partial }_{\lambda }{q}_{j}{f}^{{{{\rm{dr}}}}}\vartheta \right),$$
(13)

where \(f(\lambda )=-{\partial }_{\chi }p(\lambda )+\left[{\partial }_{\chi }\Theta \,*\, \vartheta {({\partial }_{\lambda }p)}^{{{{\rm{dr}}}}}\right](\lambda )\). Deriving Eq. (13), the susceptibility matrix follows (See Supplementary Discussion)

$$\frac{1}{L}{\langle {Q}_{i}{\partial }_{\chi }{Q}_{j}\rangle }_{{{{\rm{c}}}}}\simeq \int{{{\rm{d}}}}\lambda \,{q}_{i}^{{{{\rm{dr}}}}}\rho (1-\vartheta )\left({f}^{{{{\rm{dr}}}}}\frac{{({\partial }_{\lambda }{q}_{j})}^{{{{\rm{dr}}}}}}{{({\partial }_{\lambda }p)}^{{{{\rm{dr}}}}}}-{\Lambda }_{j}^{{{{\rm{dr}}}}}\right)$$
(14)

where \({\Lambda }_{i}(\lambda )=-{\partial }_{\chi }{q}_{i}(\lambda )+\left[{\partial }_{\chi }\Theta \,*\, \vartheta {({\partial }_{\lambda }{q}_{i})}^{{{{\rm{dr}}}}}\right](\lambda )\). With the covariance and susceptibility matrices at hand, the flow equations (2) are fully determined. In the prethermal case, rather than working with infinitely many charges, it is more convenient to move to a quasiparticle basis. Here, the flow equations are equivalent to the GHD equations (9)67 with the effective force being \({F}^{{{{\rm{eff}}}}}(\lambda )={f}^{{{{\rm{dr}}}}}(\lambda )/{({\partial }_{\lambda }p)}^{{{{\rm{dr}}}}}\), which can also be generalized to inhomogeneous setups. Notice that in non-interacting systems like the Ising model φ = 0, therefore, the equations greatly simplify. In Supplementary Discussion 2, we provide details for the general formulas for the XXZ spin chain in the easy-axis regime Δ > 1. For Δ < 1, the GHD equations for changing Δ are an open problem67 that we do not address.

Numerical methods

Finite cycles in integrable systems are obtained by numerically solving the TBA and GHD equations; see Supplementary Methods 1 for details. The integral equations are discretized and solved with standard methods. The GHD equation is solved using the method of characteristics at second order in time evolution67. The evolution along the thermal strokes is performed with the flow equations (2). We checked the convergence of our results with respect to the discretization in the rapidity space, the number of quasiparticle species in the XXZ chain, and the integration time step. Raw data and a Mathematica code are available on Zenodo77.