Introduction

The global societal impact of heat engines has been enormous through history. Various types of heat engines such as those powering pumps and motors have been extensively analyzed and utilized in a great number of practical applications since the industrial revolution. The idea of modelling a quantum system as a heat engine was presented already in the 50’s, when Scovil and Schulz-DuBois analyzed the three-level maser as a heat engine1. During the recent decades however, first the development of quantum thermodynamics2,3,4, and later the rapidly increasing number of quantum technological devices5, has led to renewed interest in heat engines operating at the mesoscopic quantum level—quantum heat engines (QHEs).

Recently, QHE behaviour has been experimentally demonstrated in various microscopic atomic devices, such as in single trapped ions6, a spin coupled to single-ion motion7,8, nitrogen vacancy center interacting with a light field9, and in nuclear magnetic resonance10,11. In addition, a QHE driven by atomic collisions was reported in12 where a quantum Otto cycle was achieved in large quasi-spin states of Cesium impurities immersed in an ultracold Rubidium bath. Also superconducting circuits provide prospects for demonstrating QHEs13,14,15,16,17,18. All of these devices are inherently not autonomous in the sense that they are all driven by some type of external control. In this case, it is very difficult to extract, or even directly observe, the work produced by the heat engine. If we wish to demonstrate an actual autonomous quantum heat engine, efforts should be directed at creating a device, work output of which can be directly observed instead of being superimposed on macroscopic external control fields. In this paper, we propose and theoretically study a device potentially remedying this issue, a topic studied previously in references19,20,21,22,23,24 as discussed below.

Perhaps the simplest model system of a QHE is a quantum harmonic oscillator (QHO) of variable frequency coupled to two heat reservoirs with peaked line shapes, so that the coupling strength to each of the reservoir can be varied by driving the oscillator in and out of resonance with the respective reservoir. Choosing the hot reservoir central frequency higher than the cold reservoir central frequency, a cycle depicted in Fig. 1 can be achieved2,4. This is called the quantum Otto cycle25. Typically, in this scenario the frequency of the QHO is considered to be controlled by an external drive. There are plenty of examples of such quantum heat engines as cited above6,7,8,9,10,11,12. In this case, however, the device is not autonomous, but completely dependent on constantly being controlled by some external force that in practical scenarios turns out to consume macroscopic amounts of power, greatly exceeding any work extracted by the heat engine from the thermal gradient. In this paper however, we propose a device, where the driving of the tunable QHO is incorporated into the device itself on the mesoscopic level, removing the need for macroscopic external driving. Our proposal, in essence, realizes an autonomous QHE, which continuously produces work once set to motion, without the need for any external control fields after the initialization phase.

Figure 1
figure 1

Quantum Otto cycle considered in this work. The angular frequency \(\omega _\mathrm{a}\) of the harmonic oscillator depicted as the quadratic potential traverses between values \(\omega _\mathrm{c}\) and \(\omega _\mathrm{h}\) at average photon numbers \(n_\mathrm{c}\) and \(n_\mathrm{h}\), respectively. The work obtained from the cycle \(W_\mathrm{out}\) exceeds the work done on the oscillator \(W_{\mathrm{in}}\). Consitently, the heat obtained from the hot reservoir by the system \(Q_\mathrm{h}\) exceeds the heat released from the system to the cold reservoir \(Q_\mathrm{c}\).

In the spirit novel quantum technologies and inspired by the simple QHO model, we propose a way of utilizing systems realizing an optomechanical Hamiltonian26,27 as an autonomous quantum heat engine. In a prototypical optomechanical system, an optical cavity mode with frequency \(\omega _\mathrm{a}\) is coupled to a slower mechanical mode with frequency \(\omega _\mathrm{b}\) so that the frequency of the optical mode is modulated by the mechanical displacement x, approximately as \(\omega_\mathrm{a}(x)\approx \omega _\mathrm{a}^0+x\frac{\partial \omega _{\mathrm{a} }}{\partial x}\big |_{x=0}\). Let the optical cavity be further coupled to two heat reservoirs with peaked spectral densities such that the center angular frequencies of the hot reservoir \(\omega _\mathrm{h}\) and cold reservoir the \(\omega _\mathrm{c}\) fulfill \(\omega_\mathrm{h} > \omega_\mathrm{a}(x) > \omega_\mathrm{c}\). Assigning temperatures \(T_\mathrm{h}\) and \(T_\mathrm{c}\) to the hot and cold reservoirs, respectively, such that \(T_\mathrm{h} > T_\mathrm{c}\), leads to a device where the state of the optical cavity may undergo the quantum Otto cycle. The cavity mode at \(\omega _\mathrm{a}\) will traverse between the characteristic frequencies of the heat reservoirs driven by the mechanical mode. The optical mode will therefore pump photons from the high-frequency high-temperature environment to the low-frequency low-temperature environment, leading to energy boost to the mechanical mode owing to energy conservation. In this paper we aim to show, that the thermal energy released over the cycle is transformed, at least partially, into the amplitude of the coherent state of the mechanical mode, thus available for useful work in the realm of quantum devices. For the sake of simplicity, we refer to the modes used in our proposal as the optical and the mechanical mode, but our theoretical proposal is hardware agnostic. If there are two modes and reservoirs that fulfill the discovered conditions, such a physical system is prone to be used as an autonomous quantum heat engine.

The proposed device is a heat engine in the most fundamental sense—a heat engine is, by definition, a device that transforms heat into deterministic mechanical motion28,29. It should be noted, however, that this is not the first time an optomechanical system is used as the basis for a QHE. References30,31,32 extensively analyze the possibility of realizing a coherently driven quantum Otto cycle in an optomechanical system. The above-mentioned references19,20,21 utilize optomechanical systems, but rely on periodic incoherent thermal drives. Consequently, the coupling to the heat bath needs to be controlled by some external method, possibly consuming significant power. In contrast to such models, we propose a method which is fully free of temporally varied external controls and aim for a device that can work fully autonomously drawing power from constant-temperature heat reservoirs with static coupling spectra. Further, the references22,23,24 study theoretical models of autonomous QHEs based on optomechanical systems on the level of Markovian master equations. In general, it may be difficult to justify the Markov approximation if the heat reservoirs are spectrally separated and strongly structured in the relevant frequency range of the system, as illustrated in Fig. 2. Thus, in contrast to the previous works, we do not invoke the Markov approximation, but rather consider the non-Markovian dynamics. Consequently, we rigorously take into account the spectral shape arising in all bosonic thermal sources due to quantum effects. As a result, our QHE exhibits autonomous cyclic dynamics in contrast to the traditionally classified completely continuous QHEs and externally controlled reciprocating QHEs.

This paper is organized as follows. In “Analytical model of the quantum heat engine” , we analyze the the proposed quantum heat engine by building an approximate analytical model for it. Subsequently, we find reasonable estimates for the net output power and efficiency of the device along with some physical intuition. Next, in “Heisenberg–Langevin equations for the quantum heat engine”  , we develop a more detailed quasiclassical model based on Heisenberg–Langevin equations to describe the intricate dynamics of the QHE. We further outline how to numerically solve the resulting coupled non-linear stochastic integro-differential equations. In “Dynamics and performance of the quantum heat engine‘’, we investigate the temporal evolution of the device according to the quasiclassical model. We obtain estimates for the power and efficiency, and analyze the power fluctuations inherently present in any QHE. Finally, in “Conclusions”, we summarize our findings, draw conclusions, and provide our insight for the fruitful future research on this autonomous quantum heat engine.

Analytical model of the quantum heat engine

