Optimizing autonomous thermal machines powered by energetic coherence

The characterization and control of quantum effects in the performance of thermodynamic tasks may open new avenues for small thermal machines working in the nanoscale. We study the impact of coherence in the energy basis in the operation of a small thermal machine which can act either as a heat engine or as a refrigerator. We show that input coherence may enhance the machine performance and allow it to operate in otherwise forbidden regimes. Moreover, our results also indicate that, in some cases, coherence may also be detrimental, rendering optimization of particular models a crucial task for benefiting from coherence-induced enhancements.


I. INTRODUCTION
Thermodynamics was originally conceived in the XIX century to describe and eventually improve steam engines [1,2]. It has proven to be one of the most successful theories in physics, leading to a general understanding of the physical properties of macroscopic systems, with multidisciplinary applications. Recent decades have seen a growth of interest in the thermodynamics of microscopic systems [3,4]. Progress in experimental techniques to manipulate quantum systems in the laboratory led us to even envision a future in which thermal devices may exploit genuine quantum effects, namely, quantum coherence [5][6][7] and quantum correlations [8][9][10]. These effects intrinsically set quantum thermodynamics apart from its classical counterpart. Therefore clarifying their operational role and quantifying its impact becomes a crucial challenge. Pursuing this goal, many contributions have already considered the role of noise-induced (or degenerate) coherence [11][12][13][14][15][16][17][18][19][20], non-thermal properties such as squeezing [21][22][23][24][25] or many-body correlations [26][27][28][29] on assisting thermodynamic tasks such as cooling and extracting work.
Since the introduction of the first operating prototype of a quantum heat engine by Scovil and Schultz-Dubois [30], many models of quantum thermal machines have been put forward [31,32]. For example, quantum analogues of classical Carnot and Otto engines have been investigated [33,34], paving the way for first experimental implementations of quantum heat engines in the last years [35][36][37][38]. A particularly appealing class of thermal machines are autonomous ones [32]. They consist on selfcontained models that avoid time-dependent Hamiltonians, since the later may implicitly require exta sources of coherence not explicitly accounted for [39,40]. This makes autonomous machines an ideal platform to quantify the impact of coherence on the performance of thermodynamic tasks. Different models of autonomous thermal machines using few quantum levels, qubits or harmonic oscillators have been considered [41][42][43][44]. Propos- Figure 1. Coherent thermal machine model. An ensemble of qubits prepared in an arbitrary state ρq (left purple area) is put on a tape moving from left to right to interact, once at a time, with the two machine qubits (center gears), after which they are collected (green right area). The setup allows either free energy extraction on the output qubits in the tape, powered by a heat current from hot to cold local baths (bottom red and blue areas), or refrigeration of the cold bath by consuming free energy of the incoming tape qubits. als for their implementation include different platforms, like quantum dots [45,46], circuit QED architectures [47] or atoms in optical cavities [48]. An autonomous quantum absorption refrigerator has been recently realized in the laboratory with trapped ions [49].
Our aim here is to quantify and optimize the impact of energetic coherence on the performance of an autonomous thermal machine. By energetic coherence we refer to the coherence between non-degenerate energy levels, also called asymmetry under time-translations [50,51]. Energetic coherence is a resource of particular relevance in quantum thermodynamics [52][53][54][55]. It constitutes an extra (independent) source of free energy [56,57], allowing state transformations that would be otherwise impossible [58][59][60], and has direct consequences on the entropy balance leading to the second law [61,62].
The model considered here has been recently introduced in Ref. [63], although employed for different purposes. We consider one of the most prototypical quantum thermal machines, namely, a pair of two-level systems (or qubits) coupled to thermal baths at different temperatures [34,43]. The machine works through the interaction with a stream of qubits (represented in a tape) via a sequence of energy-preserving collisions (see Fig. 1). Employing a collisional framework [64][65][66][67] we relate heat an entropy fluxes from the baths with the transformations in the tape qubits to quantitatively address the performance of the machine. The presence of initial coherence in the tape qubits has a strong impact on the performance of the machine, that admits coherence-enhanced situations when optimization over the machine parameters is applied. This paper has the following structure: In Sec. II we describe the model and the dynamics for the thermal machine. The operation of the machine in steady-state conditions and its thermodynamic properties are explored in Sec. III. In Sec. IV we provide a description of the different modes of operation of the machine, highlighting the role of initial coherence in the tape qubits. We then proceed to the optimization of the power of the machine in different regimes in Sec. V, discussing the impact of coherence in both the power and the efficiency of the machine. Finally in Sec. VI, we present our main conclusion and some perspectives for further research.

