Our green future may rely on energy-conversion devices at scales and temperatures where quantum effects become relevant or even dominant. Nanoscale heat engines and refrigerators are hence recognized as a promising research frontier1,2,3,4. To pave the way toward technological breakthroughs, researchers have investigated a number of fundamental questions, even examining the validity and pertinence of thermodynamic concepts at the nanoscale. Indeed, recent years witnessed fruitful studies exploring how the discreteness of energy levels, quantum statistics, quantum adiabaticity, quantum measurement, coherence and entanglement affect the operation of heat engine cycles in various experimental set-ups, including trapped ions, nitrogen vacancies, transmon qubits and more5,6,7,8,9,10,11,12,13,14,15. Models of quantum heat engines have also been exploited as a platform to investigate the thermodynamics underlying nanoscale energy conversion beyond the weak coupling limit16,17,18,19,20,21,22 or in the presence of engine–load correlations23,24. Applications of quantum thermodynamics, and in particular of cooling, have been investigated in the realm of quantum computing25,26. Experimental investigations of quantum engine cycles are called for to clearly assess the correspondences, or lack thereof, between classical and quantum thermodynamic engine cycles. One important research direction is how to characterize the thermodynamic properties of a quantum engine operating in a generic scenario, for example, when the engine and the load are strongly coupled, and/or when the baths used are not thermal. This experimental work aims to set an important milestone toward the understanding of single-atom energy-conversion cycles acting on a quantum load. This work is a realization and thermodynamic analysis of a nontrivial engine and refrigerator cycle simulator with generic and strong coupling to a quantum load. Our set-up is also such that the baths can prepare the engine in states that are not necessarily thermal. This is an additional feature of this simulator of generic quantum energy-conversion systems, which may not be coupled to thermal baths. The protocol that we have devised for our energy-conversion system can be transferred to other experimental realizations of the Jaynes–Cummings Hamiltonian.

Recently, several experimental realizations of nanoscale engine cycles and thermodynamic processes have been reported27,28,29,30,31,32,33, including experiments in the quantum regime30,31,32,33. In this work, we build on previous efforts in this direction by realizing a hitherto unstudied class of heat engine cycles. In particular, the working fluid of our engine cycle consists of two optical states of a single trapped barium ion, and the load is one vibrational mode of the same ion. The load is prepared with a low average phonon number, which ensures it is in the quantum regime. We consider a generic coupling of the engine with the load, in which the interaction term does not commute either with the engine or the load Hamiltonians, thus enabling a significant back action between the two. This interaction allows us to investigate the impact of the strong engine–load coupling on the energy flow into the load and on the dynamics of the Shannon entropy of the load. We note that, for the energy of the load to change, it is a requirement that the engine–load interaction term should not commute with the Hamiltonian of the load. A second notable aspect of our system is that at the beginning of each cycle the engine is actively reset by the bath to a state which is not thermal, meaning not characterized by a thermal distribution. Taken together, these two properties yield more tunable engine cycles, which allow us to increase the information entropy of the load during heating cycles—a marked contrast with conventional sideband heating, where the information entropy of the load does not change. Furthermore, by rearranging the strokes of the engine cycle, the device can be readily executed in reverse, thus also functioning as a refrigerator that can decrease both the energy and, because of the coupling, the information entropy of the load. In this case, the device can be regarded as a thermodynamically analyzed experimental realization of a cyclic refrigerator coupled to a quantum load.

Figure 1a depicts our experimental platform consisting of a linear ion trap, along with a single ion. Figure 1b presents a schematic of the two-level working fluid (in the following also referred to as the engine), which is coupled to one of the ion’s vibrational modes, which is the load, shown in Fig. 1c. To represent the state of the atom, we use the basis states \(\left|\sigma ,n\right\rangle\), where σ represents the internal-level state and n represents the motional-level state of the harmonic oscillator. We use the notation σ = ↑, ↓ to represent, respectively, the electron in the D5/2,−5/2 or S1/2,−1/2 (cf. Fig. 2), level of the engine, and σ = a for the auxiliary P3/2 level used to reset the two-level system. A simplified schematic illustration of the cycle we have implemented is depicted in Fig. 2 (top), and a more detailed graphical representation may be found in Supplementary Fig. 1. In two of the four strokes, (I) and (III) (orange frames in Fig. 2), the engine is not coupled to the load and the engine state is optically pumped to the electronic ground state (spin down state) involving a dissipative process. In the other two strokes, (II) and (IV) (black frames in Fig. 2), the engine is coupled to the load and not to a bath.

Fig. 1: Experimental set-up.
figure 1

a Image of the ion trap set-up with a single ion acting as both an engine and a load. b Schematic representation of the working fluid of a quantum engine (two-level system) and c the load (the vibrational modes of a quantum harmonic oscillator). The two-level system undergoes a cyclic evolution. The sizes of the filled circles in the harmonic oscillator pictorially represent the occupation probabilities of different modes. Initially, when the ion is cooled near the ground state, the spread in occupation probabilities is small (smaller blue circle). After operating the energy-conversion device for a number of forward (engine type, as opposed to refrigerator type) cycles, the spread in occupation probabilities increases (larger, fuzzier, red circle).

Fig. 2: Depiction of cycle and numerical simulations.
figure 2

(top) A simplified depiction of the four strokes of the cycle. In strokes (I) and (III), the processes do not couple the internal levels to the vibrational mode, and a dissipative process occurs (spontaneous decay denoted by a dashed arrow). In strokes (II) and (IV), the optical and vibrational degrees of freedom are coupled, and a change in the occupation of the internal level is accompanied by a change in the occupation of the vibrational modes. (bottom) The black dotted line shows the results of numerical simulations for the evolution over time of the occupation probability of the higher energy level (D5/2,−5/2), of the two-level system, referred to as pD (left vertical axis). The solid blue line shows the evolution of the mean phonon number 〈nL (right vertical axis). The five steps of the cycle are highlighted by shadings of different colors. First, the system is initialized to the starting state \({\mathcal{O}}\). Process (Ib) takes the system from state \({\mathcal{O}}\) to \({\mathcal{A}}\), as shown in green. Stroke (II), from \({\mathcal{A}}\) to \({\mathcal{B}}\) is in red, stroke (III), from \({\mathcal{B}}\) to \({\mathcal{C}}\) is in gray, stroke (IV) from \({\mathcal{C}}\) to \({\mathcal{D}}\) is in blue. Finally, the cycle is completed by process (Ia), in gray, followed by process (Ib) that brings the system to state \({\mathcal{A}}\) again. The horizontal dashed line in the middle shows the value to which the engine population is reset, once in each cycle, at the end of stroke (I). Here this value is \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\).