In order to gain physical intuition of the working mechanism of our device, we estimate the efficiency of the proposed QHE by an approximate analytical model. We begin with the usual model of the adiabatic quantum Otto cycle25 and proceed by approximately taking into account the finite widths of the reservoir spectra. First, let us assume that the heat reservoirs have a step-function-like spectra rather than some experimentally encountered smooth peaked line shape, as depicted in Fig. 2. In this case the coupling to each reservoir is sharply turned on and off without any residual coupling when the frequency of the optical mode moves into and out of the corresponding spectrum, respectively. The step function spectra are centered around \(\omega _\mathrm{h}\) and \(\omega _\mathrm{c}\), respectively, and are assumed to have equal widths \(l_\mathrm{h} = l_\mathrm{c}\). Our optical mode frequency \(\omega _\mathrm{a} (t)\) oscillates about \(\omega _\mathrm{a}^0\), which is assumed to be centered in between \(\omega _\mathrm{h}\) and \(\omega _\mathrm{c}\). We assume that the optical mode frequency \(\omega _\mathrm{a} (t)\) traverses from one reservoir to the other periodically in time with the period \(\tau _\mathrm{b} =2\pi /\omega_\mathrm{b}\). Further, we define the interaction time \(\tau\), which we assume to be equal for both reservoirs since the frequency \(\omega _\mathrm{a} (t)\) spends an equal amount of time per cycle in each frequency range defined by the step function of each reservoir (see Fig. 2 for an illustration and Supplementary materials for theoretical details). We further define the average angular frequency over the interaction period \(\bar{\omega }_\mathrm{a}^\mathrm{h/c}\), which is merely the time average of \(\omega _\mathrm{a}(t)\) over \(\tau\), respectively for each reservoir. We use this average value as the effective angular frequency of the optical mode in the corresponding region. Note that we allow the possibility of \(\omega _\mathrm{a} (t)\) reaching values beyond the extents of the step function spectra.

Figure 2
figure 2

Spectral densities of the reservoirs. (a) Experimentally realizable Lorentzian line shapes of the cold (blue color) and hot (red color) reservoirs. The vertical dotted lines denote the center angular frequencies of the cold and hot reservoirs, \(\omega _\mathrm{c}\) and \(\omega _\mathrm{h}\) respectively, and the unbiased angular frequency of the optical mode \(\omega _\mathrm{a} ^0\). (b) Effective step function spectra denoted by the dashed lines. The modulation of the optical-mode frequency \(\omega _\mathrm{a} (t)\) in time is shown by the sinusoidal purple line. The shaded areas represent the interaction regions of the optical mode with the heat reservoirs. The interaction time \(\tau\) is indicated in the figure and assumed equal for the two reservoirs.

To estimate the net work output of this QHE, we need to compute the mean number of photons transferred from the hot to the cold reservoir per cycle. Let the optical mode be coupled to each of the reservoirs so that the dissipation rates are \(\Gamma _\mathrm{h}\) and \(\Gamma _\mathrm{c}\), respectively. The mean number of thermal photons in the optical mode under the steady-state operation after the interaction period \(\tau\) with the hot and cold reservoir is given, respectively by

$$\begin{aligned} n_\mathrm{h}&=N_{\mathrm{h}}^{\mathrm{th}}-(N_{\mathrm{h}}^{\mathrm{th}}-n_{\mathrm{c}})\mathrm{e} ^{-\Gamma _{\mathrm{h}}\tau }, \end{aligned}$$
(1)
$$\begin{aligned} n_\mathrm{c}&=N_{\mathrm{c}}^{\mathrm{th}}-(N_{\mathrm{c}}^{\mathrm{th}}-n_{\mathrm{h}})\mathrm{e} ^{-\Gamma _{\mathrm{c}}\tau }, \end{aligned}$$
(2)

where \(N_{\mathrm{h/c}}^{\mathrm{th}}=1/\left(\exp\left[\frac{\hbar \bar{\omega }_\mathrm{a} ^\mathrm{h/c} }{k_\mathrm{B} T_{\mathrm{h/c}}}\right]-1\right)\) is the mean photon number of the optical mode if it is fully thermalized with the hot or the cold reservoir, respectively, \(\hbar\) is the reduced Planck constant, and \(k_\mathrm{B}\) is the Boltzmann constant. This set of equations can be solved for the steady state photon numbers given by

$$\begin{aligned} n_{\mathrm{h}}=\frac{N_{\mathrm{h}}^{\mathrm{th}}\left( 1-\mathrm{e} ^{-\Gamma _{\mathrm{h}}\tau }\right) +N_{\mathrm{c}}^{\mathrm{th}}\left( 1-\mathrm{e} ^{-\Gamma _{\mathrm{c}}\tau }\right) \mathrm{e} ^{-\Gamma _{\mathrm{h}}\tau }}{1-\mathrm{e} ^{-(\Gamma _{\mathrm{h}}+\Gamma _{\mathrm{c}})\tau }}, \end{aligned}$$
(3)
$$\begin{aligned} n_{\mathrm{c}}=\frac{N_{\mathrm{c}}^{\mathrm{th}}\left( 1-\mathrm{e} ^{-\Gamma _{\mathrm{c}}\tau }\right) +N_{\mathrm{h}}^{\mathrm{th}}\left( 1-\mathrm{e} ^{-\Gamma _{\mathrm{h}}\tau }\right) \mathrm{e} ^{-\Gamma _{\mathrm{c}}\tau }}{1-\mathrm{e} ^{-(\Gamma _{\mathrm{h}}+\Gamma _{\mathrm{c}})\tau }}. \end{aligned}$$
(4)

Note that we have used an equal interaction time \(\tau\) for the reservoirs, without loss of generality since the only the product \(\Gamma _{\mathrm{h/c}}\tau\) affects the end result, and hence different interaction times may be compensated by the dissipation rates.

In this paper, we follow the traditional division of work and heat in quantum systems. Work is considered to be the energy related to changing the frequency of the optical mode operating here as the working fluid and heat is considered to be the energy related to changing the population of the fluid. We assume that all the net energy released in a cycle from the reservoirs is transferred to the mechanical mode and that the photon number of the optical mode only changes during the interactions with the reservoirs. In this case, we may compute the average energy output per cycle and the average output power as

$$\begin{aligned} E_{\mathrm{cyc} }&=\hbar (\Delta \bar{\omega }_{\mathrm{a} } n_{\mathrm{h} }-\Delta \bar{\omega }_{\mathrm{a} } n_\mathrm{c} )=\hbar \Delta \bar{\omega }_{\mathrm{a} }\Delta n, \end{aligned}$$
(5)
$$\begin{aligned} P&=\frac{\omega _\mathrm{b} }{2\pi }E_{\mathrm{cyc} }, \end{aligned}$$
(6)

where \(\Delta \bar{\omega }_{\mathrm{a}}=\bar{\omega }_\mathrm{a} ^{\mathrm{h}}-\bar{\omega }_\mathrm{a} ^\mathrm{c}\) and \(\Delta n\) is the difference of the mean photon number in the optical mode during a cycle. In the limit of ideal adiabatic operation, the efficiency of this device is defined in the usual way, which we find to coincide with the Otto efficiency25 given by the effective frequencies as \(\eta _\mathrm{eff}=\Delta W/\Delta Q_\mathrm{h} =E_\mathrm{cyc}/(\hbar \bar{\omega }_\mathrm{a} ^\mathrm{h} \Delta n)=1-\bar{\omega }_\mathrm{a}^\mathrm{c}/\bar{\omega }_\mathrm{a} ^\mathrm{h}\). This efficiency is smaller than the often-used efficiency given by the peak-to-peak compression ratio \(\kappa =(\omega _\mathrm{a} ^0+\Delta \omega _\mathrm{a}/2)/(\omega _\mathrm{a} ^0-\Delta \omega _\mathrm{a}/2)\): \(\eta _\mathrm{eff}\le \eta _\mathrm{max}=1-\kappa ^{-1}\).