II. COHERENT MACHINE MODEL
The setup we employ along this study follows the configuration introduced in Ref. [63] and is sketched in Figs. 1 and 2. We consider a quantum thermal machine that consist of two qubits with energy spacing, E c and E h respectively, and Hamiltonian The two machine qubits are weakly coupled to thermal reservoirs (or baths) with different inverse temperatures (β c ≥ β h ) acting only locally on each qubit. We refer to the machine qubits and baths as the "cold" and "hot" qubits or baths, respectively.
In addition, the machine sequentially interacts with a stream of qubits in a tape with fixed energy spacing and Hamiltonian H q = E q |1 1| q , where the subscript q stands for "qubits". All the qubits in the tape are assumed to start in the same generic initial state ρ q , and interact with the machine, one by one, trough a sequence of energy-preserving unitary maps of the form U = e −iHintτ (in interaction picture), where H int is the following threebody Hamiltonian: where σ − i ≡ |0 1| i denote the lowering operator of qubit i = c, h, q and σ + i = (σ − i ) † . We remark that strict energy Figure 2. Representation of the machine as a 4-level system interacting with an incoming qubit of the tape. The interaction Hint with the resonance condition in Eq. (1), allows the coherent exchange of excitations between the two inner machine levels and the tape qubit (green and orange arrows). The local reservoirs induce incoherent transitions on the machine levels with energy spacing Ec and E h as represented, respectively, by the blue and red arrows.
conservation is enforced by the resonance condition (1) Here it is also useful to define φ = gτ as the effective strength of the collision, where τ denotes the interaction time. We are interested in the regime φ 1, corresponding to weak and fast collisions.
In the absence of the qubit tape, the two qubits of the machine do not interact between them at all. In that case the contact with local thermal baths would produce the independent thermalization of each machine qubit to the cold and hot temperatures, β c and β h , respectively. Even if in a product of thermal states, it is nonetheless interesting to look at the machine as composed of four levels (see Fig 2). Indeed the independent thermalization, would result in an effective population of the two inner levels {|10 m , |01 m } [68] (also called virtual qubit), which we denote as p eq 10 and p eq 01 , showing a virtual inverse temperature β v defined by the Gibbs ratio β v E q ≡ ln(p eq 10 /p eq 01 ) [43]. It reads Depending on the values of E c and E h , the virtual temperature can be tuned to take different values, making the machine suitable for the performance of thermodynamic tasks, such as power generation or refrigeration, by connecting a external system to the inner transition |10 m ↔ |01 m [69,70]. In particular, for the choice E h ≥ E c and β c ≥ β h , we always have β v ≤ β c , and obtain population inversion, β v ≤ 0, if and only if E h /E c ≤ β c /β h . As we will see in the following sections, the virtual temperature β v plays an important role in the characterization of the operational regimes of the autonomous thermal machine considered here. When introducing the interactions with the tape, the two qubits of the machine are allowed to exchange heat between them and with the qubits in the tape, evolving through a nonequilibrium stationary state. We assume that collisions occur at random times following Poissonian statistics with rate r. A monotonic evolution towards stationarity is enforced by the Markovian character of the collisional model employed here, where every collision uses a "fresh" qubit in the tape in the same state: with p 0 + p 1 = 1 and |c| ≤ √ p 0 p 1 ensuring a positive semi-definite density operator. From the collisional model introduced here, we build a master equation in the GKLS form describing the open evolution of the machine density operator, ρ m , subjected to both the effects of the two thermal reservoirs and the qubit's tape (see Appendix A and Ref. [63]). In the interaction picture, it reads: where the first line describes the effects of the collisions with the tape, and the second line the interaction with cold and hot reservoirs, with: the local thermal Lindbladian acting on qubit i = c, h of the machine, and D[L]· ≡ L · L † − 1 2 {L † L, ·} denoting the usual Lindblad dissipators [71,72] with rates fulfilling local detailed balance γ i ↓ = γ i ↑ e βiEi . As can be appreciated in the first line of Eq. (5), the collisions with the tape qubits generate both coherent (driving-like) contributions, as given by the operator , and dissipative terms analogous to the ones induced by the baths in Eq. (6), with rates γ q ↑ = rφ 2 p 1 and γ q ↓ = rφ 2 p 0 . These two contributions correspond, respectively, to coherent and incoherent transitions between the inner levels |10 m ↔ |01 m of the machine (see Fig. 2), and depend explicitly on the initial state of the qubits in the tape, ρ q . As also noticed in Refs. [63,67], the coherent contribution appears only when the tape qubits are initialized with non-zero coherence in the energy basis, |c| = 0 in Eq. (4).
On the other hand, the local transitions induced by the baths on the machine qubits, can be written for the case of bosonic reservoirs as γ i ↓ = Γ i 0 (N i th + 1) and γ i ↑ = Γ i 0 N i th , with Γ i 0 the spontaneous emission rate and N i th = (e βiEi − 1) −1 the average number of excitations in the bath at temperature β i with energy E i [71,72]. For the ease of simplicity, we assume in the following equal spontaneous emission rates, Γ 0 ≡ Γ c 0 = Γ h 0 . The relative weights of local thermal dissipation and collisional dynamics are then determined by the interplay of the parameters r, φ and Γ 0 . More precisely, for rφ 2 Γ 0 the collisional tape qubits becomes the dominant contribution ot the dynamics, spoiling thermal effects induced by the baths. On the other hand, the regime rφ 2 Γ 0 , corresponds to a weak impact of the tape qubits on the machine, where the incoherent terms in the first line of Eq. (5) become negligible (but not necessarily first coherent term proportional to rφ). In the following sections we consider both cases where rφ 2 ∼ Γ 0 and rφ 2 Γ 0 with still Γ 0 < rφ. The validity of the master equation (5) is warranted in the case of weak coupling to the local reservoirs, Γ 0 E i , as well as weak collisions φ 1 occurring on a fast timescale with respect to the relaxation time-scales induced by the baths, Γ 0 1/τ . It is indeed this later assumption that allows us to safely split the machine dynamics into pieces coming from the collisions with the tape in one side, and from the local thermal reservoirs in the other side (see App. A).

