A quantum heat engine driven by atomic collisions

Quantum heat engines are subjected to quantum fluctuations related to their discrete energy spectra. Such fluctuations question the reliable operation of thermal machines in the quantum regime. Here, we realize an endoreversible quantum Otto cycle in the large quasi-spin states of Cesium impurities immersed in an ultracold Rubidium bath. Endoreversible machines are internally reversible and irreversible losses only occur via thermal contact. We employ quantum control to regulate the direction of heat transfer that occurs via inelastic spin-exchange collisions. We further use full-counting statistics of individual atoms to monitor quantized heat exchange between engine and bath at the level of single quanta, and additionally evaluate average and variance of the power output. We optimize the performance as well as the stability of the quantum heat engine, achieving high efficiency, large power output and small power output fluctuations.

M ost engines used in modern society are heat engines. Such machines generate motion by converting thermal energy into mechanical work 1 . Two central figures of merit of heat engines are efficiency, defined as the ratio of workoutput and heat input, and power characterizing the work-output rate. Heat engines should ideally have high efficiency, large power output, and be stable, i.e., exhibit small power fluctuations. However, real thermal machines operate far from reversible conditions and their performance is thus reduced by irreversible losses 2,3 . At the same time, microscopic motors are exposed to thermal fluctuations and, at low enough temperatures, to additional quantum fluctuations, which are associated with random transitions between discrete energy levels. Both fluctuation mechanisms contribute to their instability 4,5 . An important issue is hence to design and optimize small heat engines in order to maximize both their performance and their stability 6 .
Nanoscopic heat engines have been implemented recently using a single trapped ion 7 and a spin coupled to the single-ion motion 8,9 . Indications for quantum effects have been reported in a spin engine consisting of nitrogen-vacancy centers interacting with a light field 10 , and quantum heat engine operation has been shown in nuclear magnetic resonance 11,12 and single-ion 9 systems. These thermal machines are based on harmonic oscillators or two-level systems, and the baths mediating heat exchange are simulated by interaction with either laser fields 7-10 or radiofrequency pulses 11,12 .
We here experimentally realize a quantum Otto cycle using a large quasi-spin system in individual Cesium (Cs) atoms immersed in a quantum heat bath made of ultracold Rubidium (Rb) atoms. Expansion and compression steps are implemented by varying an external magnetic field, changing the energy-level spacing of the engine and performing work 13 . Heat exchange between system and bath occurs via inelastic endoenergetic and exoenergetic spin-exchange collisions 14 . The increased number of internal engine states, compared to simple two-level systems, allows for high-energy turnover per cycle, while their finite number naturally limits power fluctuations due to saturation, in contrast to the unbounded spectrum of harmonic oscillators. We employ quantum control of the coherent spin-exchange process 15 to control the direction of heat transfer between system and bath at the level of individual quanta of heat 14 , independently of the kinetic thermal state of the bath. The precise control of the spin states of both engine and bath effectively suppresses internal irreversible losses in individual collisions, and thus makes the quantum heat engine endoreversible. Endoreversible machines operate internally without dissipation, while (external) irreversible losses only occur via the contact with the bath 2,3 . They hence outperform fully irreversible engines and have played for this reason a central role in finite-time thermodynamics for forty years 2,3 . We note that quantum systems generally exhibit internal friction when their Hamiltonian does not commute at different times 16,17 . We additionally characterize the discrete quantum heat transfer at the level of individual quanta using full-counting statistics 18,19 and monitor the population dynamics of the engine from single-atom and time-resolved measurements of the engine's quasi-spin distribution along the cycle. We employ this system and techniques to evaluate and optimize the performance as well as the stability of the quantum heat engine, achieving high efficiency, large power output and small power output fluctuations.