Figure 3
figure 3

Derivative parameters and efficiency of quantum heat engine according to the analytical model. (a) Difference of average frequencies over the interaction periods of the hot and cold reservoirs, \(\Delta \bar{\omega }_\mathrm{a} =\bar{\omega }_\mathrm{a} ^{\mathrm{h}}-\bar{\omega }_\mathrm{a} ^\mathrm{c}\), as a function of the peak-to-peak modulation amplitude \(\Delta \omega _\mathrm{a}\) of the optical-mode frequency \(\omega _\mathrm{a} (t)=\omega _\mathrm{a} ^0+\Delta \omega _\mathrm{a} /2\sin (\omega _\mathrm{b} t)\). (b,c) Difference of the mean photon number of the optical mode over the cycle as a function of (b) \(\Delta \omega _\mathrm{a}\) and (c) the mechanical mode frequency \(\omega _\mathrm{b}\). (d) Efficiency of the device \(\eta _\mathrm{eff}=1-\bar{\omega }_\mathrm{a} ^\mathrm{c} /\bar{\omega }_\mathrm{a} ^\mathrm{h}\) as a function of \(\Delta \omega _\mathrm{a}\). The dashed vertical lines in (a,b,d) indicate the threshold where the amplitude is just high enough for the optical-mode frequency to enter the non-vanishing regions of the step-function-like power spectra of the reservoirs (left, dark red) and the threshold where the frequency leaves at its extrema the non-vanishing spectra. The parameters used here are the following: \(\Delta \omega _\mathrm{a} = 0.139\times \omega _\mathrm{a} ^0\), \(\omega _\mathrm{b} =0.05\times \omega _\mathrm{a} ^0\), \(k_\mathrm{B}T_\mathrm{h} =0.56\times \hbar \omega _\mathrm{a} ^0\), \(k_\mathrm{B}T_\mathrm{c} =0.11\times \hbar \omega _\mathrm{a} ^0\), \(\omega _\mathrm{h} =1.03\times \omega _\mathrm{a} ^0\), \(\omega _\mathrm{c} = 0.97\times \omega _\mathrm{a} ^0\), \(\Gamma _\mathrm{h} =\Gamma _\mathrm{c} =0.022\times \omega _\mathrm{a} ^0\), and \(l_\mathrm{h}=l_\mathrm{c}=0.04\times \omega _\mathrm{a}\).

This model already has a considerable number of adjustable parameters. We aim to illuminate the meaning and implications of the most important parameters here. In Fig. 3, we show some derivative parameters of interest as a function of more fundamental, system parameters. In Fig. 4 we study the power in Eq. (6) and various limits as a function of the most interesting parameters. These graphs illustrate the dynamics and parameter ranges of the device quite well. Note that in realized optomechanical systems, the frequency of the mechanical mode is typically much lower than what is used here, but such a case will merely lead to closely adiabatic dynamics with respect to the thermalization and is theoretically easier and less interesting to analyze than the case studied here.

First, we observe from Fig. 4a that the output power increases up to a limit with increasing \(\omega _\mathrm{b}\). This limit is a result of the fact that there is a trade-off between increasing speed of extracting \(E_{\mathrm{cyc}}\) and decreasing the interaction time \(\tau\) resulting in lower \(\Delta n\) and hence lower \(E_{\mathrm{cyc}}\) as shown in Fig. 3c. One of the most important fundamental parameters here is how much we vary \(\omega _\mathrm{a} (t)\) over the cycle. We define \(\Delta \omega _\mathrm{a}\) as the peak-to-peak modulation amplitude of \(\omega _\mathrm{a} (t)\), i.e., \(\omega _\mathrm{a} (t)\) will oscillate between \(\omega _\mathrm{a} ^0-\Delta \omega _\mathrm{a} /2\) and \(\omega _\mathrm{a} ^0+\Delta \omega _\mathrm{a} /2\). In Fig. 4b, we show the output power as a function of \(\Delta \omega _\mathrm{a}\). We clearly observe the limits of too low and too high modulation amplitudes, i.e., not reaching the reservoir at all or overshooting. This phenomenon is also observed in Fig. 3a, b. In Fig. 4c we see compatible behaviour as a function of the difference between the reservoir frequencies. Finally, in panel d of Fig. 3 we plot the efficiency of the heat engine. We note that utilizing the whole width of the step function reservoir in frequency gives the best efficiency, as expected. Increasing the peak-to-peak modulation amplitude and the energy gap between the reservoirs would increase the compression ratio, therefore allowing the increasing of the efficiency closer to the Carnot efficiency \(\eta _\mathrm{C}=1-T_\mathrm{c} /T_\mathrm{h} \approx 80\%\).

Figure 4
figure 4

Output power of the quantum heat engine according to the analytical model. (ad) Output power as a function of (a) the mechanical mode angular frequency \(\omega _\mathrm{b}\), (b) the peak-to-peak modulation amplitude of the optical-mode angular frequency \(\Delta \omega _\mathrm{a}\), (c) the difference between centre angular frequencies of the power spectra of the heat reservoirs \(\omega _\mathrm{h} -\omega _\mathrm{c}\), and (d) the temperature of the hot reservoir \(T_\mathrm{h}\). The dashed vertical lines indicate the cases of zero distance (left, dark red), ideal distance (centre, turquoise), and too large distance (right, yellow) of the reservoir spectra with respect to the modulation amplitude \(\Delta \omega _\mathrm{a}\). We use identical parameters values to those in Fig. 3.

To finalize our examination of the analytical model, we estimate the dissipation rate and the resulting quality factor of the mechanical mode required for steady-state operation of the QHE. Note that in practice, this effective dissipation of the mechanical mode is a result of using the power flowing into the mechanical mode in a desired use case.

We assumed above that all the net thermal energy extracted over a cycle is transferred to the coherent motion of the mechanical mode. Under this assumption, which we justify below with a numerical model, we can match the power calculated above and the dissipated power from the mechanical mode in order to estimate the required quality factor of the mechanical mode. The average dissipated power of the mechanical mode can be expressed as \(P_\mathrm{b} =\Gamma _\mathrm{b} \hbar n_\mathrm{b} \omega _\mathrm{b}\), where \(\Gamma _\mathrm{b}\) is the dissipation rate and \(n_\mathrm{b}\) the mean phonon number of the mechanical mode. Assuming that the mechanical mode modulates the optical mode frequency by \(\Delta \omega _\mathrm{a} \approx 2\sqrt{n_\mathrm{b} } g_0\), where \(g_0\) is the optomechanical coupling constant26 discussed below, one can solve for the unknown parameter \(n_\mathrm{b}\). By setting the dissipated power equal to the power obtained in Eq. (6) and using Eq. (5), we obtain \(\Gamma _\mathrm{b} =2\Delta \bar{\omega }_\mathrm{a} \Delta n g_0^2/(\pi \Delta \omega _\mathrm{a} ^2)\). We read the optimal values for \(\Delta \omega _\mathrm{a}\), \(\Delta \bar{\omega }_\mathrm{a}\), and \(\Delta n\) from Fig. 4 and set the optomechanical coupling to a reasonable value, \(g_0=0.01\times \omega _\mathrm{a} ^0\), to retrieve a numerical value of \(\Gamma _\mathrm{b} \approx 2.6\times 10^{-5}\times \omega _\mathrm{a} ^0\), which translates to a quality factor of about \(Q_\mathrm{b} =\omega _\mathrm{b} /(2\Gamma _\mathrm{b} )=960\) for the mechanical mode. Note this estimation does not depend on how the excitations are removed from the mechanical mode. We merely state that one can extract energy at this rate from the the mechanical mode. The extracted energy is interpreted as the work output of our heat engine. Note that, even though in reality there is also incoherent thermal occupation in the mechanical mode, we have not considered it here, nor does the analytical model capture the possibility. This will be discussed more in “Dynamics and performance of the quantum heat engine‘’.