III. STEADY-STATE DYNAMICS AND THERMODYNAMICS
We focus on the operation of the machine in the stationary regime, namely, after which a sufficient number of collisions with the tape have already taken place. The steady state of the machine in the long time run, π m = lim t→∞ ρ m , can be obtained from Eq. (5) by imposing L(π m ) = 0 (see Appendix B) and is of the form: Crucially, the initial coherence in the tape qubits is partially transferred to the machine in the steady state, that acquires coherence in the non-degenerate subspace {|10 m , |01 m } of H m . This is contrast to other models that acquire steady-state coherence only in a degenerate, or nearly-degenerate subspace [11,42]. Under steady-state conditions, the effect of the coherent machine on every incoming qubit of the tape is equivalent and can be described through the following completely positive and trace preserving (CPTP) map ρ q → E(ρ q ), with: where again coherent and incoherent contributions can be identified, in analogy to Eq. (5). Notice that here, contrary to other models of collisional reservoirs [67,73], we distinguish between the initial and final states of the qubits in the tape, which are collected after interaction with the machine (see Fig. 1).
The map E in Eq. (8) depends on the machine steadystate density operator elements π 10 , π 01 and π c , which are linked, at the same time, to the initial state ρ q through the coefficients in Eq. (5). Although this intricate dependence, we observe that this map turns out to be contractive, and shows a single fixed point, E(τ v ) = τ v , with thermal Gibbs form at the virtual temperature: where Z q = Tr[e −βvEq ], and β v is the virtual temperature in Eq. (3). Whenever the qubits in the tape are prepared in the state (9) the machine is unable to perform any change on it. Later on we will see that this state indeed corresponds to an equilibrium point.
With the help of Eq. (8), the master equation (5), and the expressions for the steady-state density operator in Eq. (7), we can directly compute the steady-state energy and heat currents into the qubit's tape and from the baths to obtain: which verifyĖ tape =Q c +Q h owing to Eq. (1), that is, any increase of energy in the tape qubits is due to input heat from hot and cold baths. Moreover, the currents verify the relation: implying that all heat and energy currents flowing through the machine are proportional to each other. In the above expressions (10) we conveniently introduced the two following key quantities which capture the incoherent (∆) and coherent components (ζ) of the energy currents. The quantity ζ ≥ 0 is real and positive, and becomes zero whenever the initial state of the qubits in the tape is diagonal in the energy basis, c = 0 in Eq. (4). Instead ∆ can be either positive or negative, and both quantities vanish ∆ = ζ = 0 when ρ q = τ v , implying zero currents in Eq. (10). The change in the entropy of the tape due to the interaction with the machine in the steady state can be calculated from Eq. (8) using perturbation theory (see Appendix B for details) and is given by: where N ≡ rφ 2 (π 01 + π 10 ) and we denoted the eigenvalues of ρ q by λ ± ≡ (1 ± (p 1 − p 0 ) 2 + 4|c| 2 )/2. Using the energy and entropy currents, we can now define the nonequilibrium free energy current of the qubits in the tape with respect to temperature T 1 , The nonequilibrium free energy characterizes the maximum extractable work from nonequilibrium states by using local unitary operations and contact with a thermal bath (see e.g. Refs. [74][75][76]) at the cold temperature T c [77]. Here it plays a prominent role for quantifying the tape qubits as a resource. Importantly, the free energy in Eq. (14) takes into account both thermal populations and coherence in the qubits, and can be split into two components by using the relative entropy of coherence [56,60,67] (see App. B for details). In Ref. [63], it has been shown that this model is able to amplify the relative entropy of coherence of the incoming qubits for an adequate choice of the parameters. Here we instead focus on the ability of this machine to perform thermodynamic tasks that may be enhanced or assisted by coherence. From Eqs. (10) and (13), we are now in a position to state the second law of thermodynamics in steady-state conditions as the positivity of the total entropy production rate [78,79]: where β iQi are the entropy fluxes associated to the heat currents from/to reservoir i andṠ tape is entropy flux associated to exchange of energy between the machine and the qubits in the tape,Ė tape . Reversibility conditions associated to a zero entropy production rate in Eq. (15) are verified when the tape qubits are initialized in the thermal state at the virtual temperature (9). Making use of energy conservation to eliminate one of the two heat currents in (15), and identifying the nonequilibrium free energy in Eq. (14), we can rewrite Eq. (15) in the two following equivalent forms: where η stands for the efficiency of a heat engine increasing the free energy of the tape qubitsḞ tape using the heat current from the hot bathQ h as a resource, and is the so-called coefficient of performance (COP) of a refrigerator extracting heat from the cold reservoirQ c by consuming free-energy of the input qubits on the tape. Remarkably, the second-law inequality (15) bounds both quantities, respectively, by Carnot efficiency [31]. The bounds are reached, similarly to other models of (incoherent) autonomous thermal machines, at the equilibrium point (ρ q = τ v ), where every energy and entropy currents become zero. Similar notions of nonequilibrium free-energy efficiencies have been also proposed in the context of squeezed thermal reservoirs [80], molecular machines [81], dissipative chemistry [82] and multiterminal mesoscopic conductors [83].