This is analogous to a classical Otto cycle, where the engine is decoupled from the load during two dissipative ‘isochoric strokes’ and is coupled to the load during two ‘adiabatic strokes’. However, from a thermodynamics point of view, we must stress two important aspects. The first point concerns the adiabatic strokes: since the coupling of the engine and the load develops correlations between them and causes information entropy to increase in the load, the energy transfer between engine and load cannot be described solely as work. The second point is that we use a generic isochoric stroke in which the engine is not reset to a thermal state, in other words it is coupled to a nonthermal bath. Such a resetting protocol, however, is a path-dependent process in the sense that the engine could be reset to the same state using different dissipative and unitary processes, thus involving different energy exchanges. As a result of these two points, it is generally not possible to clearly differentiate between heat and work transfers, and these common notions must be complemented by other thermodynamic considerations. We will return to this subject in the section on Thermodynamic considerations.

Evolution of the engine cycle

Before implementing the cycle, the system is prepared in a well-defined initial condition by successively applying Doppler cooling and motional sideband cooling. This creates a thermal state that we refer to as \({\mathcal{O}}\) with σ = ↓ and average occupation of the harmonic oscillator 〈nL ≈ 1.2 (note that we use the notation \({\langle \ldots \rangle }_{{\rm{L}}}={\rm{tr}}({\rho }_{{\rm{L}}}^{}\ldots \ )\), where \({\rho }_{{\rm{L}}}={{\rm{tr}}}_{{\rm{E}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) is the reduced density matrix of the load obtained by tracing out the engine from the ‘engine + load’ density matrix ρE+L). The cycle then proceeds with stroke (Ib), followed by stroke (II) and so on. The roman numeral notation (I)–(IV) denotes processes used to go between different states, as shown in Fig. 2 (top) and Supplementary Fig. 1, while the notation \({\mathcal{A}}\), \({\mathcal{B}}\), \({\mathcal{C}}\) and \({\mathcal{D}}\) is used to refer to the states themselves, as in Fig. 2 (bottom).

The four strokes are the following:

Stroke (I) is composed of process (Ia) and (Ib). In process (Ia), any state with σ = ↑ is transferred to the auxiliary a state, which spontaneously decays to the σ = ↓ and σ = ↑ states. Since the σ = ↑ state is continuously depleted, optical pumping into the σ = ↓ state takes place. Process (Ia) brings the engine back to the (nonlabeled) state between \({\mathcal{D}}\) and \({\mathcal{A}}\), see Fig. 2. In process (Ib), with the engine decoupled from the load, the engine is reset to a pure quantum superposition of the two optical levels. This is done using a partial Rabi oscillation applied between the σ = ↑ and σ = ↓ states, which creates a superposition with a predefined population ratio. Stroke (II): the engine–load coupling of Jaynes–Cummings type34 is switched on, and each component of the density matrix of the load (the harmonic oscillator level) is either increased or decreased by one, depending, respectively, on whether the corresponding component of the engine state is in the upper \(\left(\sigma =\,\uparrow \right)\) or lower \(\left(\sigma =\,\downarrow \right)\) level. Stroke (III): The engine and the load are decoupled, and the component of the engine that is in the excited state is dissipatively brought back to the ground state by optical pumping via the auxiliary a state. This process involves a spontaneous decay and is exactly the same process as for (Ia). Stroke (IV): The engine–load coupling of anti-Jaynes–Cummings type is switched on, which swaps the \(\left|\uparrow ,n+1\right\rangle\) and the \(\left|\downarrow ,n\right\rangle\) components of the density matrix. The cycle repeats, with each of the subsequent processes in (I)–(IV) bringing the engine to, in consecutive order, states \({\mathcal{A}}\), \({\mathcal{B}}\), \({\mathcal{C}}\), and \({\mathcal{D}}\) in Fig. 2 (bottom). If not explicitly stated otherwise, the specific time-dependent driving protocol used to implement strokes (II) and (IV) is a resonant sideband transfer35.

After this general overview, we now provide a more detailed description of the set-up and the coupling terms. The device consists of a single Ba+ ion confined in a radiofrequency linear Paul trap36. The Hamiltonian of the whole system is given by


where HE = (ν/2)σz is the Hamiltonian describing the two optical levels of the engine, HL = ω(n + 1/2) is the Hamiltonian of the load, and VM(t) is the interaction Hamiltonian that characterizes the strength of the interaction between the engine and the load for the strokes M = (II) and (IV). VM(t) can be of Jaynes–Cummings type, V(II)(t) = g(t)(σ+a + σa), or of anti-Jaynes–Cummings type, V(IV)(t) = g(t)(σa + σ+a). Here, ν denotes the energy difference between the two levels of the engine, σz is the standard Pauli matrix, ω is the harmonic oscillator frequency of the load, and n is the phonon number operator for the load. The notation σz should not be confused with the notation σ used to denote the internal states of the ion, σ = ↑, ↓, a. Additionally, g(t) (see the Methods for more details) denotes the time-dependent coupling strength, σ+ (σ) raises (lowers) the engine state by one photon, and a (a) destroys (creates) one phonon in the load. Note that VM(t) does not commute with either the engine Hamiltonian HE or the load Hamiltonian HL, which indicates that the engine–load coupling can redistribute the population between the engine states; that is, the two optical levels \({S}_{\frac{1}{2},-\frac{1}{2}}\) and \({D}_{\frac{5}{2},-\frac{5}{2}}\) (see the Experimental set-up section in Methods for details).

The four-stroke cycle described above differs from typical classical thermodynamic cycles in two significant ways:

First, throughout the duration of the Jaynes–Cummings and anti-Jaynes–Cummings interactions (180 μs for resonant sideband transfers), there is strong coupling between the engine and load, leading to correlations between them. Although the correlations are dispelled during resetting, within each cycle they contribute an integral part to the mathematical description of the system (see Supplementary Material 2).

Second, through a process involving energy exchange with both the vacuum of the photon field (in (Ia)) and the lasers (in (Ib)), stroke (I) brings the engine to a predetermined nonequilibrium superposition state, rather than a thermal equilibrium state. Together with the coupling between the engine and load during strokes (II) and (IV), which entails significant population redistribution within the engine, this opens the door to a generic set of operations that can be used to increase the information entropy of the load. As shown below, tuning the superposition state of the engine offers a useful control knob to manipulate the output of the device.

The two aforementioned features allow us to explore situations relevant to energy-conversion devices in the quantum regime. For example, the first point above shows that, in an accurate description of a quantum engine coupled to a quantum load, the strokes in which the engine is coupled to the load are not described by a unitary evolution of the engine alone, and the evolution is only unitary at the level of the full engine + load system. This is in sharp contrast to most existing theoretical models of quantum engine cycles, where an operation to extract work from the engine is assumed to be a unitary process of the engine alone (for example, refs. 6,8,10,12). It is therefore of crucial theoretical importance to include a quantum load and its correlations with the engine, if one is to accurately assess the performance of nanoscale engine cycles.


Device simulations and experimental measurements

We first analyze the system using numerical simulations of the forwards engine cycle, taking into account the most relevant aspects of our experimental set-up, including the main decoherence effects (see the Methods for more details). For a more intuitive understanding of the evolution of the populations in the engine and the load, we refer the reader to Supplementary Fig. 1. The black dotted line in Fig. 2 (bottom) depicts simulation results for the occupation of the D level, pD, over time, while the solid blue line shows the average phonon number in the load, 〈nL. Different shadings identify different strokes, with the red, gray, and blue regions corresponding, respectively, to strokes (II), (III) and (IV). Stroke (I) is partitioned into two shadings: gray for making the engine decay to its ground state on optical pumping, (Ia), and green for bringing the engine to a predetermined value of its excited-state population, \({p}_{{\rm{D}}}^{{\mathcal{A}}}\), (Ib). The horizontal black dashed line in Fig. 2 (bottom) marks the value corresponding to the beginning of the red region, which for this set of simulations is \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\). In Fig. 2 (bottom), 〈nL increases roughly proportionally to the number of engine cycles. Meanwhile, the occupation of the D-level of the engine tends toward a periodic pattern (sharper peaks, right) after a transient period.

Next we turn to experimental measurements. Figure 3a shows the average phonon number, 〈nL, versus the engine cycle number Nc (red dotted line with ), confirming that the engine cycle indeed transfers energy to the load in an approximately linear fashion, with the average phonon occupation number, proportional to the average load energy, increasing from 〈nL = 1.2 to 〈nL = 6.1 over the course of Nc = 8 cycles. To demonstrate that our engine cycle can operate in reverse, we execute the strokes in the order (I), (IV), (III), (II), with the load initially prepared in a highly excited state. The results for this refrigeration operation (blue dot-dashed line with ) are also presented in Fig. 3a for comparison. In both cases, the change of 〈nL is fairly uniform from cycle to cycle for the first eight cycles. Although it cannot be seen from the values of 〈nL in Fig. 3, each data point corresponds to an increasingly non‘thermal-type’ distribution in the load, going from left to right, as we find from our analysis detailed below.

Fig. 3: Dynamics of the mean population of the load: experimental results.
figure 3

ac, Experimentally measured mean phonon occupation number of the load in a non‘thermal-type’ state, 〈nL, versus the number of engine cycles Nc. a compares an engine cycle (red dotted line with ) with a reversed, cooling cycle (blue dot-dashed line with ), with \({p}_{D}^{{\mathcal{A}}}=0.5\) in both cases. b, Performance of engine cycles characterized by different \({p}_{{\rm{D}}}^{{\mathcal{A}}}\), that is, the population in state D on state resetting in stroke (I), with \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.5\) (red dotted line with ), \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\) (blue dot-dashed line with ) and \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.15\) (green continuous line with ). For larger \({p}_{{\rm{D}}}^{{\mathcal{A}}}\), the rate of increase of 〈nL per engine cycle is greater. c, Performance of engine cycles for two different engine–load coupling protocols, rapid adiabatic passage (black ) and resonant sideband transfer (blue ), both using \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\). In all panels, the lines connecting the data points are only to guide the eye. The error bars represent one sigma standard deviation and contain both statistical and systematic errors, obtained by parameter estimation using the least-squares method (see the Methods for details). The reduced χ2 value that gives the error bars depends strongly on the number of data points in a given fit, which ranges from 25 to 200. In all cases, the phase error that enters in the χ2 is 0.1, estimated from >150 replicates.