The analytical model presented here provides us intuition about the physics of the device and reasonable estimates on the output power and other parameters. It, however, assumes step-like power spectral densities of the baths and that the net thermal energy extracted from the reservoirs is fully transferred into the coherent motion of the mechanical mode. The analytical model does not allow us to investigate the dynamics of the whole system from arbitrary initial conditions. Of course, we also made a number of other rather crude approximations in order to simplify the calculations to the bare minimum. Below, we develop a more detailed theoretical description of the device allowing the investigation of the temporal evolution given arbitrary initial states, describing the optomechanical coupling more carefully and taking into account experimentally feasible spectral shapes of the reservoirs.

Heisenberg–Langevin equations for the quantum heat engine

Derivation of the equations of motion

As discussed above, we consider a system realizing an optomechanical Hamiltonian \(\hat{H}_\mathrm{opt}\)26,27 of an optical mode with bare angular frequency \(\omega _\mathrm{a} ^0\) and a mechanical mode with angular frequency \(\omega _\mathrm{b}\). The optical mode is coupled to two non-Markovian heat reservoirs33 with peaked spectral line shapes at different central frequencies. The total Hamiltonian of the optomechanical system and its reservoirs is written as

$$\begin{aligned} \hat{H}=\hat{H}_\mathrm{opt} +\hat{H}_{\mathrm{h}}+\hat{H}_\mathrm{c} +\hat{H}_\mathrm{int} ^\mathrm{h} +\hat{H}_\mathrm{int} ^\mathrm{c} , \end{aligned}$$

where

$$\begin{aligned} \hat{H}_\mathrm{opt}&=\hbar \Big [\omega _\mathrm{a} ^0\hat{a}^{\dagger }\hat{a}+\omega _\mathrm{b} \hat{b}^{\dagger }\hat{b}-g_0\hat{a}^{\dagger }\hat{a}\left( \hat{b}^{\dagger }+\hat{b}\right) \Big ], \end{aligned}$$
(7a)
$$\begin{aligned} \hat{H}_{\mathrm{h}}&=\hbar \sum _k\omega _{\mathrm{h} ,k}\hat{h}_k^{\dagger }\hat{h}_k, \end{aligned}$$
(7b)
$$\begin{aligned} \hat{H}_{\mathrm{c}}&=\hbar \sum _k\omega _{\mathrm{c} ,k}\hat{c}_k^{\dagger }\hat{c}_k, \end{aligned}$$
(7c)
$$\begin{aligned} \hat{H}_{\text {int}}^\mathrm{h}&=\hbar \sum _k \lambda _{\mathrm{h} ,k}\left( \hat{a}^{\dagger }+\hat{a}\right) \left( \hat{h}_k^{\dagger }+\hat{h}_k\right) , \end{aligned}$$
(7d)
$$\begin{aligned} \hat{H}_{\text {int}}^\mathrm{c}&=\hbar \sum _k \lambda _{\mathrm{c} ,k}\left( \hat{a}^{\dagger }+\hat{a}\right) \left( \hat{c}_k^{\dagger }+\hat{c}_k\right) , \end{aligned}$$
(7e)

where \(\hat{a}\) and \(\hat{b}\) are the annihilation operators of the optical and the reservoirs mode, respectively, \(g_0\) is the optomechanical coupling constant26, the operators \(\hat{h}_k\) and \(\hat{c}_k\) are the annihilation operators of the k:th modes at angular frequencies \(\omega _{\mathrm{h} ,k}\) and \(\omega _{\mathrm{c} ,k}\) in the hot and cold reservoirs, respectively, and the corresponding coupling constants between the reservoir modes and the optical mode are \(\lambda _{\mathrm{h} ,k}\) and \(\lambda _{\mathrm{c} ,k}\), respectively. Thus, \(\hat{H}_{\mathrm{h} }\) and \(\hat{H}_{\mathrm{c}}\) describe the reservoirs as infinite sums of bosonic modes. In addition, \(\hat{H}_{\mathrm{int}}^{\mathrm{h}}\) and \(\hat{H}_{\mathrm{int}}^{\mathrm{c}}\) describe the linear interaction between the reservoir modes and the optical mode.

The Heisenberg equations of motion for the optical and mechanical modes, as well as for the reservoir degrees of freedom are given by

$$\begin{aligned} \dot{\hat{a}}&=-i \omega _\mathrm{a} ^0\hat{a}+i g_{0}\hat{a}(\hat{b}^{\dagger }+\hat{b})-i \sum _k \lambda _{\mathrm{h} , k}\left( \hat{h}_k^{\dagger }+\hat{h}_k\right) -i \sum _k \lambda _{\mathrm{c} , k}\left( \hat{c}_k^{\dagger }+\hat{c}_{k}\right) , \end{aligned}$$
(8a)
$$\begin{aligned} \dot{\hat{b}}&=-i \omega _\mathrm{b} \hat{b}+i g_{0}\hat{a}^{\dagger }\hat{a}, \end{aligned}$$
(8b)
$$\begin{aligned} \dot{\hat{h}}_k&=-i \omega _{\mathrm{h} , k}\hat{h}_{k}-i \lambda _{\mathrm{h} , k}\left( \hat{a}^{\dagger }+\hat{a}\right) , \end{aligned}$$
(8c)
$$\begin{aligned} \dot{\hat{c}}_k&=-i \omega _{\mathrm{c} , k}\hat{c}_{k}-i \lambda _{\mathrm{c} , k}\left( \hat{a}^{\dagger }+\hat{a}\right) . \end{aligned}$$
(8d)

Let us integrate out the reservoir modes from the above set of equations. To this end, we solve Eqs. (8c) and (8d) by explicit integration as

$$\begin{aligned} \hat{h}_k(t)&=\hat{h}_k(0)e ^{-i \omega _{\mathrm{h} , k}t}-i \lambda _{\mathrm{h} , k}\int _0^{t} \mathrm{e} ^{-i \omega _{\mathrm{h} , k}(t-\tau )}\left[ \hat{a}^{\dagger }(\tau )+\hat{a}(\tau )\right] \mathrm{d} \tau , \end{aligned}$$
(9a)
$$\begin{aligned} \hat{c}_k(t)&=\hat{c}_k(0)e ^{-i \omega _{\mathrm{c} , k}t}-i \lambda _{\mathrm{c} , k}\int _0^{t} \mathrm{e} ^{-i \omega _{\mathrm{c} , k}(t-\tau )}\left[ \hat{a}^{\dagger }(\tau )+\hat{a}(\tau )\right] \mathrm{d} \tau , \end{aligned}$$
(9b)

and substitute the solutions into equation (8a). Consequently, we arrive at the Heisenberg–Langevin equation (HLE),