IV. REGIMES OF OPERATION
Equations (16) and (17) suggest that the thermal machine introduced here may act as either a heat engine or as a power-driven refrigerator, where the the free energy current to (from) the qubit tape plays the role of the output (input) work. This idea can be made more precise by exploring the joint behavior of the heat currents from the thermal reservoirsQ c andQ h and the free energy changes of the qubits in the tape,Ḟ tape . We use different parameters of the thermal machine and initial states of the tape qubits, ρ q . The following three regimes of operation are found: I Free-energy heat engine (HE): The thermal machine performs a continuous increase in the free energy of the qubits of the tape,Ḟ tape ≥ 0, using the natural heat current from the hot bath, Q h ≥ 0, which is partially dumped into the cold bath,Q c ≤ 0.
II Refrigerator (R): A heat current from the cold bath is extractedQ c ≥ 0 by consuming free energy of the tape qubits,Ḟ tape < 0, while heat in transferred into the hot bathQ h < 0. This configuration can be also seen as a free-energy driven heat pump.
III Dissipator (D): An input free-energy current from the tape qubitsḞ tape < 0 is, together with a heat current from the hot bath,Q h > 0 dumped into the cold bath,Q c < 0. In this regime no particularly useful thermodynamic tasks is performed.
The simplicity of the model allows us to obtain analytically the boundaries among steady-state regimes of operation in the absence of initial coherence in the tape. Taking c = 0 in Eq. (4) immediately yields ζ = 0 in Eqs. (10). Moreover we obtain a purely classical free energy,Ḟ tot = E q ∆(1 − β q /β c ), where β q ≡ log(p 0 /p 1 )/E q represents the temperature of the incoming qubits in the tape. As a consequence, the regimes of operation in this case are solely determined by the interplay between β q , the virtual temperature β v , and the temperature of the cold bath β c . We recall that here β v ≤ β c by construction. The refrigerator regime R is obtained when the qubits in the tape have initial temperatures higher than the virtual one (absorption refrigerator), or equivalently, when they show a higher population inversion (powerdriven refrigerator), β q ≤ β v ≤ β c . This implies ∆ ≤ 0 in Eq. (10), leading toQ c ≥ 0,Q h ≤ 0 andĖ tape ≤ 0. On the other hand, when the largest temperature (or largest negative temperature) is the virtual temperature, β v ≤ β q ≤ β c , the energetic currents change sign, ∆ ≥ 0, and the machine is able to pump free energy into the tape,Ḟ tape ≥ 0, hence obtaining the heat engine regime HE. Finally, for temperatures of the tape qubits lower than the cold bath, β v ≤ β c ≤ β q , while we still have energy pumping into the tape (since ∆ > 0), the entropy flux associated to that energy current,Ṡ tape in Eq. (13) becomes so high that produces a loss of free energy in the tape,Ḟ tape ≤ 0, spoiling work extraction and leading to the (useless) dissipator regime D.
A more complex situation arises when the input atoms have a non-zero initial coherence, c = 0 in Eq. (4). In that case an explicit analytical solution for the regimes boundaries is not available and we need to rely on numerical evaluation of the currents. In Figs. 3 and 4 we show, for different representative sets of parameters, the regimes of operation achieved by the machine as a function of the tape qubits initial state, ρ q . There the circles represent a cross section of the incoming qubit's Bloch sphere (in interaction picture) and we took c to be a real number without loss of generality.
The inclusion of coherence in the tape can greatly modify the regimes of operation with respect to the incoherent case (vertical dotted line at c = 0). The parameters in Fig. 3(a) corresponds to a relatively big temperature gradient in the baths, β h = 0.05β c , which favours a broad heat engine regime (green area) with respect to refrigeration (blue area) and the dissipator (red area). In Fig. 3(b) we show the corresponding free energy changes in the tape qubits,Ḟ tape , in units of E q rφ 2 . Remarkably, we observe that the output free energy current can be enhanced up to 6 times with respect to its maximum incoherent value (Ḟ tape 0.1E q rφ 2 ) for values of the initial coherence in the tape qubits |c| 0.4 and p 1 0.5.
On the other hand, Fig. 4(a) corresponds to a smaller temperature gradient between the baths, β h = 0.5β c leading to a wider R regime (blue area), at expenses of the dissipator D (red area) and heat engine HE regimes (tiny green area). We also consider a higher effective coupling of the tape qubits, φ = 0.04, leading to a stronger impact of the tape qubits on the machine dynamics than the thermal reservoirs. Since the fuel used for cooling is provided by the free energy from the tape, a higher impact of the later (rφ 2 > Γ 0 ) helps to improve the cooling power. The heat current from the cold reservoirQ c (or cooling power) is plotted in Fig. 4(b) in units of E c Γ 0 . In this case we observe no enhancement in the cooling power by using initial coherence in the tape qubits. However, enhancements can be found for other sets of parameters (see e.g. Fig. 7). In any case, we observe a large region of parameters (south hemisphere of the Bloch sphere) where refrigeration becomes possible owing to the input coherence. In this region we therefore find a coherencepowered refrigerator. In all plots the blue and purple dots represent respectively the thermal states of the qubits with respect to β c , that is, τ c ≡ e −βcHq /Z c , and β v , that is, τ v in Eq. (9).
We notice that since the coherent component of the currents in Eq. (10) is non-negative, ζ ≥ 0, an enhancement in the heat and energy currents with respect to the incoherent case may be expected. However, we remark that Figs. 3 and 4 show not only the possibility of coherence-induced enhancements in some regimes, but also that, due to the non-monotonic behavior of the currents with c, some thermodynamic operations become enabled by means of coherence in otherwise impossible situations and, for other cases, coherence maybe detrimental.
An important observation at this point is that, by employing initial coherence in the tape qubits, the distance of ρ q from the equilibrium state τ v increases in general, forcing the machine to work in further from equilibrium conditions. In other words, increasing the heat and energy currents comes at the price of increasing dissipation, which may eventually spoil the efficiency in the enhanced regimes. It is hence of primary interest to take into account the level of irreversibility of the machine operation, and, ultimately, compare the enhancements in power with respect to the efficiency achieved in each regime. While we will explore in detail the trade-off between power and efficiency in the next section, here we concentrate on the impact of coherence in dissipation as Figure 5. Entropy production rate as a function of the tape qubits population p1 for different values of the off-diagonal element absolute vale |c| (see legend). The dashed line corresponds to the incoherent case. Parameters: Ec = 0.6Eq, E h = 1.6Eq, βc = 1.2/Eq, β h = 0.05βc, r = 2.5/Eq, φ = 0.08 and Γ0 = 0.0025/Eq. measured by the entropy production rate in Eq. (15). In Fig. 5 we show, for a particular choice of parameters,Ṡ tot as a function of p 1 for different values of |c|. We find a moderate increase in dissipation when increasing |c| in the region close to the equilibrium point, at p 1 0.65. However, as |c| gets close to its maximum value c max ≡ √ p 0 p 1 , the entropy production starts growing exponentially. This is more apparent when we get closer to the maximum and minimum values of p 1 , corresponding to small values of c max . Finally, it is also worth pointing out that here we used the free energy in Eq. (14) to provide a notion of useful work performed by the thermal machine, since it naturally follows from the formulation of the second law in Eqs. (15) and (16). However, this interpretation is not the only one possible. For example one may be interested in alternative notions of work, applicable when assuming extra restrictions in the setup, see e.g. Refs. [60,84]. One interesting alternative is given by the so-called ergotropy, defined as the maximum extractable work from a quantum state by only using unitary operations performing a cyclical variation of Hamiltonian parameters [85]. The ergotropy is strictly upper-bounded by the free energy for any temperature [10], and, like the nonequilibrium free energy, can be split into coherent and thermal components [86]. In appendix C we show that similar results as those reported here are obtained when replacing the free energy changes in the tape qubits [Eq. (14)] by the change in their ergotropy, as induced by the machine operation.