To measure the average phonon number, we use the experimentally derived probability distribution of the occupation of each level of the load, pn. This is obtained by least-squared fitting of pn with experimentally measured blue sideband Rabi oscillations and using the numerically derived distribution of pn as an initial condition for the fitting (details in the Methods). Each such data point in Fig. 3 is based on a delay scan containing up to 200 time steps for the highest precision (smallest error bar) measurements. Each data point in the delay scan contains 150 repetitions of the exact same experimental sequence, averaged together. An example of a delay scan is shown in the Methods.

We now focus on the performance of the forward cycle. In Fig. 3b, we show that the rate of change in 〈nL versus Nc can be tuned by resetting the engine to different states before stroke (II) (point \({\mathcal{A}}\) in Fig. 2 (bottom), or in other words by varying \({p}_{{\rm{D}}}^{{\mathcal{A}}}\). An increase in \({p}_{{\rm{D}}}^{{\mathcal{A}}}\) increases the rate of change in 〈nL and equates to greater energy flow into the load. This is because, for larger \({p}_{{\rm{D}}}^{{\mathcal{A}}}\), the Jaynes–Cummings-type engine–load coupling in stroke (II) induces a smaller decrease of 〈nL.

Finally, we study how different engine–load coupling protocols might affect the energy flow from the engine to the load. The experimental results for this comparison are depicted in Fig. 3c, where, in terms of 〈nL versus Nc, a rapid adiabatic passage (RAP) protocol37 (black ) is compared with the resonant sideband transfer (blue ) used in Fig. 3a–c. For both cases in Fig. 3c, \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\). Compared with the resonant sideband transfer protocol, the RAP protocol nearly doubles the energy transfer rate. This observation can be understood by the fact that the RAP protocol effectiveness in transferring the populations is greater compared to the resonant sideband transfer. We note here that the only experimental data pertaining to RAP is in Fig. 3c, while all other data are obtained using resonant sideband transfers.

Thermodynamic considerations

The engine cycle we have designed and implemented is shown to pump energy into the quantum load in a cyclic manner. The next step is to look at how the cycle influences the population distribution within the load. When energy is pumped into the load, one might wonder, for instance: (1) whether the load is merely being heated up (in which case the distribution remains thermal), (2) whether the load’s energy increases but the information entropy remains constant or (3) whether the load’s energy increases and the information entropy also increases. In addition to being of basic interest, understanding how the population evolves within the load is helpful in determining whether cyclic repetitions of the four strokes can be used as a means of ‘charging’ the harmonic oscillator/load, effectively turning it into a quantum battery38,39.

To this end, we introduce the concepts of ergotropy \({{\mathcal{E}}}_{{\rm{L}}}\) and of passive states40,41. By definition, the ergotropy of a system is the maximum energy that could be extracted from it via solely unitary operations. It should be noted that unitary operations preserve the information entropy and the rank of the density matrix. A state is passive when the associated density matrix is diagonal in the representation of energy eigenstates, with the diagonal terms (the occupation probabilities) decreasing for increasing energy eigenvalues. To give a familiar example, all thermal states are passive, since the probability of occupation of higher energy levels is smaller than that of lower energy levels. As a case in point, the initial thermal state in Fig. 4a is passive.

Fig. 4: Ergotropy and information entropy dynamics: experimental results.
figure 4