$$\begin{aligned} \dot{\hat{a}}&=-i \omega _\mathrm{a} ^0 \hat{a}+i g_{0}\hat{a}(\hat{b}^{\dagger }+\hat{b})-\hat{\xi }_\mathrm{h} (t)-\hat{\xi }_\mathrm{c} (t)\nonumber \\&\ \ \ \ +\int _0^{t} \left\{ \mathcal {K}_\mathrm{h} (t-\tau )+\mathcal {K}_\mathrm{c} (t-\tau )\right\} \left[ \hat{a}^{\dagger }(\tau )+\hat{a}(\tau )\right] \mathrm{d} \tau , \end{aligned}$$
(10)

where we define the memory kernels

$$\begin{aligned} \mathcal {K}_{\mathrm{h/c}}(t-\tau )=2i \sum _k\lambda _{\mathrm{h/c} ,k}^2\sin [\omega _{\mathrm{h/c} ,k}(t-\tau )]=2i \int _0^{\infty } \mathscr {J}_{\mathrm{h/c}}(\omega )\sin [\omega (t-\tau )]\mathrm{d} \omega , \end{aligned}$$
(11)

with \(\mathscr {J}_{\mathrm{h}}(\omega )\) and \(\mathscr {J}_{\mathrm{c}}(\omega )\) being the spectral functions of the hot and cold reservoir, respectively, and the noise operators are given by

$$\begin{aligned} \hat{\xi }_{\mathrm{h} }(t)&=i \sum _k \lambda _{\mathrm{h} ,k}\left[ \hat{h}_k(0)\mathrm{e} ^{-i\omega _{\mathrm{h} ,k}t}+\hat{h}_k^{\dagger }(0)\mathrm{e} ^{i\omega _{\mathrm{h} ,k}t}\right] , \end{aligned}$$
(12a)
$$\begin{aligned} \hat{\xi }_{\mathrm{c}}(t)&=i \sum _k \lambda _{\mathrm{c} ,k}\left[ \hat{c}_k(0)\mathrm{e} ^{-i\omega _{\mathrm{c} ,k}t}+\hat{c}_k^{\dagger }(0)\mathrm{e} ^{i\omega _{\mathrm{c} ,k}t}\right] . \end{aligned}$$
(12b)

