Single-piston quantum engine

A single-piston quantum engine based on a harmonic oscillator acting as the working fluid is proposed. Using the fact that the interaction between the piston and the oscillator depends on the extent of the oscillator wavefunction, one can control this interaction by modifying the oscillator temperature. By retracting the piston when the interaction is weak (hot oscillator) and returning it to the original position when the coupling is strong (cold oscillator), useful work can be performed assuming the interaction is attractive. The cycle of the engine is simulated numerically using two different powering protocols: bath and measurement. Using the collision model for the baths, the engine is shown to reach a steady state with positive work output.


I. INTRODUCTION
The purpose of an engine is to convert energy into work while operating cyclically.Although essentially all commonplace implementations are rooted in classical physics for their operation, there is a growing interest in quantum engines.[1,2] Unlike their classical analogs, where the working fluid is typically a liquid or a gas, quantum engines employ quantum components.Some examples of these quantum "working fluids" are two-level systems [3][4][5][6], single [7][8][9][10][11][12][13][14] or multiple [15,16] harmonic oscillators, or photons [17].Another feature that sets quantum and classical varieties apart is how they are powered.In particular, classical implementations rely on hot reservoirs as energy sources and require cold baths to expel waste heat.Quantum versions, on the other hand, can also obtain the required energy from measurements, [18][19][20][21][22][23][24][25][26][27] which act as an effective hot bath.
When discussing quantum engines, it is generally assumed that there is a way to transfer the work released during the power stroke of the cycle to some "piston" without explicitly focusing on this engine component.This paper proposes an implementation of a quantum engine in which the piston plays an integral role.A recent study [28] demonstrated that it is possible to modify the coupling strength between quantum engine components by controlling their energies.In particular, heating two interacting harmonic oscillators increases the extent of their probability distributions, leading to a greater separation and weakening their interaction.This temperature-dependent interaction strength is at the heart of the proposed cycle.
A cycle employing this energy-controlled coupling is shown in Fig. 1.The system consists of a harmonic oscillator, acting as the working fluid, and a moving piston.The two components are coupled via an attractive interaction.The cycle starts with the oscillator in a lowenergy state and the piston positioned close to the oscillator's equilibrium point.As the first step, the oscillator's energy is increased by adding heat to it.This heating reduces the interaction strength between the oscillator and the piston due to an increased extent of the oscillator wavefunction, allowing the piston to be retracted from the oscillator in the second step of the cycle with a reduced energy cost.With the piston retracted, the oscillator is cooled down using a cold bath.Finally, the piston is returned to its initial position.Due to the enhanced interaction because of the narrower oscillator wavefunction in the final step, more work is released during this phase than was required to retract it, resulting in a net-positive work output.As mentioned above, the heat required for quantum engine operation can originate either from heat baths or measurements.Therefore, after introducing the general model for the engine in Sec.II, two prototypical approaches using a hot bath and measurements are demonstrated in Sec.III.Summary and conclusions of the main results and the outlook for future research are found in Sec.IV.
All computations are performed using julia.
[29] The plots are made using Makie.jlpackage [30] using the color scheme designed for colorblind readers.[31] The scripts used for computing and plotting can be found at https://github.com/rodin-physics/quantum-oscillator-engine.