V. OPTIMIZING THE PERFORMANCE
The results presented in the previous section raise the question of up to what extent coherence can be employed to improve the two useful regimes in our configuration, namely, free energy generation in the qubits of the tape or cooling the cold reservoir. More precisely, given fixed thermal resources as determined by the temperatures of the baths β c and β h , and fixing also the coupling-dependent parameters Γ 0 , r and φ, we ask ourselves: What is the optimal design of the machine (E c and E h ) and the optimal initial states of the qubits in the tape (ρ q ) maximizing the free energy production (cooling power)? Is it possible to reach such maximum power regime at a reasonable efficiency (coefficient of performance)? May energetic coherence lead to an absolute enhancement for fixed resources?
In order to address these questions we set the temperature scale of the setup by enforcing different values of the cold bath temperature k B T c = {1.0 E q , 0.5 E q , 0.1 E q } and use as a free parameter in the optimization the largest energy spacing in the machine Hilbert space, E m ≡ E c + E h . We also fix the bath relaxation rates as Γ 0 = 0.0025/E q , and the parameters r = 2/E q and φ = 0.02, such that the action of the tape qubits in the machine is weak compared to the thermal reservoirs, rφ 2 Γ 0 . This implies a weak back-reaction of the tape qubits on the machine, favoring the coherent exchange of energy between machine and tape. Hence we expect a higher impact of coherence in this regime of parameters.