a,b, Experimentally derived occupation probabilities pn of the load, on initial preparation and after Nc = 8 cycles, for the stroke (I) resetting parameter \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.5\). c, The (approximated) passified density matrix of the load, obtained from b. The occupation probabilities of the load in b are rearranged to go in descending order with increasing n number. This yields the passified load probability distribution \({\tilde{p}}_{n}\) as a function of n. d, Normalized ergotropy (energy per ω) \({{\mathcal{E}}}_{{\rm{L}}}\) of the load versus Nc, with \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.5\). The red continuous line shows the exact numerical simulation value. The black dashed line is the approximate ergotropy using only the diagonal elements of the reduced density matrix of the load. The shows the experimental data. The green arrows relate the measured probability distributions depicted in a,b to the corresponding value of ergotropy in d. e, Information entropy \({{\mathcal{S}}}_{{\rm{L}}}\) of the load versus time for the exact numerical estimate (red continuous line), an approximate numerical estimate considering only the diagonal elements of the density matrix (black dashed line), and the experimentally evaluated information entropy values after two, four, six and eight cycles (blue squares), for \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\). f, The same as e, but for the refrigerator cycle, and for \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.5\). Here the experimental data are given by the blue triangles. The quantities in this figure are derived from the same data used in Fig. 3, and the error bars represent one sigma standard deviation. As in Fig. 3, the reduced χ2 depends on the number of data points in the fit for a given number of cycles, which ranges from 25 to 200. The phase error used is 0.1, estimated from >150 replicates.

It follows that to determine the ergotropy of a given population distribution, the distribution can be compared with its corresponding so-called ‘passified’ state. The ergotropy is then defined as the difference in energy between the original state ρL(t), and the passified state, \({\tilde{\rho }}_{{\rm{L}}}(t)=M{\rho }_{{\rm{L}}}(t){M}^{\dagger }\) where M is an ideal unitary transformation that renders the state ρL(t) passive. Following ref. 40, the ergotropy of the load at a given time t is \({{\mathcal{E}}}_{{\rm{L}}}(t)={\rm{tr}}[{H}_{{\rm{L}}}{\rho }_{{\rm{L}}}(t)]-{\rm{tr}}[{H}_{{\rm{L}}}{\tilde{\rho }}_{{\rm{L}}}(t)]\), where HL is the Hamiltonian of the load, ρL(t) is the reduced density matrix of the load and \({\tilde{\rho }}_{{\rm{L}}}(t)\) is the passified state. Note that ergotropy is always greater or equal to zero, and it vanishes for passive states40. Experimentally, to determine the ergotropy of the load we look at the distribution of pn within the load and make the assumption (justified below) that the off-diagonal elements of the density matrix of the load ρL(t) may, in our case, be neglected when evaluating the ergotropy. This assumption turns out to be accurate despite the fact that coherence is present throughout the duration of the coupling between the engine and the load. We emphasize that, at the time at which the ergotropy is experimentally measured, the engine and the load are decoupled.

Figure 4a,b shows two examples of measured pn distributions, extracted by fitting to experimental data. In Fig. 4c, we also show \({\tilde{p}}_{n}\), the probability of occupation of the energy levels for the passified state \({\tilde{\rho }}_{{\rm{L}}}(t)\), obtained by applying an ideal unitary transformation to ρL(t), Fig. 4b. The initial state of the load in Fig. 4a is thermal and hence passive. After Nc = 8 cycles, Fig. 4b, the occupation probability profile is no longer passive and the load has nonzero ergotropy. This can be seen from the shift in the location of the peak from n = 0 in Fig. 4a to n = 4 in Fig. 4b. The qualitative evolution from a thermal distribution toward a Gaussian form is driven by the preparation of a superposition during step (Ib) of the cycle. Theoretically, under ideal conditions of perfect state transfer and in the absence of dissipation, the ergotropy would grow with increasing number of cycles as \({{\mathcal{E}}}_{{\rm{L}}}\propto\)\({N}_{{\rm{c}}}-\alpha \sqrt{{N}_{{\rm{c}}}}\), where α is a constant (see Supplementary Material 2). The detailed evolution of the ergotropy measured in the experiment is shown in Fig. 4d by . For Nc = 8 cycles, the ergotropy is calculated using the states ρL(t) and \({\tilde{\rho }}_{{\rm{L}}}(t)\) shown in Fig. 4b,c.

The ergotropy clearly grows with the number of cycles, indicating that successive iterations of the same cycle continuously increase the ergotropy of the load. Numerical simulations of the state of the ion with increasing cycles support this (continuous and dashed lines), showing that the numerical and experimental values are in qualitative agreement. Since the experimental ergotropy is evaluated assuming a diagonal reduced density matrix of the load, the numerical simulations are also used to verify the validity of this approximation. The simulation results show that the difference between the approximated ergotropy, neglecting the off-diagonal elements of the reduced density matrix of the load (dashed black line) and the exact ergotropy (continuous red line), is indeed small.

In addition to the change in ergotropy, Fig. 4b shows that the variance in the phonon number increases over a few cycles. This behavior is consistent with a pattern of biased diffusion, as predicted in an earlier theoretical study24. Figure 4e,f shows both numerical and experimental results for the evolution of the von Neumann (Shannon information) entropy \({{\mathcal{S}}}_{{\rm{L}}}=-{\rm{tr}}\left[{\rho }_{{\rm{L}}}\mathrm{log}\,({\rho }_{{\rm{L}}})\right]\) for an engine–load coupling implemented by the resonant sideband transfer protocol. The red continuous line represents the exact information entropy of the load while the black dashed line represents an estimate of the information entropy neglecting the off-diagonal elements of the reduced density matrix of the load. Since the two curves are very close to each other, the experimentally measured values of pn can be used to estimate the information entropy of the load, depicted by blue squares and triangles in Fig. 4e,f. Figure 4e shows the information entropy increasing over Nc = 8 cycles, for \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\). Figure 4f shows the information entropy decreasing over the course of 15 cooling cycles, with \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.5\). Here we note the experimental constraint on the error bars in Fig. 4. For the specific endpoint cases of 0 cycles and 8 or 15 cycles, we used longer scans to reduce the error bars and to confirm the general trends. However, the time required to perform such scans for every number of cycles in turn would diminish the overall accuracy of the results; this is because of slow long-term instabilities in the lasers, which increase the systematics. We observe the fact that the information entropy increases in Fig. 4e can be traced back to the coupling between the engine and the load in strokes (II) and (IV), which leads to the result that the overall density matrix cannot be accurately modeled as a tensor product of the reduced density matrices of, respectively, the engine and the load. Therefore, the increase in information entropy provides one signature of the presence of correlations between the engine and the load.