II. MODEL
As shown in Fig. 1, the engine consists of a harmonic oscillator, acting as the working fluid, coupled to an externally controlled piston.When the working fluid is decoupled from the environment, the corresponding timedependent Hamiltonian, expressed in terms of the oscillator energy ℏΩ, is given by Here, the first term describes an independent oscillator using the second-quantization operators and Φ is the interaction between the two engine components, where x is the oscillator's position operator and y(τ ) is the piston coordinate.In addition to using ℏΩ as the energy scale, it is convenient to express lengths in terms of the quantum oscillator length and time in terms of the oscillator periods so that t = 2πτ /Ω.
For this study, the interaction is set to There are two reasons for choosing this form of Φ.First, the amplitude and the extent of the Gaussian are easily tunable, making this type of interaction very convenient for illustrating the relevant behavior.Second, y and x are separable, simplifying the computational procedure.With this choice, the matrix elements of Ĥ(τ ) in the Fock space become The form of Eq. (3) indicates that the interaction matrix must be computed only once for a particular choice of σ and scaled based on y(τ ) as the piston moves.Although ⟨j|e − x2 2σ 2 |k⟩ can be calculated analytically for the quantum oscillator wavefunctions, producing Gaussian hypergeometric functions, the integrals in the simulations are taken using Gaussian quadratures to avoid potential issues associated with the numerical implementation of these special functions.For simplicity, the piston is assumed to move at a constant speed so that y(τ ) = y init + τ (y final − y init )/τ p for 0 ≤ τ ≤ τ p , where τ p is the duration of the retraction and advancing phases.
With the interaction form chosen, it is now possible to demonstrate the key component of the engine operation: the temperature-dependent coupling between the working fluid and the piston.For this illustration, the oscillator is assumed to be in a thermal state, described by the density operator ρ = e − Ĥ/ω T /tr e − Ĥ/ω T , where ω T = k B T /ℏΩ is the thermal frequency corresponding to temperature T and k B is the Boltzmann constant.The interaction energy is then given by tr Φρ with Φ matrix elements given by the second term of Eq. ( 3).Setting Φ 0 = −5, the value that will be used in subsequent simulations, the energy is calculated as a function of ω T and y for several values of σ with the results given in Fig. 2.
As expected, the system's energy is the lowest for a wide interaction term (large σ) when the piston is close to the oscillator and the temperature is low.Increasing either ω T or y reduces the magnitude of the interaction.
Figure 2 provides a convenient way of thinking about the cycle described by the schematic in Fig. 1.Let the state of the system be given by a point in the ω T -y/σ plane, indicating that the working fluid is in a thermal state.Following Fig. 1, one starts at a small y and ω T and, by adding the heat to the system and assuming that the oscillator state remains in a thermal state, moves the point vertically.Next, with ω T fixed, the piston is retracted and the point moves horizontally to the right.As the heat is removed from the system, the point moves down.Finally, the piston is advanced and the point returns to its starting position.An example of such a path is given in Fig. 2(a).If the piston is moved adiabatically, the state of the oscillator does not change and only the interaction energy is altered so that the amount of energy added to or removed from the system during these phases is proportional to the number of equicontours crossed by the path.Therefore, as long as more equicontours are crossed by the left-moving segment than the right-moving one, the engine outputs work.
It is useful to provide an estimate for the efficiency associated with this engine, given by η = (W out − W in )/Q added , where Q added corresponds to the heat added to the system during the first phase and W is the work extracted from or added to the system during the second and the fourth phases.Let ρ H/L correspond to the oscillator's density operator in its high/low energy state, Φ close and Φ far give the interaction when the piston is close to/far from the oscillator, and H 0 be the first term in Eq. (1).Assuming that the piston motion is adiabatic so that ρ H/L remains fixed, η becomes where the approximation in the final line holds when Φ far → 0. Equation ( 4) indicates that, for a particular oscillator (fixed H 0 ), the efficiency is maximized by increasing tr [(ρ H − ρ L ) Φ close ].Using the diagram in Fig. 2(a), this requirement means that one should maximize the number of equicontour lines that the upwards-moving segment crosses.Thus, from Fig. 2, for the parameters chosen, σ = 2 is too wide as most of the energy delivered to the system comes from piston retraction rather than from heating.On the other hand, σ = 1/4 is inferior to σ = 1/2, where the equicontours are denser.This nonmonotonic dependence of η on σ suggestes that one can improve the efficiency by exploring different interaction profiles not limited to a Gaussian form.
To estimate η, the piston movement was taken to be adiabatic.If it is not, the energy is added to the oscillator in a thermal state during the piston movement and has to be either removed as waste heat (after the piston retraction) or results in a reduced work output (during the piston advance).Of course, for the engine to deliver a finite power, the individual phases have to take a finite amount of time.Therefore, it is useful to explore how slow is "slow enough" when it comes to the piston motion using the following procedure.
Starting with the Hamiltionians corresponding to retracted (y = 10σ) and advanced (y = 0) piston, denoted by ĤR and ĤA , respectively, one determines their ground states |R⟩ and |A⟩.If the piston were retracted (advanced) adiabatically, the energy of the system would end up as ⟨R| ĤR |R⟩ (⟨A| ĤA |A⟩) because the system would remain in its ground state.Conversely, for an instantaneous change of piston position, the state would not have time to evolve and the final energy would be ⟨A| ĤR |A⟩ (⟨R| ĤA |R⟩).Hence, the actual final energy is bounded by these two values.
To obtain the system energy for a finite τ p , one uses the fact that the state evolves following the time-dependent Schrödinger equation where the factor of 2π originates from the definition of τ .Solving Eq. ( 5) using the fifth order Runge-Kutta method starting with |Ψ(0)⟩ = |A⟩ and |Ψ(0)⟩ = |R⟩, the final energy can be computed as a function of τ p for a constant-speed piston with the results given in Fig. 3.As expected, the finite-τ p energies lie between the adiabatic and instantaneous results for both retraction and advance of the piston.Figure 3 suggests that τ p ⪆ 5 is sufficiently slow to avoid the non-adiabatic effects associated with the piston movement.