A. Maximization of the free energy
We numerically maximize the free energy current in the tape qubits by varying the the largest energy gap in the machine, E m ≡ E c +E h in the interval [E q , 20E q ], for fixed E q . We denote the optimal value of the free energy current byḞ max tape . Since here we are interested in the performance of the machine as a heat engine, we consider a relatively big temperature gradient β c = 0.05β h , leading to a value for Carnot efficiency η C = 0.95.
We show the results for the optimized free energy pro-ductionḞ max tot as a function of the initial state of the tape qubits in Fig. 6(a)-(c). Since all results are sym-metric with respect to the axis c = 0, we only show half of the Bloch sphere section. The three plots correspond to the three choices of β c as stated above, i.e. moderate, low, and extremely-low temperatures, respectively. In all three cases, we obtain a clear maximum at values of p 1 around 0.5 and initial coherence |c| between 0.3 and 0.37 (see red dots). This is an important feature, which indicates that the heat engine achieves maximum power when it is assisted by energetic coherence in the tape qubits. The free energy generationḞ max tape is enhanced with respect to its maximum value without coherence (|c| = 0) about 4.76 times in Fig. 6(a), 6.1 times in Fig. 6(b) and 3.34 times in Fig. 6(c). The corresponding values of E m optimizing free energy generation are, respectively, 7.3E q , 3.9E q , and 1.7E q , and vary only very slightly wihin the yellowish areas in Fig. 6. We also notice that optimization over E m allows broadening the set of initial states ρ q for which the HE regime is obtained. More precisely, the regions close the north and south poles of the Bloch sphere for which operations R and D are achieved [see  These efficiencies are comparable to the ones reached for the first peak (η 0.44η C at p 1 0.88 and |c| = 0). This second peak broadens when further decreasing the temperature (increasing β c ) [see Fig. 6(f)] reaching high values for the efficiency around η 0.78η C at maximum free energy output, to be compared to η 0.75η C , the maximum available efficiency at maximum power without using coherence in the tape (reached for p 1 0.73). This is a remarkable feature, showing that the use and control of coherence at low temperatures plays a crucial role in developing power, and can be used to enhance the performance (both power and efficiency at maximum power) of thermal machines.

B. Maximization of cooling power
As a second case of interest, we consider the maximization of the cooling power,Q c , that is, the heat current extracted from the cold reservoir by the machine. As before, optimization is performed by varying the largest energy gap in the machine, E m ∈ [E q , 20E q ] for fixed E q , and the three temperatures scales β 1 E q = {1, 2, 10}. On the contrary, in this case we consider a relatively small temperature gradient β c = 0.5β h , favoring cooling regimes R with respect to HE ones [see e.g. Fig. 4]. The reversible (maximum) COP value associated to this temperature ratio is C = 1 in all three cases.
In Figs. 7(a)-(c) we show the maximum cooling poweṙ Q max c in units of Γ 0 E q as a function of the initial state ρ q for the three different values of β c . White areas in the bottom represent regions of parameters where cooling cannot be achieved, no matter the value of E m . The optimal values of E m lie in between E q and 4.5E q in any case, being smaller for lower temperatures of the cold bath. Similarly to the previous case, our results indicate that cooling can be optimized by allowing the initial states of the tape qubits to have non-zero coherence. This can be indeed appreciated in Figs. 7(b) and (c), where the maximum cooling power is achieved in the right part of the semi-cross sections of the tape qubits Bloch sphere. In particular the maximum ofQ max c is achieved at points (p 1 0.6, |c| 0.49) for β c = 2 and at (p 1 0.55, |c| 0.50) for β c = 10, enhancing optimal incoherent cooling by 1.5 and 2.4 times, respectively. On the other hand, we confirm that allowing a non-zero coherence in the tape, allows reaching refrigeration in situations where it would be otherwise impossible, that is, for p 1 ≤ 0.38 in Fig. 7(a), and for p 1 ≤ 0.26 in Fig. 7(b). Figs. 7(d)-(f) show the COP of the fridge at maximum cooling power, divided by the reversible (Carnot) value C , corresponding to Figs. 7(a)-(c). In this case maximum values of the COP are obtained for |c| = 0 in all cases of moderate, low and very low temperatures. The overall maxima are located respectively at p 1 0.54, p 1 0.51 and p 1 0.27, generating a high-COP area around them. As temperature decreases the values the COP become lower and more homogeneous over the whole Bloch sphere semi-cross section. Here we observe that the areas corresponding to maximum values of the cooling powerQ max c and maximum COP do not overlap between them. This means that, contrary to the free energy generation case, coherence-enhanced cooling is not accompanied by an improved efficiency. Therefore, in this case the customary trade-off between power and efficiency extends to the initial state ρ q optimization.

VI. CONCLUSIONS
We have shown that, using energetic coherence, thermodynamic tasks can be enabled and/or enhanced by autonomous thermal machines. In particular we considered a setup where thermal and coherent resources mix up in a beneficial way. We explored both situations where the tape of qubits is operated by the machine to obtain a useful output (free energy), as well as cases in which the qubits in the tape are used as a fuel to power standard thermodynamic tasks, like refrigeration of a cold reservoir. The relative simplicity of the model allowed us to quantitatively assess the impact of the initial state of the qubits in the tape, ρ q , and in particular its initial coherence c, in these two main situations.
Our results indicate that coherence can notably enhance the power of the machine in some regimes of operation, and that coherence can be used to enable machine operation in otherwise impossible situations. These enhancements are not obtained for every value of the initial coherence c in general, but it needs to be properly selected. Allowing optimization over the machine design results in broader regions of parameters where coherence plays a beneficial role. We have shown that these improvements are the result of a nonequilibrium effect, with a non-zero associated entropy production. Our results go beyond weakly-coherent models [67], linear-response regime [87] or weak-dissipation engines [88], paving the way for the experimental test of energetic-coherenceenhanced performance in autonomous thermal machines.
The optimization procedure employed here shows that energetic coherence is essential in order to maximize the machine output free energy and cooling power. Furthermore, we observed that in the first case, coherence also enhances the efficiency at optimal operation for sufficiently low temperatures. These promising results may be further explored and extended to other autonomous configurations beyond the case of qubits considered here. For example, it would be interesting to consider situations where the tape of qubits is replaced by other physical systems, like e.g. harmonic oscillators, also in view of possible experimental implementations in trapped ion setups [38] or QED architectures [89]. We obtain the master equation (5) in Sec. II for the thermal machine by explicitly modelling its interaction with the thermal baths and with the qubits in the tape. In particular we consider bosonic baths with Hamiltonian H (i) k for i = c, h and where the index k labels the bath's field modes with frequencies Ω (i) k , and a (i) † k (a k ) being their usual creation (annihilation) operators. We assume a weak coupling between the baths and the corresponding machine qubits, in the rotating wave approximation: with g (i) k E i the coupling strength of the i-th qubit to each of the k modes of the bath i, with spectral densities In the absence of interactions with the tape qubits, each machine qubit is independently coupled to a local thermal bath. The reduced dynamics of the machine can then be easily obtained using the Born-Markov and secular approximations [71,72]: th are the rates of emission and absorption processes induced by the thermal baths. Here we assumed an Ohmic behavior of the of the baths around the respective qubit frequencies and no modes at the frequency of the complementary qubit, leading to J i (E j ) (Γ i 0 /2π)δ ij . Then, we consider the successive interactions (or collisions) of the machine with a series of qubits in the tape, one at a time. Crucially we assume that the interactions last a very short time τ , which we assume to be smaller than the timescales of the machine's relaxation dynamics, τ 1/Γ i 0 for i = c, h. In this way, the collisions occur almost instantaneously and can be described by a unitary (energy-preserving) operator acting over the machine and the tape qubits, while the presence of the baths during the collisions becomes negligible. For a collision occurring at time t we have U (t + τ, t) = e −iHintτ . Therefore, after the collision the joint state of machine and qubit tape (in interaction picture) is given by: where ρ(t) = ρ m (t) ⊗ ρ q is the joint state before interaction, corresponding to an (uncorrelated) product state of the machine at time t and a "fresh" qubit in the tape. Notice that we assume all tape qubits to have the same phase when they interact with the machine. The reduced evolution of the machine is given by a completely positive and trace-preserving (CPTP) map, obtained after partial tracing of the qubit degrees of freedom in Eq. (A3). Using the expression of H int in Eq. (2) and expanding up to second order in φ = gτ 1, we obtain: Finally we need to combine the dynamics induced by the baths in Eq. (A2) with the instantaneous collisions as described by Eq. (A4). For this purpose, we assume that the collisions occur at random times following Poissonian statistics with rate r. The state of the machine at time t after n collisions can then be explicitly computed as: where ρ (n−1) m (s) is the state of the system after n − 1 collisions at time s, and w(∆t) = re −r∆t is the socalled waiting-time distribution corresponding to Poisson statistics, which captures the probability that a collision does not happen in the interval ∆t. The last term inside the integral describes a collision at time s through the CPTP map Ξ, and the second exponential term describes the evolution of the machine up to the next collision, i.e. the interval of time when the tape is stopped and only the thermal baths act on the machine. Taking the timederivative of Eq. (A5), summing over n, and replacing the expressions for the Liouvillian L 0 in Eq. (A2) and the CPTP map Ξ in Eq. (A4), we recover the master equation (5) in Sec. II.

Appendix B: Steady-state operation
The collision of the machine with the tape results in driving the machine to a nonequilibrium steady state π m in the long time run. To obtain it, we separate the master equation (5) into a set of coupled differential equations for the relevant populations and coherences of ρ m , which can be expressed in matrix form asṖ = M · P , with the vector P T ≡ ( 00 , 01 , 10 , 11 , v , * v ) containing the elements ij = ij|ρ m |ij m and v = 10|ρ m |01 m of ρ m , and the dynamical matrix: . The steady-state elements of the density operator in Eq. (7) are calculated by solving the kernel of the dynamical matrix M above, that is, imposing M · Π = 0, and obtaining Π T = (π 00 , π 01 , π 10 , π 11 , π v , π * v ). Notice that in the vectors P and Π, we excluded all other non-diagonal elements of ρ m , since they are only subjected to exponential decay (decoherence), and are hence zero in the steady state regime. On the other hand, the CPTP map describing the operation of the machine on the tape qubits in the steady state, is obtained, similarly to Eq. (A4), by tracing out the machine degrees of freedom in Eq. (A3), that is, E(ρ q ) ≡ Tr m [ρ(t + τ )]. Expanding up to second order in φ we recover straightforwardly Eq. (8).
The changes in energy and entropy of the tape qubits due to the collisions, as given in Eqs. (10) and (13) in Sec. III, are calculated using the explicit expression of the map E(ρ q ) in Eq. (8). The only less straightforward point is the computation of the rate of entropy change in Eq. (13), for which we expand the eigenvalues and eigenstates of E(ρ q ), to second order in φ as λ k = λ k + φλ k , where λ k and |λ k q denote the eigenvalues and eigenstates of ρ q . The first and secondorder contributions to the eigenvalues (and eigenstates) are computed by using perturbation theory for the density operator [63]. The entropy changes in the tape are then approximated, up to second order in φ, by: where we used λ (1) k = 0 and for the second-order contribution we have: By plugging (B3) into (B2), and operating we obtain the expression for the entropy changes in the tape given in Eq. (13) of Sec. III. Finally, we recall that the non-equilibrium free energy changes of the tape qubitsḞ tape in Eq. (14) can be divided into thermal and coherent parts [63]. This split is performed by introducing the dephased states in the energy basis,ρ q = j Π j ρ q Π j , with Π j = {|0 0| q , |1 1| q } the projectors of the spectral decomposition of H q .
By considering the dephased states of input and output tape qubits, we can calculate the part of the qubit entropy changes only due to the populations, obtaininġ S tape = (∆ + ζ) ln(p 0 /p 1 ). The associated (classical) free energy changes are then defined asḞ tape ≡Ė tape −Ṡ tape . The free energy split then reads [56,61,63]: whereĊ tape =Ṡ −Ṡ is the change in relative entropy of coherence, C(ρ) = S(ρ||ρ) = S(ρ) − S(ρ) ≥ 0, which is non-negative, monotonic and constitutes a proper measure of coherence [50,51]. We notice that whenever the initial state of the qubits in the tape is diagonal in the energy basis (c = 0), we haveĊ tape = 0, and the free energy reduces to its classical contribution.

Appendix C: Ergotropy generation
The results provided in Sec. IV for the generation of free energy in the tape qubits, can be complemented by considering ergotropy as an alternative quantifier for the power of the machine. In this way, the operation of the machine would be to increase or decrease the ergotropy of the tape qubits. The name ergotropy was coined in Ref. [85] to quantify the maximum work extractable from a generic quantum state σ by using unitary transformations U describing the cyclic variation of a parameter controlling the system Hamiltonian H: where λ 1 ≥ λ 2 ≥ ... denote the ordered eigenvalues of σ and E 1 ≤ E 2 ≤ ... the eigenvalues of H. In the case of qubits, the optimal unitary U corresponds to a rotation in the Bloch sphere that transforms the initial state σ into a thermal Gibbs state τ β ≡ e −βH /Z with β determined by the entropy of the initial state σ.
Applying the definition Eq. (C1) to the input and output states of the tape qubits, and calculating their difference, we obtain: where we used that the optimal unitary transforms the eigenstate of ρ q corresponding to highest (lowest) eigenvalue, λ + ≥ λ − , to the ground (excited) states [similarly for E(ρ q )], and used λ − − λ − = φ 2 λ − . Introducing into Eq. (C2) the expression for λ (2) − as given by Eq. (B3), and operating we obtaiṅ Using Eq. (C3), we can redefine the regimes of operation of the device reported in Sec. IV by replacing free-energy changes in the tape qubits,Ḟ tape , by the corresponding ergotropy changes,Ẇ tape . In Fig. 8(a), we show the regions of the Bloch sphere corresponding to such new operational regimes for same parameters as in Fig. 3 of Sec. IV. By comparing the two figures, we notice that, as expected, the refrigerator regime (characterized byQ c > 0) appears in the same region, while we observe differences for the shape of HE (Ẇ > 0) and D (Ẇ < 0) regions. In particular the HE regime broadens, including the whole south hemisphere. This indicates the existence of situations where the ergotropy of the tape qubits increases while their free energy decreases. While the opposite situation is not observed, there are, nevertheless, cases for which the free energy increases more than the ergotropy. For example, along the line c = 0, the ergotropy changes vanishes in the south hemisphere whilė F tape is still positive.
In Fig. 8(b) we plot the values ofẆ tape in units of rφ 2 E q . Similarly to the case of free energy changes, we observe that the highest values are reached in the right part of the semi-circle, for non-zero initial coherence of the tape qubits. More precisely, the maximum value oḟ W tape is reached for |c| ∼ 0.4 and p , being 3 times greater than the best incoherent case (reached at p 1 = and c = 0). Therefore, allowing initial coherence in the tape qubits enhances the output ergotropy current when maintaining all other resources constant. This confirms that input coherence plays a crucial role for the optimization of the performance of the machine, also from the point of view of ergotropy generation.  Fig. 3: β h = 0.05βc, Ec = 0.5Eq, E h = 1.5Eq, βc = 1.2/Eq, r = 2/Eq, φ = 0.02 and Γ0 = 0.0025/Eq.