Results
Components of the neutral-atom machine. We experimentally immerse up to ten laser-cooled Cs atoms in the jF Cs ¼ 3; m F;Cs ¼ 3i state into an ultracold Rb gas of up to 10 4 atoms in the state jF Rb ¼ 1; m F;Rb ¼ À1i, both species confined in a common optical dipole trap (Fig. 1a) (Methods A). Here F and m F denote the total atomic angular momentum and its projection onto the quantization axis, respectively. The quantization axis is given by an external magnetic field of B 1 = 346.5 ± 0.2 mG or B 2 = 31.6 ± 0.1 mG. The Cs atoms quickly thermalize to the kinetic temperature of T = 950 ± 50 nK of the gas. We operate the quantum heat engine in the spin-state manifold of the seven Cs hyperfine ground states jF Cs ¼ 3; m F;Cs i, m F,Cs ∈ [+3, +2, …, −3], which define its quasispin. These states are energetically equally spaced with Zeeman energy E Cs n ¼ nλB, with λ ¼ jg Cs F jμ B , where g Cs F ¼ À1=4 is the Cs Landé factor, μ B Bohr's magneton and n = 3 − m F,Cs 20 , with the zero-point of energy set to the lowest-energy state jm F;Cs ¼ 3i.
Heat between the quantum engine and the bath is exchanged at the microscopic level via inelastic spin-exchange collisions (Fig. 1c). Each collision changes the value of the quasi-spin of the Cs engine by Δm Cs = ∓1ℏ, leading to an energy change of ΔE Cs = ±λB for each Cs atom, and Δm Rb = ±1ℏ for one Rb atom corresponding to the energy change ΔE Rb = ∓κB, with κ ¼ jg Rb F jμ B , where g Rb F ¼ À1=2 is the Rb Landé factor 14 . The spin population thus directly reflects the energy exchange between engine and reservoir at the level of single energy quanta. The direction of the heat transfer is determined by the spin polarization of the Rb bath and by angular momentum conservation during individual collisions 14 . The spin polarization of the Rb atoms distinguishes a high-energy bath for m Rb = −1 from a low-energy bath for m Rb = +1. Control over the internal Rb state accordingly permits to either increase or decrease the energy of the quasi-spin of the engine. Heat exchange automatically stops after six spin-exchange collisions, because then the highest/lowest energy state has been reached. One collision transfers the colliding Rb atom to the jF Rb ¼ 1; m F;Rb ¼ 0i state, which forms the exhaust of the engine. Owing to the massive imbalance between the Rb and Cs atom numbers (N Rb /N Cs > 1000), the probability of a second collision with the same Rb atom is indeed vanishingly small. Memory effects are furthermore negligible, making the bath Markovian.
Implementation of the quantum Otto cycle. The quantum Otto cycle consists of four parts: one compression and one expansion step, during which work is performed, and a heating and a cooling stage, during which heat is exchanged 13 . The corresponding experimental sequence is shown in Fig. 1b. The Cs machine is first driven by up to six spin-exchange collisions into energetically higher states (at magnetic field B 1 ), absorbing average heat 〈Q H 〉 in time τ H = t B . Mean work 〈W BC 〉 is then performed by adiabatically decreasing the magnetic field to B 2 in τ = t C − t B = 10 ms. This time is much longer than the inverse energy splitting ΔE of the quasi-spin states, making the process adiabatic. It is, however, fast enough to avoid unwanted spinexchange collisions, implying that no heat is transferred. The engine is subsequently brought into contact with the low-energy bath by flipping the spins of the Rb bath using microwave (MW) sweeps. The Cs engine is accordingly driven by up to six spinexchange collisions into energetically lower states, releasing heat 〈Q C 〉 in time τ C = t D − t C . Work 〈W DA 〉 is further performed by adiabatically increasing the magnetic field back to B 1 in τ = t A − t D = 10 ms. The Rb spins are finally flipped to their initial state with other microwave sweeps, restoring the high-energy bath.
While each single collision is coherent and thus amenable to quantum control 15 , coupling of the engine to the large number of bath modes in elastic collisions destroys the coherence between the engine's quasi-spin levels. Heat is thus associated with changes of occupation probabilities, 〈Q〉 = ∑ n E n Δp n , whereas work corresponds to changes of energy levels, 〈W〉 = ∑ n p n ΔE n 13 . In our system, we concretely have hQ H i ¼ ∑ n n p B n À p A n À Á λB 1 for heating and hQ C i ¼ ∑ n n p D n À p C n À Á λB 2 for cooling. On the other hand, the respective work contributions for expansion and compression are given by hW BC i ¼ ∑ n np B n λðB 2 À B 1 Þ and hW DA i ¼ ∑ n np D n λðB 1 À B 2 Þ. In order to evaluate these average quantities, we determine the magnetic fields B 1 and B 2 with the help of Rb microwave spectroscopy (Methods). We further detect the Zeeman populations p i n of single Cs atoms at arbitrary times by position resolved fluorescence measurements combined with Zeeman-state-selective operations (Fig. 1a inset) 21 . From each individual measurement, we can determine quantized spin transitions for each single atom. This allows us to monitor the resulting quantized heat exchange between engine and environment with a resolution of single quanta at each time. From a series of such measurements, we can further construct the average evolution of the quasi-spin populations (Fig. 2a, b): the progressive transfer from low (high) energy states to high (low) energy states during heating (cooling) as a function of time is clearly seen (green dots). From the measured heat counting statistics, we compute average (blue and red dots) and variance of heat exchange. We will use these quantities to examine the power output of the quantum machine and its fluctuations.
Performance of the quantum heat engine. We first characterize the performance of the quantum Otto engine by evaluating its efficiency given by 13 , where 〈Q H 〉 − |〈Q C 〉| is the total work produced by the machine, 〈Q L 〉 the energy dissipated during the total heat exchange in one cycle, and 〈Q H 〉 + 〈Q L 〉 the heat emitted by the high-energy bath ( Fig. 1d). Indeed, due to the different atomic Landé factors for Rb ðg Rb F ¼ À1=4Þ and Cs ðg Cs ) of the energy change of a bath atom is effectively exchanged with the heat engine during an inelastic spin-exchange collision 21 . As a result, the heat emitted (absorbed) by the bath differs from the energy portions absorbed 〈Q H 〉 (emitted 〈Q C 〉) by the machine. We macroscopically account for the remaining lost energy, which is irreversibly transferred to the kinetic energy of Rb during an average of ten elastic collisions, by a heat leak 22 equal to hQ L i ¼ ∑ n n p B n À p A n À Á κð1 À γÞðB 1 À B 2 Þ with γ = λ/κ the ratio of the Landé factors (Methods). We then obtain, Its maximum value η max , reached in the absence of irreversible losses (γ = 1), is determined by the ratio of the two magnetic fields. We evaluate the efficiency (2) using experimental data for different cycle durations, τ cycle = τ H + τ C + 2τ, by varying the heating and cooling times and evaluating the average heats 〈Q H 〉 and 〈Q C 〉 (Fig. 3a). We find a constant value, i.e., independent of the number of spin-exchange collisions, of η = 0.478 ± 0.002. We emphasize that the internal efficiency of the quantum Otto engine, η int = 1 − |〈Q C 〉|/〈Q H 〉 = 0.917 ± 0.009 (Methods C) is close to the maximal value η max = 0.908. We may, therefore, conclude that irreversible losses mainly occur during heat transfer, while the engine itself runs reversibly. The quantum heat engine is hence endoreversible. We further note that, since heat losses are determined by the value of the Landé factors, they can in principle be reduced by choosing different atomic species. The experimental Otto cycle consists of a heating stage, during which average heat 〈Q H 〉 is absorbed, and a power stroke induced by an adiabatic change of the magnetic field. A microwave field then switches the bath from high to low energy. The cycle is further completed by a cooling step, during which average heat 〈Q C 〉 is released, and an additional power stroke when the magnetic field is adiabatically brought back to its initial value. c The heat transfer between the Cs atom (engine) and a Rb (bath) atom occurs via inelastic spin-exchange collisions. In each collision, a single quantum of spin associated with a certain energy quantum is exchanged. Spin polarization of the Rb atoms and spin-conservation in individual collisions allow only up to six exo-or endothermal processes, corresponding to heating or cooling. d Owing to the difference of atomic Landé factors between Cs and Rb, the quantum heat engine (green) absorbs heat 〈Q H 〉 and releases heat 〈Q C 〉 (to produce work 〈W〉), while the bath releases more energy. The lost energy is irreversibly dissipated during an average of ten elastic collisions and is described by a heat leak 〈Q L 〉 from the highenergy bath.
Second, we consider the average power of the quantum heat engine which reads, We use the heat counting statistics to track its time evolution in Fig. 3b. We observe that the power (blue dots) increases with the number of inelastic collisions and reaches a maximum, P h i max =k B ¼ 30 nK/ms, for a cycle time of 960 ms. The corresponding number of inelastic collisions responsible for the heat exchange is almost 12 collisions total (6 spin-exchange collisions for the heating process and 6 for the cooling). This maximum nearly coincides with full population inversion between these two processes (jm F;Cs ¼ 3i $ jm F;Cs ¼ À3i), in analogy to that of a laser. Good agreement with a theoretical model (red solid line) is observed (Methods). From a collisional perspective, the energy transfer with the atomic bath is optimal in the sense that it exchanges the maximum energy of six quanta, which can be stored in the machine, in exactly six spin-exchange collisions as a consequence of the precise control of the spin states of machine and bath. The value of P h i max may be further optimized by enhancing the magnetic field difference, as well as the collision rate and the collision cross-section by controlling the temperature or density of the Rb gas.
We finally investigate the stability of the quantum Otto engine by analyzing the relative power fluctuations via the Fano factor, which quantifies the deviation from a Poisson distribution 23 , where σ 2 P is the variance of the power, which we determine from the measured quasi-spin distributions (Methods). Figure 3c displays the Fano factor as a function of the cycle time, with the absolute fluctuations σ P shown in the inset. We find super-Poissonian fluctuations (F P > 1) for short cycle times, indicating that the quantum engine is unstable in this regime, with large relative power fluctuations. However, with increasing cycle time, the power increases faster than its variance, leading to a decrease in relative fluctuations. The transition to a Poissonian statistics (F P = 1) (red dashed line), with strongly reduced power fluctuations and significantly increased stability, is located approximately at maximum power. This behavior follows from the finite Hilbert space of the Cs machine and the saturation effect due to the existence of an upper energy level. Importantly, the latter effect causes even the absolute value of the power fluctuations to decrease after on average six collisions (Fig. 3c inset). Power fluctuations could, in principle, also become sub-Poissonian (F P < 1), but this regime is not seen experimentally due to experimental imperfections.