III. ENGINE OPERATION A. Operation protocol
Conceptually, the most straightforward way to heat up or cool down an oscillator mode is to connect it to a thermal bath.For the sake of illustration, this paper models the baths using single oscillator modes described by a density operator corresponding to a thermal state, as was done in Ref. [14].Every time the working fluid is connected to a bath, the latter is reset to the appropriate thermal state.The process of resetting a relevant component to some predetermined configuration can be regarded as having the working fluid interact with a series of identical states, a scheme known as the collision model.[32] Naturally, using a single mode as a bath will not bring the working fluid to a thermal state with the bath temperature.[14] Therefore, the efficiency formula in Eq. ( 4) is not expected to hold.Nevertheless, as will be shown, the correct direction of the energy flow between the working fluid and the baths will be sufficient to demonstrate the engine operation.
To keep the discussion as streamlined as possible, the frequency of the bath oscillators is taken to be identical to that of the working fluid.In addition to eliminating a parameter, setting the oscillator frequencies to the same value facilitates the coupling between the modes.The bath coupling is Gaussian, just as the piston interaction term, given by where ẑ is the position of the bath oscillator.The offsets x 0 and z 0 mean that the equilibrium points of the two oscillators do not coincide in the xz plane and are introduced to allow modes with different parities to couple, which would be forbidden by a symmetric potential e −x 2 /2λ 2 .Setting x 0 = z 0 = λ = 1 and using the separability of the interaction term, one can write down the full interaction matrix Y = Y 0 Y single ⊗ Y single , where Y single elements are given by with elements ⟨j|e −(x−x0) 2 /2λ 2 |k⟩ for all the Fock states in the single-oscillator basis.Just as the matrix elements in Eq. ( 3), these are computed using Guassian quadratures.
For simplicity, the interaction between the bath and the working fluid is assumed to be switched on and off instantaneously so that, when the piston is stationary, the Hamiltonian is time-independent, leading to where ω T is the bath temperature.
To move the piston, instead of working with the oscillator state as was done in Sec.II when studying the role of τ p , it is better to calculate the time evolution operator from which is solved using the fifth order Runge-Kutta method with Û(τ ′ , τ ′ ) = 1.To understand the advantage of Û, it is illustrative to consider a particular implementation, starting with the bath-powered setup.