With the benefit of the above thermodynamic analysis, we find it pertinent to compare the effect of the experimental sequence studied here, with the process of sideband heating or sideband cooling. First and perhaps most obviously, in sideband heating or cooling the two-level system is continuously coupled to the harmonic oscillator. This prohibits the simulation of a four-stroke equivalent thermodynamic cycle where two of the strokes are performed on the engine alone (strokes (I) and (III)). Second, and related to this, in sideband heating or cooling one of the ‘qubit’ states is continuously emptied. This is in contrast with stroke (Ib) of our energy-conversion cycle, which creates a superposition of the engine states. Using a superposition changes the thermodynamic behavior of the system on application of stroke (II), which consequently produces an increase in the information entropy of the load. This distinguishes our cycle from both plain heating of the load, for which the ergotropy would not increase, and sideband heating, which in ideal conditions would increase the energy of the load but not the information entropy.

To summarize, our four-stroke cycle investigates a generic scenario in which the coupling between the engine and load does not commute with their respective Hamiltonians and in which superposition states of the engine are used to tune the engine performance.


This work describes the experimental implementation and theoretical study of both an engine and a refrigerator quantum cycle, using two electronic states of a single trapped ion as the working fluid and one vibrational mode of the same ion as the quantum load. We demonstrate that, when engine cycles are run after preparing a superposition of electronic states, the ergotropy, information entropy, and average phonon number in the load increase. We also run the device under different forward-cycle conditions, demonstrating that its operation can be variably tuned. This is a thermodynamic study of a cyclic quantum energy-conversion device operating with strong coupling to a load that operates in the deep quantum regime. Peculiar features of our energy-conversion device include (1) resetting of the working fluid to nonequilibrium states, through the use of both dissipative optical pumping and coherent laser excitation to implement stroke (I), and (2) the presence of nontrivial back action from the load.

A detailed analysis of the dynamical and thermodynamic properties of the engine cycles shows that in theory, simulations, and experiment, the engine–load coupling results in correlations between the engine and the load, and information entropy generation and flow between them which, at this scale, cannot be neglected. A remarkable conclusion of this analysis is that, because it is possible to change the phonon population distribution of the load, the load can operate as an effective quantum battery. This battery could be discharged for instance by coupling it to another harmonic oscillator (for example, another vibrational mode of the ion). Future experimental works could focus on the use of two or more harmonic oscillators as batteries, with a special focus on the charging speed, the role of correlations built between the oscillators, and the possible occurrence of quantum advantage38,39,42,43,44. In particular, experiments using a larger number of ions could test whether quantum correlations between N qubits could lead to an N-fold advantage in the charging power per qubit when global operations are permitted, as predicted in ref. 45.

Next, we briefly comment on the efficiency of the engine cycle. The cycle couples optical states of the ion (the working fluid) with its vibrational states (the load). As discussed previously, in a generic scenario it is not straightforward to differentiate heat from work and hence the usual definition of efficiency does not apply. Since the energy of each photon quantum is much greater than a phonon quantum, it is also not particularly useful to define the efficiency purely in terms of energy conversion. However, this set-up still converts photon quanta (in the engine) to phonon quanta (in the load). Therefore, analogous to solar cells, we define an efficiency of conversion of quanta, ηQ, as the net increase in the mean phonon number in the load divided by the total input of photon quanta in the working fluid throughout the various strokes. For the cycle with \({p}_{{\rm{D}}}^{{\mathcal{A}}}=0.32\) and a resonant sideband transfer for strokes (II) and (IV), as in Fig. 2 (bottom), the number of optical photons added per cycle is given by the average value of \({p}_{{\rm{D}}}^{{\mathcal{B}}}\approx 0.52\), plus the average value of \({p}_{{\rm{D}}}^{{\mathcal{D}}}\approx 0.58\). Meanwhile, the average increase in the mean phonon number per cycle is ≈0.4. This results in ηQ ≈ 0.4/1.1 ≈ 0.36. For larger \({p}_{{\rm{D}}}^{{\mathcal{A}}}\), this efficiency increases, and in particular, for \({p}_{{\rm{D}}}^{{\mathcal{A}}}=1\) it can reach ηQ 1.

Given the importance of measurements in quantum mechanics, and specifically in quantum thermodynamics, we conclude with a comment on the role of measurements. A projective measurement made on the state of the engine collapses both the states of the engine and the load. This makes it important to specify how measurements are performed in our experiment. In this work, the device is run for various numbers of cycles and then a single measurement is performed at the end of the prescribed number of cycles. However, we stress that, in our set-up, a nonselective measurement of the energy of the load12,46 at an intermediate or later time would bear little impact on the evolution of the system for two reasons. First, the engine and the load are in a product state at the end of strokes (I) and (III). Second, even if quantum coherence can build up in both the engine and the load during the cycle, as explained above, because of the inherent decoherence in the experiment, the quantities we study are well described by a diagonal density matrix. Further studies are called for to gain deeper insight into the role of measurements in quantum energy-conversion devices.


Experimental set-up

Our energy-conversion device consists of a singly ionized 138Ba+ atom in a linear Paul trap, with a radial trap frequency of ~1.7 MHz. The 138Ba+ ion has five internal energy levels relevant to this experiment. Four lasers at wavelengths of 493, 650, 614 and 1,762 nm are needed to address these states. The 493 and 650-nm lasers are used for Doppler cooling and re-pumping out of the D\({}_{\frac{3}{2}}\) level, as well as for quantum state detection by fluorescence observation. The 614-nm laser is used in conjunction with the 1,762-nm laser for further sideband cooling, nearly to the ground state of the radial external motional mode. A separate, circularly polarized 493-nm laser, along with the 650-nm laser, is used to initialize the ion to the ground state of the engine, S\({}_{\frac{1}{2},-\frac{1}{2}}\), by optical pumping47. The 1,762-nm laser is also used to address the two energy levels, which constitute the engine of our device, namely, the S\({}_{\frac{1}{2},-\frac{1}{2}}\) and the D\({}_{\frac{5}{2},-\frac{5}{2}}\) states. This transition can alternatively be described as our quantum bit (‘qubit’) transition, due to its long (~30 s) lifetime48. We have confirmed that the lifetime is ≥2 s, which is sufficient for our purposes, since 2 s is longer than the characteristic time of individual experiments. Technical details of the lasers themselves and laser locking set-ups are available in refs. 49,50. The 650- and 614-nm lasers, along with the Doppler-cooling 493-nm laser, are combined into a single beam before being focused on the ion, while the 1,762- and 493-nm (optical pumping) beams are applied separately, through different optical viewports into the ultra-high vacuum chamber. The 1,762-nm laser’s frequency is tuned by generating a signal either using a direct digital synthesizer (DDS) or an arbitrary waveform generator (AWG) for resonant sideband or adiabatic sideband transitions, respectively. The signal produced by the DDS or AWG is channeled by a switch and then amplified before going to an acousto-optic modulator.