Discussion
In conclusion, we have realized an endoreversible quantum Otto cycle using single Cs atoms interacting with a Rb bath. The key asset of this machine is the exquisite control over both the fewlevel engine and the atomic reservoir. This unique feature allows us not only to regulate and monitor the heat exchange between system and environment at the single-quantum level, but also to operate the quantum engine in a regime of high efficiency, large power output and small power output fluctuations. The produced work could in principle be extracted by, e.g., coupling the magnetic moment of another microscopic particle to the magnetic moment of the engine. In a magnetic field gradient, motion of the coupled microscopic particle will directly reveal the work performed. Our system provides a versatile experimental platform to elucidate fundamental new effects generated by quantum reservoir engineering, such as nonequilibrium atomic baths 24,25 and squeezed baths 26,27 , as well non-Markovian heat reservoirs by reducing the size of the Rb cloud 28,29 .

Methods
Experimental procedures. We start our experimental sequence by preparing an ultracold Rb gas in the magnetic field insensitive state jF Rb ¼ 1; m F;Rb ¼ 0i and, at a distance of ≈200 μm, a small sample of laser-cooled Cs atoms. The Cs atoms are further cooled and optically pumped into the jF Cs ¼ 3; m F;Cs ¼ 3i hyperfine ground state by employing degenerate Raman sideband-cooling 30 . A speciesselective optical lattice 31 transports the Cs atoms into the Rb cloud. MW radiation prepares the bath atoms in the state jF Rb ¼ 1; m F;Rb ¼ À1i. The starting point of the heat engine cycle is defined by switching off the optical lattice potential. After a predefined time t i , the Cs-Rb interaction is stopped by freezing the positions of the Cs atoms using the optical lattice, and pushing the Rb cloud out of the trap with a resonant laser pulse. State-selective fluorescence imaging of the Cs atoms completes the procedure 32 .
The high-energy and low-energy baths are interchanged by transferring the Rb atoms from jF Rb ¼ 1; m F;Rb ¼ À1i to jF Rb ¼ 1; m F;Rb ¼ þ1i and vice versa using two successive Landau-Zener sweeps. The transfer takes~4.4 ms, which is fast enough to avoid spin-exchange interactions during the state change of the bath. The two magnetic fields B 1 and B 2 defining the quantization axis for the engine operation, are measured using Rb microwave spectroscopy on the jF Rb ¼ 1; m F;Rb ¼ 0i ! jF Rb ¼ 2; m F;Rb ¼ þ1i transition. The population of the Rb atoms in state jF Rb ¼ 2; m F;Rb ¼ þ1i is detected by standard absorption imaging, using a time-of-flight measurement (Fig. 4). We fit the measured data with a standard model to extract the transition frequency, which translates into a magnetic field value using the Breit-Rabi formula 33 . We find typical errors of the order of 0.1 mG. The magnetic field changes extracting work of the engine have to be adiabatic, i.e., preserving the populations p n . The adiabaticity condition writes _ ω lar =ω 2 lar ( 1, where ω lar ¼ jg Rb F jμ B B=_ is the Larmor frequency. It can, therefore, be expressed as Experimentally, we linearly vary the magnetic field from B 1 = 346.5 ± 0.2 mG to B 2 = 31.6 ± 0.1 mG in a time scale of 10 ms, yielding values of A(B 1 ) = 0.2 × 10 −3 and A(B 2 ) = 14 × 10 −3 , thus fulfilling the adiabatic condition at any time during the variation of the magnetic field. Moreover, the time scale of the magnetic field variation is faster than the time scale associated with the spin exchange collisions (see number of collisions over time in Fig. 3). Hence, the populations p n are constant during the isentropic processes (B → C and D → A).
Microscopic model and number of collisions. The quantum heat exchange between engine and bath is based on the understanding of individual spinexchange collisions. In general, the spin-collision rate Γ m F !m F ± 1 is different both for every initial state m F and for the direction, i.e., Δm F = ±1. The individual rates are well known from coupled-channel calculations of the molecular interaction potential between Rb and Cs 14 . These rates allow us to describe the evolution with a rate model 21 that captures the spin dynamics and yields excellent agreement with the experimental data. From these rates, we also compute the mean number of spin collisions N spin within a cycle duration t = t D in two steps. First, we calculate the time-averaged collision rate as the sum of time-averaged collision rates during heating (exothermal spin collisions) and cooling (endothermal spin collisions) as Second, we integrate these rates during the heating and cooling to obtain the number of collisions within cycle time t as In order to close the cycle, the inital and final Cs states before and after a cycle have to be the equal, leading to the condition N A→B = N C→D .
Efficiency of the endoreversibe machine. We calculate the efficiency by distinguishing two different forms of heat exchange. First, we consider the respective mean energies given (〈Q 1 〉) and taken (〈Q 2 〉) by the baths, where 〈Q 1 〉 − |〈Q 2 〉| is the energy turnover of the reservoirs per cycle. Second, we consider the average energies absorbed (〈Q H 〉) and rejected (〈Q C 〉) from the engine, where 〈Q H 〉 − |〈Q C 〉| is the energy turnover of the machine. Both quantities differ because of the different atomic Landé factors of Cs and Rb. The difference hQ L i ¼ hQ 1 i À jhQ 2 ij À Á À hQ H i À jhQ C ij À Á is dissipated via elastic collisions and irreversibly lost to the kinetic energy of Rb. We macroscopically model it as a heat leak from the high-energy reservoir. Using the population distribution of the quasi-spin levels at the cycle   Fig. 2 of the main text, the individual heats can be calculated, leading to Owing to preservation of populations during adiabatic strokes, we can further use p D n ¼ p A n and p B n ¼ p C n , yielding the expression for the dissipated heat The efficiency is calculated as the work, |〈W〉| = 〈Q H 〉 − |〈Q C 〉|, produced by the engine, divided by the energy provided by the high-energy bath, 〈Q H 〉 + 〈Q L 〉. Using p D n ¼ p A n , p B n ¼ p C n and γ = λ/κ, we find The internal efficiency of the engine is computed as the ratio of the produced work |〈W〉| and the heat absorbed by the machine 〈Q H 〉: It corresponds to the efficiency without a leak (γ = 1).
Fluctuations of the quantum machine. To extract the fluctuations of the engine, Eq. (4), we calculate the mean power, Eq. (3), via 〈P〉 = |〈W〉|/τ cycle . The cycle time τ cycle = t D is experimentally controlled, and we assume that it is a fixed parameter not adding further fluctuations to the power-output fluctuations. Therefore, we can restrict the calculation to the fluctuations σ W of work 〈W〉 as σ 2 W ¼ hW 2 i À hWi 2 . The work is given by the difference of energy absorbed by and rejected from the engine |〈W〉| = 〈Q H 〉 − |〈Q C 〉|, and hence The averages and variances of heat absorbed or rejected depend on the energy differences at the different points during the cycle, for example, 〈Q H 〉 = E(t B , B 1 ) − E 0 (t 0 , B 1 ). Here, Eðt i ; B j Þ ¼ ∑ n p i n ðt i Þ nλB j can be computed from the measured populations fp i n g of level n at point i = A, B, C, D during the cycle and the magnetic field B j (j = 1, 2), together with mean energy and variance. Then, the fluctuations σ 2 Q of heat 〈Q〉 exchanged when changing the engine's probability distribution from point i to point f at a magnetic field B j reads

Data availability
The data that support the plots and findings of this study are available from the corresponding author upon reasonable request.