B. Bath-powered setup
Following Fig. 1, the cycle begins with heat addition.Thus, if the state of the working fluid in the beginning of the nth cycle is given by ρn , the state of the fluid in the beginning of the following cycle is where Û corresponds to the operator describing the piston retraction.Equation ( 9) should be read from the inside outward to follow the cycle.First, the fluid is coupled to the hot bath in thermal state ρh , as shown by the tensor product.After that, the composite system is allowed to evolve in time by applying operators B and B † .
To decouple the working fluid from the bath, a partial trace tr b is performed with respect to the bath.Next, the piston is retracted by sandwiching the fluid state between Û and Û † .Then, the fluid is coupled to a cold bath ρc and the two-oscillator system is evolved using the same operator B as was used for the hot bath, followed by a decoupling.Finally, the piston is advanced, as can be seen from the reversed application of Û † and Û, completing the cycle.Thus, instead of evolving the state every time the piston moves, one needs to compute Û only once making a multi-cycle calculation more efficient.
To demonstrate the engine operation, the four phases of the cycle are assumed to have the same duration τ p .Two different σ's (1/2 and 2) and τ p 's (5 and 10) are used for a total of four configurations.The bath temperatures are set to ω cold T = 1/10 and ω hot T = 5, and the Fock basis for each oscillator contains 51 states.For each configuration, the working fluid is initialized in the thermal state at ω cold T with the piston in the advanced position.It is taken 80 times through the cycle described by Eq. ( 9).At the end of each stroke, the energy of the working fluid is computed by taking the trace of the product of its density operator with â † â + 1  2 +Φ (x, y) for the appropriate value of y.The computed energies for the four realizations are given in Fig. 4(a)-(d).The x-coordinate labels the cycle and, for each cycle, the order of the points is "advanced cold" → "advanced hot" → "retracted hot" → "retracted cold," after which one moves to "advanced cold" of the next cycle.
Figure 4 demonstrates that even the single-oscillator bath, where the working fluid does not actually reach a thermal state, is sufficient for the engine to output work as it reaches a steady state.One can see that the faster cycle shows a small creep in energy, more substantial for σ = 1/2.This creep can be attributed to the nonadiabatic effects of the piston movement: according to Fig. 3, smaller σ's are more susceptible to this effect.In an experimental setup, this parasitic behavior can be mitigated by having the working fluid interact with a real baths which are able to absorb more heat from the oscillator than a single mode used as a bath here.
Figure 4(e) plots the cycle-resolved efficiency for each setup, shown to also reach a steady state.Theoretical efficiency obtained from Eq. ( 4), where ρ H/L are taken to be thermal states with ω hot/cold T , is plotted along with the simulation results.Because the working fluid does not reach a thermal state, the result does not agree quan- .The interaction between the baths and the gas is given by Eq. ( 6) with Y0 = x0 = z0 = 1.The baths and the oscillator Fock spaces contain 51 states.The piston interaction is given by Eq. ( 2) with Φ0 = −5.titatively with the numerics.Nevertheless, as discussed after Eq. ( 4), σ = 1/2 delivers a better efficiency than σ = 2 for both theoretical and numerical results.
Curiously, the efficiency of the fast cycles is higher than the slow ones.This efficiency gain, however, comes at the expense of the work performed.Figure 4(f) provides the cycle-resolved power for each engine configuration obtained by dividing the net work output by 4τ p .Even though the fast cycle takes half the time compared to the slow one, its power is not doubled, indicating that the slow cycle delivers more work.One can confirm this statement by comparing the separation between red markers for each cycle to that of the blue markers.The former corresponds to the work done on the engine, while the latter is the work done by the engine.The greater the difference, the more net work the engine outputs.It is evident that the difference is larger for the slow cycles for both σ's.

C. Measurement-powered setup
Changing to power source from a hot bath to measurements while keeping everything else the same amounts to replacing tr b B (ρ n ⊗ ρh ) B † → diag (ρ n ) in Eq. ( 9), corresponding to the measurement.diag (ρ n ) means that the off-diagonal elements (coherence terms) are set to zero, giving a classical probability.Hence, the cycle expression becomes The results for a set of four simulations using the same two values of σ and phase duration as above are given in Fig. 5.While the σ = 1/2 setup looks qualitatively similar to the corresponding configurations in Fig. 4, including the energy creep in the fast cycle, σ = 2 is drastically different, showing virtually no work output.This outcome is attributable to the fact that the pistongenerated potential is wide on the scale of the the oscillator's wavefunctions, resulting in a very weak harmonic mixing.Therefore, the measurement does not result in a substantial transfer of energy to the oscillator since the oscillator does not transition to higher energy states.
The efficiency for the measurement-powered cycle is similar to the bath-powered one, as seen by comparing Figs.4(e) and 5(e).To compute the power, the net work output is divided by 3τ p since the measurement is assumed to be an instantaneous process.The power for σ = 1/2 is comparable to the bath-powered setup.In the σ = 2 case, on the other hand, the vanishing work output results in negligible power.
The key takeaway of this section is that, despite the restricted and artificial form of the baths, the engine reaches a steady state and is able to output useful work.Enhancing the oscillator's ability to expel the waste heat by using a real reservoir and optimizing the piston and bath interaction profiles will improve the work output.