At this point, the Markovian approximation33,34,35 is typically invoked such that the noise is replaced by white noise, characterized by \(\left\langle {\hat{\xi }_{\mathrm{h/c} }^{\dagger }(t)\hat{\xi }_{\mathrm{h/c} }(t')}\right\rangle =\delta (t-t')\), where the average is taken over the reservoir degrees of freedom, and consequently the integrals in the above equations are reduced to linear dissipation26,27,36. However, as described above, the spectral density of the environment is here not frequency-independent, but rather, has a peaked line shape. Therefore, we consider the full non-Markovian model37. The noise operators defined by Eq. (12) have non-local temporal correlation relations, and together with the memory kernels, they characterize the non-Markovian features of the reservoirs and of the resulting dynamics of the system.

The coupled Eqs. (8b) and (10) determine the dynamics of the optical and mechanical modes driven by the noise terms with damping arising from the memory kernel integrals. Unfortunately, these equations are challenging to solve exactly, even numerically, since they are non-linear operator equations of high dimension26. However, we can proceed by decomposing the operators into classical and quantum components, \(\hat{a}=\alpha +\delta \hat{a}\) and \(\hat{b}=\beta +\delta \hat{b}\), and linearize in terms of the quantum components26,38. Namely, we assume the quantum components to provide a small correction to the classical dynamics. Consequently, we obtain

$$\begin{aligned} \dot{\alpha }&=-i\omega _\mathrm{a} ^0\alpha +ig_{0}\alpha (\beta ^*+\beta )-\xi _\mathrm{h} (t)-\xi _\mathrm{c} (t)\nonumber \\&\ \ \ \ +\int _0^{t} \left\{ \mathscr {K}_\mathrm{h} (t-\tau )+\mathcal {K}_\mathrm{c} (t-\tau )\right\} \left[ \alpha ^*(\tau )+\alpha (\tau )\right] \mathrm{d} \tau , \end{aligned}$$
(13a)
$$\begin{aligned} \dot{\beta }&=-i\omega _\mathrm{b} \beta +ig_{0}\left| {\alpha }\right| ^2, \end{aligned}$$
(13b)
$$\begin{aligned} \delta \dot{\hat{a}}&=-i\omega _\mathrm{a} '\delta \hat{a}+iG(\delta \hat{b}^{\dagger }+\delta \hat{b})+\int _0^{t} \left\{ \mathscr {K}_\mathrm{h} (t-\tau )+\mathscr {K}_\mathrm{c} (t-\tau )\right\} \left[ \delta \hat{a}^{\dagger }(\tau )+\delta \hat{a}(\tau )\right] \mathrm{d} \tau , \end{aligned}$$
(13c)
$$\begin{aligned} \delta \dot{\hat{b}}&=-i\omega _\mathrm{b} \delta \hat{b}+i\left( G\delta \hat{a}^{\dagger }+G^*\delta \hat{a}\right) , \end{aligned}$$
(13d)

where \(G=g_{0}\alpha (t)\), we have transformed the noise operators \(\hat{\xi }_{\mathrm{h/c}}\) into stochastic complex-valued variables \({\xi }_{\mathrm{h/c}}\), and \(\omega _\mathrm{a} '=\omega _\mathrm{a} ^0-g_0\left[ \beta (t)+\beta ^*(t)\right]\). These equations are exact up to the linearization and describe the dynamics of the system under the influence of the reservoirs. The quasiclassical equations (13a) and (13b) retain the inherent non-linearity of the system, whereas the quantum equations (13c) and (13d) yield the quantum corrections. The classical equations can be understood as a mean-field-like approximation to the full quantum equations (10) and (8b). Thus, they may provide a reasonable approximate solution in many physical situations. For instance, in reference21, where a QHE based on optomechanical system pumped by periodic incoherent drive is studied, the difference between quantum and classical models is found to be nighly negligible.

Considerations for numerical solution of the equations

To analyze the system dynamics based on the approximate Heisenberg–Langevin equations derived in previous section, we resort to numerics. In order to relax the requirements of the computational resources, let us investigate a quasiclassical39 model based on Eqs. (13a) and (13b). Further, we are mostly interested in the non-linear dynamics of the system, captured by the classical equation, and have already made the assumption that the classical component of the dynamics is dominating. Using noise arising from thermal quantum fluctuations, the quantum statistics of the reservoirs is taken into consideration and a quasiclassical model for the system dynamics is achieved. Although we neglect the quantum fluctuations of the system itself40, we consider the model to likely be accurate enough especially for average quantities since quasiclassical models similar to this have been shown to produce valuable insight into quantum systems interacting with heat sources39.

Here, we numerically solve the coupled equations 13a and 13b in the time domain. Strictly speaking, stochastic differential equations (SDEs), and more importantly the numerical solution methods, are only defined for Wiener processes, i.e. white noise41,42. Physicist and engineers have however stretched the limits of mathematical definitions, and considered equations with coloured noise obtaining physically meaningful results41,43,44. Therefore, we follow these footsteps and proceed with our analysis assuming that in the sense of small enough time-steps our noise is locally white. We interpret our SDE in the sense of Stratonovich stochastic calculus and apply a second-order predictor-corrector method41,42,45 to solve the above stochastic integro-differential equation46. The coloured noise is generated from the power spectral densities, given below by Eq. 14, by filtering zero-mean Gaussian white noise with a filter, the frequency response function \(\textrm{FRF}_{\mathrm{h/c}}(\omega )\) of which satisfies \(\left| {\textrm{FRF}_{\mathrm{h/c}}(\omega )}\right| ^2=S_{\mathrm{h/c}}(\omega )\). Note also that since we are dealing with a stochastic system, single realizations of the dynamics exhibit random behaviour with little conclusions to be drawn. Thus, we simulate the system with a large number of repetitions and compute ensemble averages of the quantities of interest.

Let us specify the reservoir spectra and the temperature dependence of the heat reservoirs. First, we consider the following power spectral density of the thermal fluctuations47,48 in the reservoir:

$$\begin{aligned} S_\mathrm {h/c}(\omega )=\mathscr {F}\left[ \left\langle {\hat{\xi }_\mathrm {h/c}^{\dagger }(t)\hat{\xi }_\mathrm {h/c}(t')}\right\rangle \right] (\omega )=\mathscr {J}_\mathrm {h/c}(\omega )\coth \left(\frac{\hbar \omega }{2k_\mathrm{B} T_\mathrm {h/c}}\right), \end{aligned}$$
(14)

where \(\mathscr {F}\left[ f(t)\right] (\omega )\) denotes the Fourier transform of function f(t) and

$$\begin{aligned} \mathscr {J}_\mathrm {h/c}(\omega )=g_\mathrm {h/c}\frac{\hbar \omega ^3}{\omega ^2+\gamma _\mathrm {h/c}^{-2}(\omega ^2-\omega _\mathrm {h/c}^2)^2}, \end{aligned}$$
(15)

where \(g_\mathrm {h/c}\) is a dimensionless constant scaling the coupling strength between the optical mode and the corresponding reservoir, \(\gamma _\mathrm {h/c}\) equals the full width of the spectrum at half maximum, \(\omega _\mathrm {h/c}\) is the renormalized centre frequency, and \(T_\mathrm {h/c}\) is the temperature of the reservoir as defined above. The hyperbolic cotangent term in the above expression arises by directly calculating the variance of noise operators following the usual analysis of generalized bosonic heat reservoirs47,49,50. The line shape given by \(\mathscr {J}_\mathrm {h/c}(\omega )\) is chosen merely to consider spectra which are peaked in a reasonable way without an attempt to optimize them for output power.

Let us make a minor remark about the parameters. We introduce two new parameter here, namely \(g_{\mathrm{h/c}}\) and \(\gamma _{\mathrm{h/c}}\). Unfortunately, these are not directly quantitatively comparable to their counterparts in the analytical model. Where \(\Gamma _{\mathrm{h/c}}\) in the analytical model is the relaxation time constant of the optical mode coupled to the reservoir, \(g_{\mathrm{h/c}}\) describes the coupling strength with the reservoir. These are closely related, but not the identical, and can vary from physical realization to another. The full width at half maximum of the spectrum in Eq. (15) is given by \(\gamma _{\mathrm{h/c}}\). This can be compared to the width of the step function spectrum, \(l_{\mathrm{h/c}}\), more or less directly, keeping in mind that the spectrum here is smooth with polynomially decreasing tails, in stark contrast with the step function (see Fig. 2 for comparison).

Dynamics and performance of the quantum heat engine

Temporal evolution and output power

In Fig. 5, we show the temporal evolution of the amplitudes \(\alpha\) and \(\beta\) and excitation numbers \(n_\mathrm{a} =\langle |\alpha |^2\rangle\) and \(n_\mathrm{b} =\langle |\beta |^2\rangle\) of the optical and the mechanical mode, respectively, assuming negligible dissipation on the mechanical mode. Here, the average is an ensemble average with respect to many independent realizations of the noise trajectories \(\xi _\mathrm{h} (t)\) and \(\xi _\mathrm{c} (t)\). This theoretical scenario allows us to gain insight into the operation principle of the quantum heat engine. The parameters are chosen to roughly optimize the power generation in the mechanical mode with a constant temperature difference between the reservoirs. Full systematic optimization of the parameters, being somewhat computationally intensive, is left for future work.

Figure 5
figure 5

Temporal evolution of the quantum heat engine according to the quasiclassical Heisenberg–Langevin equations (13a) and (13b). (a) Mean occupation number of the mechanical mode as a function of time. The dashed line shows a linear fit to the data in order to find out the average rate of occupation generation. (b) Single realization of the real and imaginary parts of the complex-valued amplitude of the mechanical mode as functions of time. (c) Mean occupation number of the optical mode as a function of time. We show the thermal photon numbers for the optical mode, \(N_\mathrm{h} ^{\textrm{th}}\) (red dashed line) and \(N_\mathrm{c} ^{\textrm{th}}\) (blue dashed line), given by the Bose–Einstein distribution at the reservoir temperatures. The red and blue crosses indicate the maxima and minima of the optical-mode occupation in each cycle after the transient. (d) Single realization of the complex-valued amplitude of the optical mode. The parameters used are \(\omega _\mathrm{b} =0.048\times \omega _\mathrm{a} ^0\), \(\omega _{\mathrm{h}}=1.04\times \omega _\mathrm{a} ^0\), \(\omega _\mathrm{c} =0.964\times \omega _\mathrm{a} ^0\), \(k_\mathrm{B}T_\mathrm{h} =0.56\times \hbar \omega _\mathrm{a} ^0\), \(k_\mathrm{B}T_\mathrm{c} =0.11\times \hbar \omega _\mathrm{a} ^0\), \(g_0=0.012\times \omega _\mathrm{a} ^0\), \(g_\mathrm{h} \approx 0.007\), \(g_\mathrm{c} \approx 0.0082\), \(\gamma _\mathrm{h} \approx 0.031\times \omega _a ^0\), \(\gamma _\mathrm{c} \approx 0.025\times \omega _\mathrm{a} ^0\). At time instant \(t=0\), the modes are initialized into coherent states corresponding to \(n_\mathrm{a} =0.5\) and \(n_\mathrm{b} =39\). The mean values are found by averaging over 1000 realizations of the noise.

Initially, the modes are set to coherent states with mean excitation numbers of \(n_\mathrm{a} =0.5\) and \(n_\mathrm{b} =39\), correspondingly. Firstly and most importantly, we observe from Fig. 5b that the initially prepared coherent state tends to be preserved in the evolution and even increasing its amplitude rather than winding towards a thermal state. The increasing amplitude of the oscillation is in agreement with Fig. 5a where the average excitation number of the mechanical mode steadily increases in time. These key observations justify the assumption we introduced for the analytical model that the net thermal energy extracted from the heat baths tends to convert into the coherent motion of the mechanical mode.

From the results of Fig. 5c, we observe for the optical mode that instead of thermalizing to a steady state with a constant average photon number between the thermal occupation numbers \(N_\mathrm{h} ^{\textrm{th}}\) and \(N_\mathrm{c} ^{\textrm{th}}\) given by the Bose–Einstein distribution at the reservoir temperatures, the average photon number of the optical mode exhibits clear temporal oscillations. These oscillations take place between the boundaries set by the thermal photon numbers with a period given by the frequency of the mechanical mode \(\omega _\mathrm{b}\). This behaviour arises from driving the frequency of the optical mode by the mechanical mode between the peaked spectra of the hot and cold reservoirs that inject and absorb optical photons, respectively. In stark contrast to the traditional externally driven quantum heat engines however, driving is here purely caused by the internal dynamics of the device. In a qualitative agreement with our analytical model and Fig. 1, the average excitation number of the mechanical mode exhibits oscillations phase shifted by \(\pi /2\) from those of the optical mode, i.e., when the optical mode has a peak in its average photon number, the mechanical mode is gaining energy at maximum speed from the optical mode.

Since the dissipation of the mechanical mode is neglected and the mechanical mode has a reasonably low amplitude, we do not observe the mechanical mode to stabilize into a steady state. However, we can estimate the upper limit of power, at which the mechanical mode accumulates energy. In Fig. 5a, we employ a linear fit on the average excitation number of the mechanical and find that based on the slope of the fitted line, this device yields an average power of \(P=8.63\times 10^{-5}\hbar (\omega _\mathrm{a} ^0)^2\), which is clearly higher than the power achieved according to the analytical model in “Analytical model of the quantum heat engine”. This is partially attributed to the slightly different parameter values and approximations used in the two models, but the main reason for observing a higher power output is, however, expected to be the initial thermalization transient experienced by the mechanical mode. From Fig. 5c, d, it is clear that the optical mode reaches a state dominated by thermal noise very quickly, but the saturation of the mechanical mode may take significantly more time due to its remarkably weaker coupling to the thermal sources. Of course, we do not even wish the mechanical mode to reach a thermal state, but to retain its coherence as well as possible.

A reasonable estimate for the average thermal occupation in the mechanical mode after a long time is given by the weighted average \(N_\mathrm{b} ^{\textrm{th}} = (g_\mathrm{h} N_\mathrm{b} ^\mathrm{h} +g_\mathrm{c} N_\mathrm{b} ^\mathrm{c} )/(g_\mathrm{h} +g_\mathrm{c} )\approx 6.1\), where \(N_\mathrm{b} ^{\mathrm{h/c}}\) is the mechanical-mode occupation fully thermalized at the reservoir temperature \(T_{\mathrm{h/c}}\) given by the Bose–Einstein distribution. This further supports the observation that increasing occupation well above \(n_\mathrm{b} =40\) must be at least partially coherent generation, as we would expect from Fig. 5b, d. Therefore, it is reasonable to assume that the increasing occupation is partially due to coherent generation and partially due to thermalization. Let us next study the steady states of the mechanical mode with finite dissipation and after a long evolution in order to shed some light on the matter.

Figure 6
figure 6

Operation of the quantum heat engine with finite extracted power. (a) Temporal evolution of the average excitation number of the mechanical mode under different levels of dissipation, as indicated by the given quality factors. The dashed black lines show the fitted exponential evolution. (b) Output power (left vertical axis) and efficiency (right vertical axis) of the QHE as a function different levels of excess dissipation. The dots are the calculated values based on the simulation results extracted at the different levels of dissipation found in (a). The dots are connected by a solid line based on cubic spline interpolation. Details of the calculation can be found in the main text. The parameters and initial state used in the calculations are identical to those in Fig. 5.

In Fig. 6a, we show the temporal evolution of the average excitation number of the mechanical mode for different levels of excess dissipation, i.e., non-vanishing quality factors. As expected in this case, the excitation number exponentially reaches a steady state where we constantly extract work from the mechanical mode. Note, that the work here is simply dissipated away, but in practice it can be released to a waveguide and measured. From Fig. 6a, we note that the quality factors of the mechanical mode are on a similar level to those found with the analytical model above.

Let us estimate the dissipated power based on the dissipation rate by the method used above in the analytical model. However, in order to separate between work and heat in the mechanical mode, we make the reasonable assumption that after a long time the mechanical mode stabilizes into a thermal coherent state51, and use the fact that the average occupation number of the thermal coherent state is given as a sum of the coherent and thermal occupations. We treat the average occupation number resulting from our simulation, \(n_\mathrm{b}\), as the total occupation number of the thermal coherent state, and use the above-obtained estimate for the thermal contribution \(N_\mathrm{b} ^{\textrm{th}}\). Thus the coherent contribution is given by \(n_\mathrm{b} ^{\textrm{coh}} = n_\mathrm{b} -N_\mathrm{b} ^{\textrm{th}}\), which allows us to interpret the coherent dissipated power as work and compute the corresponding power output as \(P=\Gamma _\mathrm{b} \hbar n_\mathrm{b} ^{\textrm{coh}} \omega _\mathrm{b}\). We show the obtained power in Fig. 6b for different levels of excess dissipation. We point out that for the highest efficiency with the mechanical-mode quality factor \(Q_\mathrm{b} =1125\), the thermal contribution in the mechanical mode occupation is only about \(N_\mathrm{b} ^{\textrm{th}}/n_\mathrm{b} =14\%\) of the total occupation number. Furthermore, the power output obtained here is less than half of the upper-bound estimate obtained above. This observation supports the hypotheses of the thermalization transient.

In addition, we find in Fig. 6b that we can vary the dissipation level quite significantly without much disturbing the power generation. As long as the dissipation is on a reasonable level compared with the power generation rate found above, the systems seems to be able to find a steady state. Bear in mind that this is a dynamic process involving non-linear back and forth coupling between the mechanical and the optical mode as a function of the occupation number \(n_b\). As opposed to the analytical model, this quasiclassical model takes into account the intricate dynamics owing to the optomechanical coupling.

Efficiency

From the above dynamics of our quantum heat engine, it is somewhat challenging to rigorously define and determine certain quantities traditionally studied in quantum heat engines, stemming from the lack of the external driving field. Typically, the work done on the working fluid by the external drive plays an important role in defining these quantities. As already mentioned in “Analytical model of the quantum heat engine”, work is the energy related to changing the Hamiltonian, or frequency, of the working fluid whereas heat is the energy related to changing the populations. The issue arising from the lacking external drive is somewhat more pronounced in the quasiclassical model than in the analytical model since for the quasiclassical model we are truly solving the dynamics of the whole optomechanical system, whereas in the analytical model, we still treat them as separate systems.

Let us, nevertheless, try to estimate the efficiency of our quantum heat engine by using the method we utilized for the analytical model. We consider the optical mode to be the working fluid and assume that the thermal occupation of the mechanical mode does not significantly vary over a cycle once the steady state is reached. We further approximate that the oscillation in the occupation of the optical mode is almost solely due to the interactions with the thermal reservoirs. This is a very good approximation, since the mechanical mode varies the occupation of the optical mode very little over a cycle due to the relatively low optomechanical coupling, \(g_0\ll \omega _\mathrm{a} ^0\), and excitation level of the mechanical mode (see Supplementary Fig. S1). In this scenario, we find the heat absorbed by the device from the hot reservoir per cycle, \(\Delta Q_\mathrm{h}\), by finding the average variation of the photon number in the optical mode over cycle. This can be computed from the maxima and minima of the photon number, \(n_\mathrm{a}\), over many cycles, as depicted by the red and blue crosses in Fig. 5c. The average work per cycle is simply given by the power: \(\Delta W=P\tau _\mathrm{b}\). With this method we estimate the efficiency, \(\eta\), shown in Fig. 6b as a function of excess dissipation levels of the mechanical mode. We note that the efficiency is qualitatively remarkably close to the one achieved in the analytical model, which would suggest that the analytical model captures the essence of the physics relatively well. As one may expect, the efficiency is far below the Carnot efficiency, \(\eta _\mathrm{C}\approx 80\%\), and also significantly below the Otto efficiency given by the compression ratio \(\eta _\mathrm{max}\approx 16\%\).

Finally, we highlight an important detail, i.e., we cannot claim that the heating and cooling processes of the working fluid are perfectly isochoric, nor can we say that the compression and decompression are fully adiabatic. If we take into account the slowly vanishing tails of the reservoir spectra, it becomes evident that there is constant heat exchange between the optical mode and the reservoirs over the cycle. These considerations inevitably lead to the fact that we cannot, strictly speaking, call this cycle an Otto cycle in its ideal form. The cycle of our device displays more continuous dynamics, not perfectly split into well defined phases. Moreover, we point out that the above discussion considers only the internal efficiency of the device. In an experimental realization, there is also direct heat leakage from the hot reservoir to the cold reservoir through spurious parallel channels to the quantum heat engine, decreasing the total efficiency in practice.

Stability and power fluctuations

Figure 7
figure 7

Output power of the quantum heat engine according to the quasiclassical model compared with the analytical model. (ad) Output power of the quasiclassical (cyan color) and the analytical (purple color) model as a function of (a) the mechanical mode angular frequency \(\omega _\mathrm{b}\), (b) the optomechanical coupling \(g_0\), (c) the difference between the centre angular frequencies of the power spectra of the heat reservoirs \(\omega _\mathrm{h} -\omega _\mathrm{c}\), and (d) the temperature of the hot reservoir \(T_\mathrm{h}\). For the quasiclassical model, we use identical parameters values to those in Fig. 6 for \(Q_\mathrm{b} =1250\). The data for the analytical model is identical to those in Fig. 4. The inset in (a) shows the output power in the full range of Fig. 4a. We use cubic spline method to interpolate (dashed cyan color) the numerical data (cyan color dots) of the Heisenberg–Langevin equation model. Note that because of the differences in the models and their parameters, we do not expect the models to accurately quantitatively agree.

In this section, we briefly analyze the ensemble fluctuations of the output power and the stability of the device with respect to some parameters. In Fig. 7, we compare the net output power obtained from the quasiclassical model with the analytical model of “Analytical model of the quantum heat engine”  as a function of a few of the most important parameters. Interestingly, there is a relatively narrow range of optimal mechanical-mode frequencies in the quasiclassical model depicted in Fig. 7a. In the analytical model, we do not restrict the mechanical-mode frequency in any way, and seems that it can be increased indefinitely, whereas in the quasiclassical model we clearly find a sweet spot for the frequency \(\omega _\mathrm{b}\). This discrepancy may be a result of the fixed peak-to-peak modulation amplitude \(\Delta \omega _\mathrm{a}\) assumed in the analytical model, whereas the amplitude in the quasiclassical model is a result of the temporal evolution determined by the other parameters.

In Fig. 7c, we find that the two models behave qualitatively similarly as a function of the difference between the centre angular frequencies of the reservoir power spectra. Note that the curve of the quasiclassical model does not display any sharp cusp as observed for the analytical model, owing to the continuous spectral functions in the quasiclassical model. The behaviour of the output power as a function of the hot-reservoir temperature is found in Fig. 7d qualitatively quite similar to the analytical model, as expected. However, the analytical model predicts a steeper increase in the power as function of increasing hot-reservoir temperature than the HLE model, which is attributed to the accordingly rising mechanical-mode thermal occupation in the HLE model, which does not contribute to the work.

Figure 8
figure 8

Mechanical mode occupation fluctuations of the quantum heat engine (QHE). (a) Hundred realizations of the temporal evolution of the average excitation number of the mechanical mode under dissipation characterized by \(Q_\mathrm{b} =1125\). The black dashed line shows the average exponential behaviour as found in Fig. 6a. (b) Probability distribution of the mechanical mode occupation number after reaching a steady state together with a Poisson distribution for reference. The parameters and initial state used in the calculations are identical to those in Fig. 5.

It is interesting to investigate the relative occupation number fluctuations of the mechanical mode, because it gives insight to the excitation counting statistics one would observe when measuring the mechanical mode. Further, because the output power is directly related on the occupation number, as defined above through dissipated power, the relative output power fluctuations of the QHE52,53 are consequently directly related to the occupation number fluctuations. In Fig. 8a we illustrate the occupation number fluctuations by showing hundred different realization of the temporal evolution of the excitation number of the mechanical mode under excess dissipation characterized by the quality factor \(Q_\mathrm{b} =1125\). In Fig. 8b, we display the probability density for the occupation number after reaching a steady state and compare it to the Poisson distribution. We use the Fano factor54, which quantifies the deviation from a Poisson distribution, as a measure to compare the occupation number distribution to the Poissonian. The Fano factor is defined as \(F=\sigma _P^2/\left\langle {P}\right\rangle\), where \(\sigma _P^2\) and \(\left\langle {P}\right\rangle\) are the variance and the expectation value of the occupation number, respectively. For the data in Fig. 8b, we find \(F=0.27\), which signifies far sub-Poissonian (\(F<1\)) statistics of the occupation number fluctuations. This suggest a smaller output power fluctuations for the QHE than for a Poisson process.

Conclusions and discussion

We have proposed and analyzed an autonomous quantum heat engine in the spirit of an Otto cycle, where one harmonic mode, the working fluid, traverses the cycle driven by another harmonic mode. We utilized an optomechanical Hamiltonian for this realization and consequently referred to the working fluid as the optical mode and the driving mode as the mechanical mode. However, any physical system realizing the optomechanical Hamiltonian in the appropriate parameter range will suffice our heat engine.

The feasible parameter range for the quantum heat engine is straightforward to find thanks to the analytical model we established by assuming that the net thermal energy extracted from the thermal reservoirs is fully converted into the coherent motion of the driving mode. By deriving a dynamical non-Markovian quasiclassical model and utilizing it in demonstrating the operation of the quantum heat engine, we justified the assumption made in the analytical model. We achieved output powers and efficiencies of the heat engine in a very good agreement between the two models. The efficiency obtained was roughly 10% and the output power was found to be a reasonable fraction of the energy quantum of the working fluid times the frequency of the driving mode. Importantly, the output power was found to monotonically increase with the temperature of the hot reservoir providing prospects for possible applications.

Our initial analysis showed that the output power of the quantum heat engine significantly fluctuates from noise realization to another. Although this fluctuation seems suppressed in comparison to Poisson processes, it calls for future studies on the noise spectrum of the coherent-field output of the heat engine, and possible ways to decrease the observed phase noise and power fluctuations.

Thanks to the versatility of the proposal, we consider a future experimental realization of our quantum-heat-engine proposal likely feasible, but requiring prior specific theoretical analysis for each experimental realization. Although we leave such specialized analysis for future work, we note that our example calculations show that the quality factor the the working-fluid mode may be of the order of hundred and that of the driving mode roughly thousand for the optomechanical coupling constant of roughly one percent of the angular frequency of the working fluid. In typical optomechanical systems, for example, such quality factors are straightforward to achieve, but the optomechanical coupling constant may be smaller, which calls for an optimization of the separation of the reservoir spectra26,27,36. In addition to optomechanical systems, it is interesting to consider a realization of the quantum heat engine in superconducting circuits14,16,21,55 which may offer more flexibility in engineering the optomechanical coupling constant27,56,57 and angular frequencies of the two modes57,58. For high-power operation, it may be interesting to consider engineered environments18,59 which have recently been demonstrated to provide fast preparation of thermal states60.

Even with the possible loss of quantum character due to our quasiclassical methods of solution, we deemed retaining the non-linearity and non-Markovianity as the important novelty of our approach, and although investigating the full quantum character of the device is left for future work, the results obtained here remain significant and interesting proof of concept. In the future, it is interesting to study several different possible experimental realizations of the proposed quantum heat engine and their advantages and disadvantages with respect to each other. In addition, the mitigation of the phase and amplitude noise in the coherent output field of the heat engine call for further studies together with possible use cases of this work obtained from the quantum heat engine.