To implement the simplified two-level system depicted in Fig. 1, three pairs of coils in the Helmholtz configuration are used to apply a 4 Gauss external magnetic field along the axis of the 493-nm (optical pumping) laser beam. This Zeeman splits the otherwise degenerate internal atomic energy levels and defines an axis of quantization of the atom. To initialize the ion to the well-defined ground state, S\({}_{\frac{1}{2},-\frac{1}{2}}\), at the beginning of each experiment we apply the 493-nm optical pumping beam, with left circular polarization, propagating along the quantization axis.

As mentioned previously, the engine of the device is formed by the approximate two-level system consisting of the S\({}_{\frac{1}{2},-\frac{1}{2}}\) and the D\({}_{\frac{5}{2},-\frac{5}{2}}\) states. The transition between these states is addressed by the narrow linewidth (nearly single frequency) 1,762-nm laser (linewidth 100 Hz). The two-level approximation holds since the 1,762-nm laser hardly shifts any other energy level of the atom while addressing the S\({}_{\frac{1}{2},-\frac{1}{2}}\) and D\({}_{\frac{5}{2},-\frac{5}{2}}\) levels on resonance.

The ion’s internal quantum state, that is (for our purposes), whether it is in the S\({}_{\frac{1}{2},-\frac{1}{2}}\) or D\({}_{\frac{5}{2},-\frac{5}{2}}\) state, is determined by measuring its fluorescence while exciting it with only the 493- and 650-nm lasers. If the ion is in the D\({}_{\frac{5}{2},-\frac{5}{2}}\) state, it is not affected by the 493- and 650-nm lasers, and no fluorescence is observed. If the ion is not in the in the D\({}_{\frac{5}{2},-\frac{5}{2}}\) state, exposing it to the 493- and 650-nm lasers causes it to excite and de-excite continuously on the 493-nm transition, emitting 493-nm photons. In this way, by measuring 493-nm photons one can distinguish between the ground state and the D\({}_{\frac{5}{2},-\frac{5}{2}}\) state with nearly 100% efficiency. Repeating such a measurement many times on an ‘identically’ prepared state, and averaging the results yields a value pS, or in other words the probability that the ion is in the \({S}_{\frac{1}{2},-\frac{1}{2}}\) state.

Experimental procedure

The ion is first Doppler cooled for 300 μs using the 493- and the 650-nm lasers, and then sideband cooled for ~25 ms by continuously applying the red detuned 1,762- and the 614-nm lasers. One full cycle of the device is implemented via the following steps:

  1. (I)

    The first step, \({\mathcal{D}}\) to \({\mathcal{A}}\) in Fig. 2 (bottom), consists of two parts:

    (Ia) (Setting the engine to its ground state): Any population in the D\({}_{\frac{5}{2},-\frac{5}{2}}\) state is transferred from the D\({}_{\frac{5}{2},-\frac{5}{2}}\) state to the S\({}_{\frac{1}{2},-\frac{1}{2}}\) state via the P\({}_{\frac{3}{2}}\) state. This is done by simultaneous application of the 614-, 650- and 493-nm optical pumping lasers for ~5–50 μs. The 493-nm optical pumping beam uses circularly polarized light to continuously empty the \({S}_{\frac{1}{2},+\frac{1}{2}}\) state.

    (Ib) (Resetting the engine to state \({\mathcal{A}}\)): The 1762-nm laser is applied to the ion at exactly the carrier optical transition frequency, for somewhere between 0 and 2.1 μs, depending on the desired value of \({p}_{{\rm{D}}}^{{\mathcal{A}}}\). (Note, 2.1 μs corresponds to half of a π time, or one quarter of a period, of the carrier Rabi oscillation). Although in our case the laser phase used for coherent excitation is fixed, producing a pure state, it could also be randomized to effectively prepare a mixed state.

  2. (II)

    (Red sideband transfer, \({\mathcal{A}}\) to \({\mathcal{B}}\)): A red sideband transfer is performed by applying the red detuned 1,762-nm laser for 180 μs (resonant transfer) or by sweeping (±30 kHz) across the red sideband frequency, over 4 ms, in the case of the rapid adiabatic protocol. Here red sideband and red detuned refer to the wavelength given by λr.s. = (1,762-nm carrier transition) + 2πc/ω, where c is the speed of light and ω is the radial motional frequency of the ion in the trap, 2π × 1.7 MHz. The coupling strength, g(t), is ~10–50 kHz for the resonant transfer, and ~1.5 kHz for the rapid adiabatic protocol.

  3. (III)

    (Setting the engine to its ground state, \({\mathcal{B}}\) to \({\mathcal{C}}\)): Step (III) is the same as step (Ia).

  4. (IV)

    (Blue sideband transfer, \({\mathcal{C}}\) to \({\mathcal{D}}\)): A blue sideband transfer is performed by applying the blue detuned 1,762-nm laser (that is, λb.s. = (1762-nm carrier transition) − 2πc/ω), for 180 μs, for the resonant transfer or by sweeping (±30 kHz) across the blue sideband frequency, over 4 ms, for the rapid adiabatic protocol.

These strokes are repeated an integer number of iterations ranging from Nc = 0 to 8 when using resonant sideband transfer for the coupling between the two-level system and the harmonic oscillator, or Nc = 0–5 when using the rapid adiabatic transfer protocol. In stroke (I), the engine is prepared in state \({\mathcal{A}}\) (referring to the states in Fig. 2), in stroke (II) the engine and the load are coupled, then in stroke (III) the engine is prepared in state \({\mathcal{C}}\) and in stroke (IV) the engine and load are coupled again.

After the intended number of cycles is run, both the internal and external states of the ion are detected by performing a blue sideband Rabi excitation scan. This entails applying a laser at the wavelength λb.s. for times ranging from t = 0 to t ≥ 100 μs, and at each time value the state of the ion is detected. For a given time value (each data point in Fig. 5), the full set of steps described above is repeated 150–200 times, and the fraction of the outcomes where the ion is found in the S\({}_{\frac{1}{2}}\) state is calculated.

Thus, to obtain the final state of the engine and the load after a given number of cycles, a measurement such as shown in Fig. 5 requires 30,000 individual experiments.

Modeling of the experiment

Each stroke M (I–IV) is modeled by a weak-coupling Markovian master equation of the form

$$\begin{array}{l}\frac{{\rm{d}}{\rho }_{{\rm{E}}+{\rm{L}}}}{{\rm{d}}t}=-\frac{{\rm{i}}}{\hslash }[{H}_{{\rm{E}}}+{H}_{{\rm{L}}}+{V}_{M}(t),\ {\rho }_{{\rm{E}}+{\rm{L}}}]\\+\,{{\mathcal{D}}}_{\phi ,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})+{{\mathcal{D}}}_{h,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})+{{\mathcal{D}}}_{M}^{{\rm{E}}}({\rho }_{{\rm{E}}+{\rm{L}}}).\end{array}$$