IV. SUMMARY
This work has introduced and simulated a realization of a single-piston quantum engine, where the role of the working fluid is played by a harmonic oscillator.By taking advantage of the fact that the interaction between the working fluid and the piston can be controlled by modifying the oscillator's energy, it has been shown that by following a cycle comprised of heating/cooling of the oscillator and piston motion towards and away from the oscillator, the engine can output work.Two general protocols of engine fueling have been discussed: bath-powered and measurement-powered with both successfully demonstrating stable work output over multiple cycles, indicating a steady state of operation.For simplicity, the heat reservoirs used here comprised of single thermal harmonic oscillator modes.Even though these modes do not function as true thermodynamic baths, the fact that the engine produces work suggests that the engine operation scheme is robust and will perform better in the presence of real thermodynamic reservoirs.
There are several research directions that naturally flow from this study.For an experimental realization of this system, the harmonic oscillator component could be implemented using cold atoms in an optical trap.To extract the waste heat, one could employ laser cooling.Therefore, a theoretical study could explore the operation of the proposed engine where the role of the working fluid is played by a harmonic oscillator with a controllable damping.In a similar vein, powering the engine using resonant driving is an option.Naturally, when the piston is in the advanced position, the oscillator Fock states are no longer the eigenstates, simply driving at the natural oscillator frequency might not be optimal in every case.Finally, a two-piston setup could be explored, where some of the waste heat expelled by one of the "cylinders" goes to heating the other one.

FIG. 1 .
FIG.1.Engine cycle schematic.The four phases of the engine cycle proceed in the direction indicated by the arrows.The working fluid is a quantum harmonic oscillator.It is coupled to an externally controlled piston via an attractive interaction, so adding heat to the working fluid reduces the coupling strength.Conversely, cooling the oscillator makes the interaction stronger.The power stroke of the cycle occurs when the piston is advanced and is denoted by the orange arrow.

FIG. 2 .
FIG.2.Controlling the interaction.Dependence of the interaction energy on temperature and piston position for Φ0 = −5 and several values of σ.The black lines are energy equicontours separated by 0.2.Retracting the piston or raising the oscillator temperature reduces the interaction strength.The green contour indicates an idealized engine cycle with vertical lines denoting heat transfer and the horizontal ones piston movement.The energy added or removed during a given phase is proportional to the number of equicontour lines crossed by the corresponding cycle segment.

2 FIG. 3 .
FIG. 3. Role of finite τp.System energy as a function of time of piston retraction and advance τp for Φ0 = −5 and several values of σ.The piston moves between y = 0 and y = 10σ.The numerically-computed results for finite τp are bounded by the adiabatic (τp → ∞) and instantaneous (τp → 0) results.Smaller σ leads to greater non-adiabatic effects.

where 1
is the identity.The corresponding time evolution operator B = exp −2πiτ b Ĥbath , where τ b is the contact time between the fluid and the bath, taken to be the same for both hot and cold baths.The baths' thermal states are given by ρb = exp −b † b/ω T /tr[exp −b † b/ω T ],

= 2 FIG. 4 .
FIG.4.Bath engine operation.80 cycles of a bath-powered engine initialized in a thermal state and evolved using Eq.(9) with ω hot T = 5 and ω cold T = 1/10.The interaction between the baths and the gas is given by Eq. (6) with Y0 = x0 = z0 = 1.The baths and the oscillator Fock spaces contain 51 states.The piston interaction is given by Eq. (2) with Φ0 = −5.(a)-(d) System energy at each phase of the cycle as a function of cycle number.For the fast engine (top row), the time of each stroke is 5, while for the slow one (bottom row) it is 10.(e) Efficiency for each of the engines as a function of the cycle number, computed by dividing the total work output by heat input.(f) The power of the engines, obtained by dividing the total work output by the duration of a cycle.
(a)-(d) System energy at each phase of the cycle as a function of cycle number.For the fast engine (top row), the time of each stroke is 5, while for the slow one (bottom row) it is 10.(e) Efficiency for each of the engines as a function of the cycle number, computed by dividing the total work output by heat input.(f) The power of the engines, obtained by dividing the total work output by the duration of a cycle.

= 2 FIG. 5 .= 1 / 10 .
FIG.5.Measurement engine operation.80 cycles of a measurement-powered engine initialized in a thermal state and evolved using Eq.(10) with ω cold T = 1/10.The interaction between the baths and the gas is given by Eq. (6) with Y0 = x0 = z0 = 1.The baths and the oscillator Fock spaces contain 51 states.The piston interaction is given by Eq. (2) with Φ0 = −5.(a)-(d) System energy at each phase of the cycle as a function of cycle number.For the fast engine (top row), the time of each stroke is 5, while for the slow one (bottom row) it is 10.(e) Efficiency for each of the engines as a function of the cycle number, computed by dividing the total work output by heat input.(f) The power of the engines, obtained by dividing the total work output by the duration of a cycle.