Here ρE+L is the density matrix of the engine+load system, and [, ] denotes the commutator. As before, HE is the Hamiltonian describing the two optical levels of the engine, HL is the Hamiltonian of the load, and VM(t) is the interaction Hamiltonian. The three main dissipative processes are described by \({{\mathcal{D}}}_{\phi ,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})\), for the dephasing of the vibrational mode (the load) due to fluctuations in the trap RF power, \({{\mathcal{D}}}_{{\rm{h}},M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) for heating of the vibrational mode due to other environmental factors, and \({{\mathcal{D}}}_{M}^{{\rm{E}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) for the decay of the two-level atom (the engine) due to spontaneous emission35,51. In more detail, \({{\mathcal{D}}}_{\phi ,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) is given by

$${{\mathcal{D}}}_{\phi ,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})={\gamma }_{\phi ,M}^{{\rm{L}}}\left(n{\rho }_{{\rm{E}}+{\rm{L}}}n-1/2\left\{n,{\rho }_{{\rm{E}}+{\rm{L}}}\right\}\right)$$

where \({\gamma }_{\phi ,M}^{{\rm{L}}}\) is the dephasing rate of the vibrational mode, n is the phonon number and the brackets denote the anti-commutator. \({{\mathcal{D}}}_{h,M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) is given by

$$\begin{array}{l}{{\mathcal{D}}}_{{\rm{h}},M}^{{\rm{L}}}({\rho }_{{\rm{E}}+{\rm{L}}})={\gamma }_{{\rm{h}},M}^{{\rm{L}}}{n}_{{\rm{m}}}\left({a}^{\dagger }{\rho }_{{\rm{E}}+{\rm{L}}}a-1/2\left\{a{a}^{\dagger },{\rho }_{{\rm{E}}+{\rm{L}}}\right\}\right)\\ +\,{\gamma }_{{\rm{h}},M}^{{\rm{L}}}(1+{n}_{{\rm{m}}})\left(a{\rho }_{{\rm{E}}+{\rm{L}}}{a}^{\dagger }-1/2\left\{{a}^{\dagger }a,{\rho }_{{\rm{E}}+{\rm{L}}}\right\}\right).\end{array}$$

Here \({\gamma }_{{\rm{h}},M}^{{\rm{L}}}\) is the heating rate of the vibrational mode, nm is the target occupation of the mode, toward which equation (4) drives the harmonic oscillator, while a and a are the creation and annihilation operators for the harmonic oscillator, respectively. \({{\mathcal{D}}}_{M}^{{\rm{E}}}({\rho }_{{\rm{E}}+{\rm{L}}})\) is given by

$${{\mathcal{D}}}_{M}^{{\rm{E}}}({\rho }_{{\rm{E}}+{\rm{L}}})={\gamma }_{M}^{{\rm{E}}}\left({\sigma }^{-}{\rho }_{{\rm{E}}+{\rm{L}}}{\sigma }^{+}-1/2\left\{{\sigma }^{+}{\sigma }^{-},{\rho }_{{\rm{E}}+{\rm{L}}}\right\}\right)$$

where \({\gamma }_{M}^{{\rm{E}}}\) is the spontaneous emission rate of the excited electronic state of the atom and σ± are the raising and lowering operators for the electronic states51.

Throughout a given stroke M, we have the parameter of the engine Hamiltonian ν = 170 THz (the frequency difference between the two levels), while for the load Hamiltonian ω = 1.7 MHz (the oscillation frequency of the ion). The coupling between the engine and the load is set to zero both for the first and the third strokes; that is, M = (I) and (III).

The dissipation rates for the load have been measured in separate experiments to be \({\gamma }_{\phi ,M}^{{\rm{L}}}=318\,\) and \({\gamma }_{{\rm{h}},M}^{{\rm{L}}}\le 1\) Hz (we use \({\gamma }_{{\rm{h}},M}^{{\rm{L}}}=0.4\,\) s−1 in our simulations). The motional heating rate, \({\gamma }_{{\rm{h}},M}^{{\rm{L}}}\), is consistent with the size of the trap. The atomic decay rate for the engine is measured to be <1 Hz, so we use \({\gamma }_{M}^{{\rm{E}}}=0.4\,\) s−1 in the numerics. The dominating decay is thus due to \({\gamma }_{\phi ,M}^{{\rm{L}}}\), the dephasing of the motional oscillation. These parameters are fixed in all strokes except the optical pumping stroke. In strokes (Ia) and (III), the optical pumping to the ground state is modeled by using \({\gamma }_{{\rm{I}}}^{{\rm{E}}}={\gamma }_{{\rm{III}}}^{{\rm{E}}}\approx 700\,\) kHz. Experimentally, this is achieved by transferring the population to a third excited state, which spontaneously decays at a similar rate as modeled. In stroke (Ib), an extra term Ω0σx, where σx = σ+ + σ, is added to the engine Hamiltonian to effect a Rabi transfer between the S and D levels. The on-resonance coupling strength used in our experiment is measured to be Ω0 = 121.7 kHz. This results in an evolution of the population of the excited D state as a function of time given by ref. 35. To set the desired population ratio for the two-level system, Δt is adjusted while \({\gamma }_{M}^{{\rm{E}}}\) and Ω0 are fixed by their experimental values.

Strokes (II) and (IV) are executed either via a resonant sideband Rabi pulse or a sideband RAP protocol. The only difference between strokes (II) and (IV) is the frequency of the applied laser, which either corresponds to the first red sideband, which couples \(\left|\downarrow ,n\right\rangle\) with \(\left|\uparrow ,n-1\right\rangle\), or to the first blue sideband, which couples \(\left|\downarrow ,n-1\right\rangle\) with \(\left|\uparrow ,n\right\rangle\). For the resonant sideband transfer, the coupling between the engine and the load is given by

$$\begin{array}{l}V{(t)}_{({\rm{II}})}^{{\rm{res}}}=\hslash {g}_{n,n^{\prime} }(t)({\sigma }^{+}a+{\sigma }^{-}{a}^{\dagger })\\ V{(t)}_{({\rm{IV}})}^{{\rm{res}}}=\hslash {g}_{n,n^{\prime} }(t)({\sigma }^{+}{a}^{\dagger }+{\sigma }^{-}a)\end{array}$$

where \({g}_{n,n^{\prime} }\) is the sideband Rabi frequency when the states \(\left|\downarrow ,n\right\rangle\) and \(\left|\uparrow ,n^{\prime} \right\rangle\) are coupled. The sideband Rabi frequency \({g}_{n,n^{\prime} }\) is given by \({g}_{n,n^{\prime} }=\eta \sqrt{{n}_{ \,{>}\,}}{\Omega }_{{\rm{s}}}^{0}(t)\), where n> denotes the greater of the two values, n and \(n^{\prime}\), and η = 0.012 is the Lamb–Dicke parameter. The amplitude \({\Omega }_{{\rm{s}}}^{0}(t)\) is 0 before and after the stroke, and it takes the constant value \({\Omega }_{{\rm{s}}}^{0}{t}_{M}=\pi\), where \({\Omega }_{{\rm{s}}}^{0}\) is the sideband Rabi frequency for the transition between \(\left|\downarrow ,0\right\rangle\) and \(\left|\uparrow ,1\right\rangle\), during the stroke. Thus, letting tM be the duration of the strokes M = (II), (IV), we use tM = π/g0,1 for a complete population inversion when n = 0. Since the coupling strength \({g}_{n,n^{\prime} }\) depends on n, the coupling strength increases with n. However, as tM is fixed, the percentage of the population transferred for a given time tM is lower for higher n values.

We also performed experiments using the RAP protocol, which has a weaker theoretical dependence on n. The coupling in the RAP interaction Hamiltonian is of Landau–Zener type, and it acts simultaneously on multiple levels n of the load. It is given by

$$V{(t)}_{({\rm{II}})}^{{\rm{RAP}}}=\hslash \Delta (t){\sigma }^{{\rm{z}}}+2\pi \hslash {g}_{0}({\sigma }^{+}a+{\sigma }^{-}{a}^{\dagger }),$$
$$V{(t)}_{({\rm{IV}})}^{{\rm{RAP}}}=\hslash \Delta (t){\sigma }^{{\rm{z}}}+2\pi \hslash {g}_{0}({\sigma }^{-}a+{\sigma }^{+}{a}^{\dagger }),$$

where g0 = ηΩ0 ≈ 1.5 kHz. Here Δ(t) = −Δ0(1 − 2t/τ). Δ0 is the range of frequencies across which the laser is swept, on either side of the sideband transition. σz is the Pauli matrix, and τ is a parameter that is used to determine the sweep rate. The sweep rate is dictated by the ratio Δ0/τ. For the simulations, we use Δ0 = ±30 kHz and τ = 4.0 ms. These values are based on results obtained from many experiments, performed while varying Δ0 and τ to optimize the RAP transfer protocol for maximum transfer efficiency. In both strokes (II) and (IV), we achieve maximum transfer efficiency rates of ~80%.

To simulate steps (I)–(IV) of the engine cycle, the time-dependent Hamiltonian is solved numerically using the python QuTiP package52,53. This gives the density matrix of the engine and the load at each point in time. The density matrix, ρE+L, is then used to evaluate the observables of interest, to extract results from the observables, and to compare to experimental measurements.

Data analysis

The heat engine or refrigeration operations are implemented for a certain number of complete cycles (Nc = 2, 4, 6, 8 or 15 for resonant transfer and Nc = 1, 3 and 5 for the RAP transfer). At the end of a given number of cycles, the blue sideband laser is applied for a duration t. Then, a measurement on the (S state to P state) transition gives an outcome indicating whether the ion is in the S state or the D state. This procedure is repeated 150 times for each duration of the application of the blue sideband laser. The 150 experiments are then averaged to yield the probability that, given the operations to which the ion was previously subjected (the cycles), it is in the S state on measurement. This probability is called pS. pS is then measured for different excitation times (t + 3 μs, t + 6 μs and so on), with 150 experiments each time. For a typical scan, this process is repeated up to t ≥ 100 μs. For specific cases, to establish reference values, scans are run up to t = 600 μs. An example of a reference curve, along with the experimental 1-sigma error, is shown in Fig. 5a. This curve corresponds to the case Nc = 8 and \({p}_{{\rm{S}}}^{{\mathcal{A}}}=0.5\). Outlier data points, pS, were removed manually by visually monitoring scans as they were in progress and noting the time when the photo-multiplier-tube detector signal dropped suddenly (due to occasional collisions) or increased suddenly (due to occasional laser instabilities).

For each number of cycles Nc, the final state of the load is estimated from a scan such as just described, using the protocol outlined in ref. 54. Theoretically, the pS(t) due to resonant sideband excitation is a linear function of the initial population distribution in the load (harmonic oscillator). The probability of the ion being in a given level of the harmonic oscillator, pn, is related to pS by

$${p}_{{\rm{S}}}={\sum \limits_{n}}{p}_{n}{\cos }^{2}({\Omega }_{n,n+1}t){e}^{-{\gamma }_{n}t},$$

where Ωn,n+1 and γn are the blue sideband Rabi frequency and the decay rate for the nth motional state, respectively35. Ωn,n+1 is determined from the experimental value of the Ω0,1. For γn, we use the experimentally measured value \({\gamma }_{n}={\gamma }_{{\rm{h}},M}^{{\rm{L}}}\sqrt{n+1}\). To extract the distribution that is most likely to describe the experimental result, a least-squared fit is performed on the data using the model curve described by equation (9). The fit is constrained using the minimum number of n values that accurately capture the distribution. Typically, this is around 12–15 n values. As a starting distribution, the fit routine uses the expected distribution obtained from numerical simulations. The fit is then restricted to search for values of pn, which are within ±5% of the numerical simulation results. In most cases, the resulting reduced χ2 value is <1, suggesting an overestimate of the phase error in the experiment. The phase error is estimated to be ~0.1 based on >150 repetitive measurements of pS. The error was measured independently for two scenarios: after no heating cycles, and after eight heating cycles, to verify that running cycles does not affect the error on the phase. In both cases, the error was found to be similar. In Fig. 5a, the blue continuous line shows the fit for the corresponding data.

Fig. 5: Measurement of the distribution of the occupation of the load.
figure 5

a, The population of the S state, pS, as a function of the exposure time of the ion to the blue sideband laser excitation. The blue line is a fit using equation (9) with reduced χ2 = 0.7. b, Distribution of occupation, pn, of the different levels of the harmonic oscillator mode after Nc = 8 cycles. The distribution obtained from numerical calculation (empty bars) is compared to the one obtained by the fit to the experimental data (shaded bars). The error bars are depicted in red in both a,b. In a, the error bars are all identical and based on a single measurement of the phase error, estimated from >150 replicates to be ~0.1. In b, the reduced χ2 is calculated as for Fig. 3 and depends on the number of data points in a given fit, ranging from 25 to 200. The phase error is the same as in a, and all error bars in a,b represent one sigma standard deviation.

Figure 5b shows the distribution of pn derived from numerical simulation (empty bars), as well as the fitted distribution of pn (shaded bars). The error on the fitted values of pn is calculated using a standard technique of error estimation for parameters of a least-squares fit55. We note that, to reduce the running time of the overall experiment, we have only produced reference scans for Nc = 0 and Nc = 8 cycles. The number of data points in these scans was chosen to be up to eight times greater than for other numbers of cycles. Therefore, for these scans the uncertainties on the derived observable are correspondingly smaller (Figs 3 and 4).