Thermodynamics of Minimal Coupling Quantum Heat Engines

The Minimal Coupling Quantum Heat Engine is a thermal machine consisting of an explicit energy storage system, heat baths, and a working body, which couples alternatively to subsystems through discrete steps - energy conserving two-body quantum operations. Within this paradigm, we present a general framework of quantum thermodynamics, where a process of the work extraction is fundamentally limited by a flow of non-passive energy (ergotropy), while energy dissipation is expressed through a flow of passive energy. Our main result is finding the optimal efficiency and work extracted per cycle of the three-stroke engine with the two-level working body. We reveal that small dimensionality of the working body and a restriction to two-body operations make the engine fundamentally irreversible, such that efficiency is always less than Carnot or extracted work is always less than free energy. In addition, we propose a generalization of many-stroke engine, and in particular we analyze efficiency vs extracted work trade-offs, as well as work fluctuations after many cycles of running of the engine. One of key new tools is the introduced"control-marginal state"- one which acts only on a working body Hilbert space, but encapsulates all the features of total working body-battery system regarding work extraction. For the special cases (e.g. total state being diagonal in energy eigenbasis) the above state reduces to the standard marginal state, although, in general, these two states are distinct, which is a signature of coherences or entanglement between the working body and the battery.

Microscopic thermal heat engine has been recently realised in the lab with a trapped single calcium ion operating as a working body [1], as well as in superconducting circuits [2], nitrogen vacancy centers in diamond [3], and electromechanical [4] settings. Simultaneously, new propositions for realization of heat quantum engines have been put forward in quantum dots [5], nanomechanical [6], cold bosonic atoms [7], superconducting circuits [8,9] and optomechanical contexts [10].
Despite these remarkable experimental successes, as well as vast theoretical studies [11][12][13][14][15][16][17][18][19][20][21][22][23], description of these machines still faces many challenges, such as a proper definition of work and heat, and understanding of the role that quantum correlations and coherence play in the performance of these systems. One of the basic questions that remains largely unanswered is about the optimal performance of possibly smallest quantum engines (see [11,14,23] for early developments).
There are various scenarios, according to which this problem can be formalized. Firstly, we may have continuous regime engines, where the working body is constantly coupled to both heat baths as well as to a work reservoir, or discrete engines, which are alternately coupled to a hot and to a cold bath. Secondly, the work reservoir can be semiclassical -like an external classical field, or quantum -e.g. an oscillator. Thirdly, one can have autonomous machines, or non-autonomous, i.e. these that are externally driven.
Furthermore, one can specify the character of the contact with the heat bath -it may be given by interaction Hamiltonian, or in terms of master equation of GKSL type [24][25][26][27]. Recently, a collisional model of an engine

FIG. 1. A graphical representation of the Minimal-Coupling
Quantum Heat Engine -a micro machine converting heat into work via a working body operating in two-body discrete strokes. Here, the minimal version of the whole class is presented: the lowest dimensional working body (a qubit) and thermodynamic cycle constructed only by three strokes.
with heat baths was also used where the bath is composed of independent systems which one by one interact with the working body [28] (see also [29] for the comprehensive introduction into the topic and [30][31][32] for recent developments). As a matter of fact, this kind of modeling of the contact with bath fits into a recently widespread paradigm of thermal operations [33][34][35][36]. Indeed, the leading idea of the latter approach is that in-stead of sticking to a specific interaction Hamiltonian, one allows for all unitary transformations that conserve energy (either strictly, or on average). In [37,38] efficiency have been optimized over all possible engines with fixed size cold bath.
An important question arises here -what actually means the smallest quantum engine? The simplest answer might be: it is the engine with the working body being an elementary quantum object a two level system [39]. However, if such a two level system is externally driven, then the driving field should be treated as a constituent of the engine. Note that the driving field usually plays two roles -of the driving force, and of the work reservoir. Thus, in order to be sure that our engine is indeed explicitly minimal, or that we control its size, we should consider explicit work reservoir e.g. in the form of quantum oscillator, and use no external driving. In other words, we should consider a fully autonomous setup, with all constituents being explicit quantum systems, as in engines proposed in [15] or [40].
It would be however a formidable task to find an optimal engine in such fully autonomous scenario, as we would need to optimize the efficiency over all possible interaction Hamiltonians with the bath, while even for concrete models with fixed interaction only numerical results are usually available. Indeed, in the literature one usually considers concrete physical models, and evaluates their efficiency and power, rather than searches for an optimal engine. Yet, one can relax a bit the autonomous character of analysed class of engines, allowing for driving which consists of just several discrete steps. In such scenario the search for an optimal quantum engine, though still highly nontrivial, seems less hopeless.
In this paper we attempt to substantially advance the above basic problem by considering the following class of engines, which we call minimal-coupling engines: (i) the time evolution consists of discrete steps, each being an energy preserving unitary acting on two systems only, (ii) an explicit, translationally invariant battery is included -the so-called ideal weight [14,41,42] (see also [43] for the discussion of the physicality of the model). Our engines thus consist of four systems: the hot and cold bath, the working body and the battery. The name minimalcoupling engines stems from our postulate that only two systems are interacting with each other at a time. The postulated translational symmetry is to assure the Second Law and fluctuations theorems [14,41,42].
Among the minimal-coupling engines, we shall consider engines with smallest possible working body -i.e. two level system -as well as the smallest number of strokes, i.e. three ones (note that minimal-coupling engine cannot work with just two strokes). One of our main results is finding the optimal engine among such single-qubit, three stroke engines. As we show, the main challenge which makes this problem highly nontrivial is that such engines are necessarily irreversible, and therefore one cannot apply Carnot argument to find optimal efficiency the efficiency at nonzero work per cycle is strictly smaller than Carnot one.
On a technical side, the difficulty lies in the explicit presence of the battery, so that it is necessary to take into account initial coherences of the battery's state as well as the quantum correlations between working body and the battery that build up during subsequent cycles. We overcome this obstacle by introducing a new objectcontrol-marginal state. While it acts solely on the working body Hilbert space, it equals to the working body marginal state only in special cases (e.g. when the total battery-working body state is diagonal in energy eigenbasis).
With this crucial tool at hand, before we turn into engines, we study thermodynamics of the minimal-coupling scenario. We thus first consider the case of single heat bath and verify that the laws of thermodynamics are satisfied. Remarkably, we find that in such paradigm, the basic role is played by ergotropy [44,45] rather than by free energy. Namely, ergotropy provides fundamental bound on an elementary portion of energy that can be passed from the bath to the battery in single step. Next, we show that the work transferred to the battery equals to the ergotropy change of the control-marginal state rather than the marginal state of the working body.
These tools allow us to find optimal engine among all the single qubit, three-stroke minimal-coupling engines. We give analytical formulas for the optimal efficiency as well as work production per cycle. The optimization is performed over any possible unitaries in any of the three steps, as well as over arbitrary initial joint states of the work reservoir and the working body.
Note that previously qubit discrete engine with just two steps was considered in [14] which (unlike ours) achieves Carnot efficiency at nonzero work production. Yet, unitary transformations over three rather than two systems at a time were allowed, hence it does not belong to the minimal-coupling engine class. Similarly, in [37] a class of engines was considered where two body unitary was allowed for a cooler system, but still three body unitary was applied to hot bath, working body and battery. On the other hand, in [19] only two systems can interact at a time (as in our scenario). Yet, many steps are allowed, and there is no explicit work reservoir. Moreover, only thermalization was allowed in the contact with heat baths.
We compare our optimal engine with a model which is the closest in spirit -namely the Otto engine (considered e.g. in [28,39]). For certain parameter values, the performance of our engine is substantially poorer, which highlights the thermodynamic significance of the dimension of the Hilbert space of the working body. On the other hand, the optimal minimal-coupling engine can be shown to be more efficient in other regime of parameters. This highlights the advantage of full class of energy preserving unitaries over thermalization present in Otto case.
We also address the problem of optimal engine with more steps than three, allowing the working body to bounce between hot bath and battery within one cycle. We show that this does not increase engine's efficiency (while it does increase work production per cycle).
Our considerations take into account a fully quantum scenario, in which coherences and correlations within the working body and the battery might be present. Our reasoning shows that they do not constitute a resource for a cyclic work extraction, i.e. that the optimal efficiency and work production is obtained in absence of coherences. We also analyse fluctuations of obtained work, and show that the (classical) correlations that build up during engine operations led to reduction of fluctuations as compared with the hypothetical case of refreshing the working body in each cycle.
The paper is organized as follows. In Section I we present the class of operations that constitute minimalcoupling quantum heat engines, and we analyze thermodynamic properties of these operations in Section II. In Section III we present results of optimal performance of the engines, and conclude with a discussion in Section IV.

I. MODEL OF MINIMAL COUPLING QUANTUM HEAT ENGINE
Our model of a heat engine consists of four main parts. Hot bath H, which plays the role of the energy source, cold bath C, used as a sink for the entropy (or passive energy, see further in the article), battery B, which plays a role of an energy storage, and a working body S, which steers the flow of the energy between other subsystems (Fig. 1). The whole engine is treated as an isolated system with initial state given by a density matrixρ, and evolving unitarly, i.e.ρ →ÛρÛ † . The free Hamiltonian of the engine is given by: with local terms corresponding to the subsystems. In this setting we introduce the general thermodynamic framework characterized by five defining properties: (A1) Energy conserving stroke operations; (A2) Heat baths in equilibrium; (A3) Explicit battery given by the weight; (A4) Two-dimensional working body; (A5) Cyclicity of the heat engine.
First three define class of minimal-coupling quantum heat engines, where in particular we establish an idea of stroke operations (A1), and specify the environment (A2) and the battery (A3), respectively. We will also assume (A4) for a special case of a minimal engine with twolevel working body, and (A5) to establish the notion of cyclicity of the machine. The first property constitutes the core idea of stroke operations: interactions between working body and other parts of the engine are turned on and off in separated time intervals, so-called strokes. In other words, the unitary evolution of an engine can be decomposed into a product of n unitaries: where the k-th step is an evolution coming from the coupling between working body S and subsystem X k = H, C, B (hot bath, cold bath or battery). Furthermore, in the above decomposition we allow only for energy conserving unitaries. We assume that during each strokeÛ SX k the average value ofĤ S +Ĥ X k is a constant of motion, which is satisfied if This implies that [Û ,Ĥ 0 ] = 0, which constitutes a strict form of the First Law in our model, valid for arbitrary initial stateρ of the engine.
In the framework of stroke operations there are two fundamental blocks from which one can construct thermodynamic protocols, namely a work-stroke and heatstroke (discussed in Section II). The first one is a coupling of working body with battery through which the work is extracted, and the second describing a process of coupling with heat baths (hot or cold), where the heat is exchanged.
Note that the property (A1) does not lead to a fully autonomous engine, i.e. it requires an external implicit system to control the execution of steps. Nevertheless, as energy inside the engine is fully conserved, it is a step forward towards an autonomous machine. In other words, condition (3) expresses the fact that turning on and off interactions does not introduce any energy flow into or out of the system, and thus, work can be defined solely as the change of energy of the battery.

(A2) Heat baths and initial state
Heat baths are taken in equilibrium Gibbs states: where A = H, C and β H = T −1 H < β C = T −1 C are inverse temperatures (throughout the paper we put Boltzmann constant k = 1), and Z A = Tr e −β AĤA is a partition function. In addition we assume that for each step we have a 'fresh' part of the bath in a Gibbs state, uncorrelated from the rest of the engine. As a consequence, the initial state of the engine can be written as: where N is sufficiently large number providing that for each stroke involving a heat bath we have its new Gibbs copy. As a particular realization, later we will consider heat baths as a collection of N harmonic oscillators, where in each stroke the working body interacts only with one of them. Furthermore, in this framework there are no other restrictions on a joint working body-battery stateρ SB . In this sense, the engine is fully quantum, e.g. it can involve entanglement or coherences both on the battery as well as on the working body state.

(A3) Explicit weight battery
In order to define a closed (i.e. energy-conserving) heat engine, an explicit storage system (i.e. a battery) is necessary. The problem how to explicitly introduce battery which is consistent with laws of thermodynamics is not trivial, i.e. it is equivalent to the problem of a proper definition of work in the quantum thermodynamics [11,[46][47][48][49][50][51]. In our proposal we choose a model of the so called ideal weight, recently investigated in research on quantum thermodynamics [14,41,42,52].
In contrast to the approaches where particular dynamics leading to the unitaryÛ SB is proposed explicitly, the ideal weight is defined by imposing a symmetry which it has to obey. Specifically, this is a translational invariance symmetry, which alludes to the intuition that change of the energy should not depend on how much energy is already stored in the battery. It can be expressed in the form: whereΓ is a shift operator which displaces the energy spectrum of the weight, i.e.Γ † Ĥ BΓ =Ĥ B + , and is an arbitrary real constant. As a particular example of the weight model, one can proposed the Hamiltonian of the battery in the form: wherex is the position operator, and F is a real constant. This is analogical to a classical definition of the work via an action of the constant force F , i.e. W = F δx where δx is a displacement of the system. In particular, if we take F as a gravitational force (in a static and homogeneous field), it corresponds to the model of the physical weight. Motivation behind the translational invariant dynamics of the battery is multiple. Firstly, it was proven that work defined as a change of average energy of the ideal weight is consistent with the Second Law of Thermodynamics [14], and that work fluctuations obey fluctuations theorems [41,42]. Secondly, we show that work extraction protocol with explicit weight battery (work-stroke) can be understand in terms of the ergotropy [53], similarly to the well-known non-autonomous work extraction protocols with cyclic Hamiltonians (e.g. [45]). Last, but not least, the translational invariant dynamics of the battery provides a way to define a notion of ideal cyclicity of the heat engine, i.e. an exact periodic running of the heat engine with constant efficiency and extracted work per cycle, despite the obvious change of the battery via charging process, as well as building up correlations with the working body.

(A4) Two-level working body
According to the strict law of energy conservation (3), it is important to stress that in this framework the total free HamiltonianĤ 0 (1) of the engine remains constant during the whole protocol. This is essentially different from non-autonomous approaches with modulated energy levels of a working body by an external control [39]. Indeed, this implicit external system, a so-called clock, is in fact a part of a 'bigger' working body, such that protocols with an energy level transformation of a qubit do not apply to a genuinely two dimensional (i.e. minimal) working body. In contrary, in this framework we introduce a 'truly two-dimensional' working body by the Hamiltonian:Ĥ where ω is the energy gap, |e S is an excited state, and |g S is a ground state. Here, and throughout the paper, we take = 1.

II. THERMODYNAMICS OF STROKES
Having a strict definition of the engine dynamics, in this section we move to its thermodynamics. We start with definition of the effective state of the working body with respect to which we later define all thermodynamic relations, and characterize heat engines. Then, we introduce a definition of heat and work, and show that the First Law is satisfied. Further, a general characterization of stroke operations is provided, namely a work-strokê U SB (coupling to the battery), and heat-strokeÛ SH (coupling to the heat bath). Finally, we analyze a work extraction process in a contact with a single heat bath, where the Second Law of Thermodynamics is verified.

A. Control-marginal working-body state
Analysis of the thermodynamics of the family of minimal-coupling engines relies on the definition of the so-called control-marginal state acting on the Hilbert space of the working body S: FIG. 2. The role of ergotropy (12) and passive energy (13) in thermodynamics of stroke operations. a) Non-cyclic work extraction process between hot bath H and battery B, mediated by a two-level working body S. Maximal energy of the qubit is represented by the volume of the associated square. Interaction with H leads to increase of ergotropy (yellow) and passive energy (purple) of the qubit. Then, ergotropy is transferred to B. As amount of extracted ergotropy from H is smaller for higher energies of the two-level working body, and passive energy is never erased, efficiency of the ergotropy extraction falls down, and the process saturates. b) Cyclic work extraction (heat engine). Passive energy of the qubit is dumped into the cold bath C, which enables cyclic energy (ergotropy) transfer from H to B.
is a kind of control-shift operator, i.e. it translates the battery energy eigenstates according to the state of the system (6). In particular, for a product stateρ SB = ρ S ⊗ρ B , the channel (9) describes a decoherence process (i.e. it preserves diagonal elements and decreases the offdiagonal ones), such that the control-marginal stateσ S can be seen as a 'dephased version' of a working body density matrixρ S . Especially, equalityσ S =ρ S is for diagonal statesρ SB or for product states with diagonal ρ S . Moreover, for non-diagonal stateρ S , the decoherence of the working body depends on coherences in the battery state, such that only for work reservoirs with big enough 'amount of coherences' we can haveσ S ≈ρ S . Below we show that work and heat can be solely calculated from the control-marginal state. This essentially lowers the dimensionality of the Hilbert space, and as a consequence dramatically simplifies the problem. Moreover, transformations of theσ S according to stroke operations (work-and heat-strokes) can be easily parameterized. This makes it possible to define cyclicity of the whole engine and optimize a running of it over the whole set of stroke operations.
We start with expressing basic thermodynamic functions with respect to the stateσ S . Firstly, we introduce an average energy: Notice that [Ĥ S ,Ŝ] = 0, thus the average energy of the control-marginal stateσ S is also equal to the average energy of the system S, i.e. E S = Tr Ĥ SρSB .
The second state function is ergotropy [44]: where the optimization is done over the set of all unitaries acting on the S space. Furthermore, we introduce passive energy, which is a rest energy (i.e. non-ergotropy) of the system: It quantifies locked energy, being the ingredient of the total energy of the system which cannot be extracted through unitary dynamics [53], or with dynamics with the ideal weight (discussed later in the article). States with the whole energy being passive are called passive states. Finally, we define the von Neumann entropy for the stateσ S : and free energy: with respect to the heat reservoir with temperature T . For the two-level working body (8) we represent the stateσ S as: where E S is the energy of the working-body (11) and α is the 'effective coherence', which essentially encodes the information about working body-battery correlations and internal coherences within these subsystems. In general, a non-zero value of α corresponds to the entanglement or non-diagonal product states. Without loss of generality we further assume α to be real, i.e. α = α * , since the phase plays no role in thermodynamics of minimalcoupling engines.

B. First Law of Thermodynamics
Let us consider an arbitrary initial stateρ (5), and protocol described by the unitaryÛ (2). As the starting point, we define the total heat as a change of the average energy of the heat bath (with a minus sign): and work as a change of the battery average energy: From conditions (2) and (3) we obtain the First Law of Thermodynamics: where the left hand side corresponds to the change of internal energy of the working body. Later we will see that above definitions obey the Second Law of Thermodynamics, too. Further, due to the fact that average energy of controlmarginal state (11) is equal to E S = Tr Ĥ SσS = Tr Ĥ SρSB , we can formulate the First Law with respect to the stateσ S as following: C. Work-stroke characterization We begin our considerations with characterization of the elementary work-strokeÛ SB , which describes the coupling between working body and the battery. From the thermodynamic point of view it is the process of storing the energy in battery via the working body, i.e.
where we used an energy-conservation relation (3) and work definition W (18).
In order to characterize the work-stroke, we start with showing that energy-conservation condition (3) and translational invariant dynamics of the weight (6) impose a strict form of the unitaryÛ SB , i.e.
whereV S is an arbitrary unitary operator acting on S, 1 B is the identity operator acting on B, andŜ is given by Eq. (10). This leads us to the following theorem (see Section C of Appendix): Theorem 1. For a transitionρ SB →ρ SB = U SBρSBÛ † SB , with energy-conserving (3) and translational invariant (6) unitaryÛ SB , the work is equal to: Furthermore, according to this operation, controlmarginal stateσ S transforms unitarly as follows: Therefore, we see that the work stored in the battery can be calculated solely from the control-marginal statê σ S . Moreover, the equality (23) reveals that work is equal to a change of the ergotropy of the control-marginal state ∆R S (12), where change of the passive energy, likewise the entropy is zero, i.e. ∆P S = ∆S S = 0. Thus, we refer to this process as ergotropy storing. In particular, the maximal value of the work which can be extracted from the stateσ S is given by its initial ergotropy R S , such that W = R S , and we refer to this extremal case as a maximal ergotropy storing.
One should notice that Eq. (23) and (24) make the work-stroke equivalent to non-autonomous dynamics of an isolated system in a stateσ S driven by the cyclic Hamiltonian [45,53]. The only difference relies on the fact that stateσ S is affected by the state of the work reservoir (e.g. coherences and correlations) (9), and in generalσ S =ρ S . Nevertheless, later we optimize heat engines over cyclic evolution of an arbitrary stateσ S , thus our results also include the ideal work reservoirs (i.e. with big enough amount of coherences) for whichσ S =ρ S , as in a conventional non-autonomous approach.
Finally, we stress that the result given by Eq. (23) is valid for an arbitrary finite-dimensional Hilbert space of the working body, and not only for the two-level system, which is generally discussed in this article (see A4).
1. An illustration: Ergotropy vs average energy Let us think for a while about the conventional Carnot or Otto cycle [39] for a two level working body, composed of energy level transformations and thermalization processes. There, work coming from adiabatic segments of the cycles is interpreted as a change of the average energy of the qubit, i.e. δW = −∆E S , and not as a change of its ergotropy (for which we have ∆R S = 0). In the light of the above results, this apparent contradiction can be resolved if we treat qubit and external control (i.e. a clock) autonomously, as a single and bigger working body. In this case, a change of the average energy of a qubit should be equal to the change of ergotropy of the total working body (i.e. the qubit and the clock).
As an example, energy level transformation of a qubit in N discrete steps, such that ω 1 < ω 2 · · · < ω N , can be modeled by a total Hamiltonian of the qubit and clock given byĤ = kĤ k ⊗ |k k| withĤ k = ω k |e e|. Transitions of clock states |k induce here a transformation of the energy gap of the qubit in accordance with the following eigenstates:Ĥ |e |k = ω k |e |k . However, a change of the energy level resulting from a clock transition |k → |k + 1 is in fact a permutation of populated and unpopulated levels of the working body, which is always associated with a (positive or negative) change of its ergotropy, in accordance to the relation (23).

D. Heat-stroke characterization
The second elementary block of minimal-coupling engines is the heat-strokeÛ SH , which correspond to the coupling between working body and heat bath with inverse temperature β H . Firstly, we would like to stress that (in analogy to the work-stroke) a change of the energy of the working body corresponds here to the heat (17): whereτ H is a Gibbs state (4), and we used a heat definition Q (17). Moreover, a transformation of the statê ρ SB via heat-stroke, i.e. a channel: is a thermal operation [36]. Further, one can show that corresponding transition of theσ S state is the following (see Section B of Appendix): In particular, for the two-level working body (Eq. (16)) the thermal operation can be parametrized as follows [54]: such that λ ∈ [0, 1] and γ ∈ [0, (1 − e −βω )(1 − λ)] (up to an arbitrary phase). The special case λ = 1 refers to an extremal thermal operation, which will play a special role in optimal minimal-coupling heat engines.
Furthermore, the heat exchanged through this process can be expressed as: such that Clausius inequality is satisfied, i.e.
where change of the entropy is defined with respect to the stateσ S (14).

Ergotropy extraction
As we saw in the previous section, charging the battery is fundamentally connected with changes of ergotropy of the working body. This property is crucial for the whole thermodynamics of minimal-coupling engines. It leads us to the fundamental question: How to extract ergotropy from the heat bath in order to store it later in the battery?
Firstly, we would like to present the following general relations: Proposition 1. In the heat-stroke, extraction of ergotropy is accompanied by an increase of the passive energy and decrease of the free energy: We refer the reader to Section E and H of Appendix for the proof of the above and Theorem 2 below. The main conclusion from the above proposition is that ergotropy extraction cannot be achieved without accumulation of the passive energy (31). Specifically, it prevents for unlimited extraction of work from the single heat bath, since otherwise pure extracted ergotropy from the heat bath might be fully stored in the battery, and then the working body would come back to the initial state, and the whole process could be repeated. Secondly, from the inequality ∆F S < 0 it follows that for ergotropy extraction Clausius inequality (30) is never saturated. This imposes limitations on the total amount of possible work extraction and shows that thermodynamics of minimalcoupling heat engines is fundamentally irreversible, as it is discussed in more details in the next section.
Next, we find the maximal value of ergotropy which can be extracted in the heat-stroke: Theorem 2. [Optimal ergotropy extraction] In the heat-stroke, the optimal ergotropy extraction is given by where is an initial ergotropy of the state. The optimal value is achievable by the extremal thermal operation (λ = 1).
Formula (33) determines the range of parameters of the initial state (i.e. E S and α) for which ∆R S is nonzero. In particular, necessary condition for positive ergotropy extraction is which is also a sufficient condition when there are no coherences in the initial state (i.e. when α = 0). As we see from (33) and (34), ∆R max S is a decreasing function of the initial energy E S . Moreover, for fixed E S , the change of ergotropy is maximised for the stateσ S with no initial coherences (i.e. α = 0). This is because the optimal ergotropy extraction is performed by the extremal thermal operation for λ = 1, which, in agreement with (28), destroys all coherences. However, final ergotropy for the extremal process is the same for every α, namely Remark 2.1. Notice that due to the condition (35) one can show that i.e. ergotropy extraction is possible if energy gap of the qubit is smaller than Landauer's erasure energy.

E. Work extraction process
Now we are ready to combine those two thermodynamic processes, ergotropy extraction via heat-strokê U SH and ergotropy storing via work-strokeÛ SB , in order to extract work from the single heat bath by a combina-tionÛ SBÛSH .
As an extreme example of such a process, the maximal value given by Eq. (33) can be extracted from the heat bath H, and then stored in a battery B, which corresponds to the extracted work equal to W = ∆R max S . However, any positive ergotropy extraction ∆R S > 0 via the first, heat-stroke, is unavoidably accompanied with passive energy accumulation ∆P S > 0 (31). It is a crucial property since this additional passive energy corresponds to a dissipation of the working body state, such that next ergotropy extraction has to be less efficient or even impossible. In other words, repetition of the work extractions (via pair operationsÛ SBÛSH ) has to stuck at some point. This idea is graphically represented in the Fig. 2 (a). It is nothing else like another formulation of the Second Law: work extraction from the single bath cannot be free, i.e. without any change in a state of the working body. Here, irreversible change is quantified by the accumulated passive energy, what means that the initial small amount of it (passive energy) can be treated as a resource used for extraction of work from the bath.

Optimized work extraction
To be more precise, let us consider a work extraction process through the sequence of 2n stroke operations: For this we are able to prove (see Section G 5 of Appendix) the following: SH we have positive ergotropy extraction (i.e. ∆R S > 0), and for any work-strokeÛ (k) SB we have positive ergotropy storing (i.e. W > 0), then the maximal work which can be extracted is equal to , and E S is the initial average energy of the working body. The optimal process is achieved if all heat-strokes are given by the extremal thermal operations and all work-strokes are the maximal ergotropy storings.
Remark 2.2. Note that, as discussed before, the assumption of positive ergotropy extraction in the first step enforces the inequality (35), hence n > 0 and W max > 0.
In particular, for two subsequent optimal work extractions, we have: where work stored in the battery via k-th step is equal to S . This formula quantifies the previous observation that repeated work extraction is less and less efficient due to the accumulation of the passive energy (see Fig. 2 (a)). In addition, it is worth to notice that maximal value of the extracted work W max is neither enhanced nor diminished by the effective coherence α. This, as we show later, is not true for cyclic work extraction.
This example emphasizes that a small dimensionality of the two-level working body makes work extraction process only possible through a finite number of strongly coupled steps (i.e. ergotropy extractions). Indeed, without access to additional energy levels or tripartite operations, one cannot split the whole protocol into infinitesimal steps (like in a conventional Carnot cycle) where in each of them dissipation of the working body is minimal. In contrary, truly two-dimensional working body operating in strokes can only extract work through a strong and irreversible operations, which is justified quantitatively in the following section.

Work and free energy
For stroke operations, in Appendix H we formulate the Second Law in a more familiar way in terms of nonequilibrium free energy (15) of the control-marginal state σ S . For any combination of strokesÛ SH andÛ SB it holds This is true whenever change of free energy is positive or negative, however, from the strong inequality (32) valid for arbitrary ergotropy extraction, one can further show the following: For a process where ∆F S < 0 and initial ergotropy of the working body is zero R S = 0, the maximal extracted work is always smaller than change of its free energy, i.e.
Remark 2.3. The assumption R S = 0 implies that work is solely extracted from the heat bath. In other case (where R S = 0), this initial value can be stored in a battery without any coupling to the heat bath, and then and only then work can be equal to W = −∆F S .
Inequality (41) imposes limits for the maximal work extraction which is less than free energy. Furthermore, this reveals the intrinsic irreversibility of stroke operations. Literally, if one consider a forward process with ∆F f < 0 and a backward process with ∆F b = −∆F f , then from (40) and (41) follows that extracted work W f is always smaller than energetic cost of returning to the initial state, i.e. −W b > W f . In other words, the cyclic process with ∆F = 0 has always W < 0 (except the trivial identity process where W = 0) which is another statement of the Second Law.

Free energy vs ergotropy
All these observations give us here, in the framework of stroke operations, a natural interpretation of the difference between two state functions: free energy and ergotropy (see also [44]). It is seen that the maximal value of the work extracted via the work-stroke is limited by the ergotropy of a system, i.e. W = −∆R S . Without any access to the additional heat bath, after extracting all ergotropy, the process cannot be repeated, and the maximal value of the work is restricted to the initial ergotropy of the the working body. However, a protocol with the access to the heat bath can be repeated, and then the total extracted work can be much larger, while bounded by the change in free energy, i.e. W < −∆F S (41).
In other words, if we consider a particular transition of the working body with fixed change of the entropy ∆S S and energy ∆E S , then the work is bounded by W ≤ T ∆S S − ∆E S . However, for the stroke operations, flow of the energy (from heat bath to battery) is limited by the ergotropy of the system, which for a qubit is naturally bounded by its energy gap, i.e. R S ≤ ω. Hence, the working-body ergotropy is a 'bottleneck' of the whole process. As a consequence, a variation of the temperature T effectively changes the number of possible steps through which the battery can be charged (or discharged) via elementary portions, such that the sum of them cannot exceed the limit equal to −∆F S .

III. THERMODYNAMICS OF MINIMAL COUPLING QUANTUM HEAT ENGINE
Now we turn to minimal-coupling quantum heat engines, i.e. a cyclic work extraction within our paradigm of stroke operations. One of the most important characteristic of the engine is an efficiency. It is defined as where Q H is a (minus) change of average energy of the hot heat bath (17), i.e. a net input heat. Secondly, we consider also an extracted work per cycle W (18) and refer to it as a work production P (to elucidate that it characterizes a cyclic process). Then, we have to define what we mean by cyclic running of the engine.
(A5) Cyclicity of the heat engine Cyclicity of the heat engine is simply defined as a constant efficiency η and work production P in each cycle of the machine described by unitaryÛ (2). Two assumptions are made in order to ensure it in this theoretical framework. The first one is about refreshability of heat baths (5): in each stroke the working body couples to an uncorrelated part of a heat reservoir. Secondly, we impose a translational invariance on the battery (6).
While the assumption of the 'big heat baths' (which do not change during running of the engine) is natural and convenient, the work reservoir cannot stay in the same state by definition (i.e. it continuously accumulate an energy), and since it is a single system, it has to additionally correlate with the working body, too. Nevertheless, the remarkable feature which comes from the translational invariant battery (A3) (and refreshable heat baths (A2)) is that work and heat are solely defined with respect to the control-marginal stateσ S (see Eq. (23) and (29)). Moreover, its transformations during workand heat-strokes are independent of the state of the surrounding (Eq. (24) and (27)). This allows us to easily ensure the ideal cyclicity of the engine by demanding: where unitaryÛ (2) describes the evolution during a single cycle of the engine. In other words, the work reservoir given by the ideal weight, in connection with refreshable heat baths, makes it possible to distill a cyclic object, i.e. a control-marginal stateσ S , which enforces a periodic operation of the whole engine, and simultaneously is able to include changes of the battery state and formation of the correlations.
Previously, we have seen that with an access to a single heat bath, a working body cannot extract periodically work due to the accumulation of the passive energy, or, in other words, for a cyclic process with single heat bath W ≤ 0. Thus, the only way to release passive energy and turn back working body to its initial state is by exploiting another resource, e.g. a second, colder heat bath. Below we show that for some range of temperatures (hot and cold) the transition releasing all the passive energy is possible and working body is able to close a cycle after the positive work extraction (see Fig. 2 (b)).
All of these observations identifies very simple role of three main parts of the minimal-coupling heat engine: (i) Hot bath is used for ergotropy extraction (as a side effect, passive energy is extracted as well); (ii) Battery is used for ergotropy storage; (iii) Cold bath is used for releasing passive energy.
However, fundamental irreversibility of stroke operations, expressed by (41), also has an impact on the maximal efficiency. Indeed, the maximal efficiency given by Carnot efficiency η C is only attainable for reversible engines. Thus, for step heat engine we always have If Carnot efficiency is not achievable for minimal-coupling quantum heat engine then natural question is how close it can get? We discuss it in the next section.
A. Three-stroke heat engine The minimal step heat engine is the one which consists of only three strokes, i.e. with hot bath H, battery B and cold bath C. In this case the emphasize above roles of all of the engine elements (i-iii) is unique only if the efficiency of the engine has to be positive. From this follows one of the main result of this work (see Section F of Appendix for details of the proof): Theorem 3. An arbitrary three-stroke heat engine with dynamics obeying conditions (A1-A5) is able to operate with positive efficiency only if Furthermore, there exist a unique protocol which simultaneously operates at maximal efficiency η 1 and maximal work production per cycle P 1 given by: This protocol consists of the extremal thermal operations with baths and maximal ergotropy storing with battery. For this protocol the working body stateσ S (16) after each stroke is diagonal (α = 0), and its energy transforms as Sketch of the proof. The basic idea is that the maximal efficiency η 1 arises through optimization, for given bath temperatures and energy splitting of a two-level working body, over all energies E 0 S of the working body (i.e. the energy just before the ergotropy extractionÛ SH ), as well as over all possible unitariesÛ SH ,Û SC andÛ SB , such that η is maximal and working body comes back to its initial state.
In particular, the maximal ratio W/Q H can be achieved for the extremal ergotropy extraction and ergotropy storing, and equals to W/Q H is a decreasing function with respect to the initial energy E 0 S . This suggests that for E 0 S = 0 we obtain the maximal possible ratio, however, on the other hand it does not provide that the cycle of the engine can be closed for given bath temperatures β H , β C and splitting ω.
Indeed, after the extremal ergotropy extractionÛ SH and the maximal ergotropy storingÛ SB , the energy E S 2 of the working body has an additional contribution given by the passive energy coming from the hot bath, i.e.
where P S (E 0 S ) is once again a decreasing function with respect to E 0 S . Finally, since working body has to come back to the initial state with energy E 0 S , it must release all accumulated passive energy through the cold bathÛ SC , however, this operation is more efficient for states with higher energy. In other words, more passive energy accumulated in a stateσ S helps with closing the cycle.
Then, we have a trade off between these two: higher ratio (48) is for smaller initial energy E 0 S and/or extremal processes, and closing the cycle is more efficient for higher energies E 0 S and/or non-extremal processes. The solution of this optimization problem leads to the unique protocol operating at the maximal efficiency η 1 (and P 1 ).
Efficiency η 1 is a function of two bath temperatures and energy gap ω. For a fixed ω, we can compare efficiency η 1 with Carnot efficiency η C , which is presented in Fig. 3. In infinite temperature limit, the maximal efficiency of step engine tends to the Carnot's one: η 1 → η C . On the other hand, if we fix temperatures and start to modulate the energy gap ω of the working body, we observe a trade off between the efficiency η 1 and the work production P 1 (see Fig. 4). Moreover, for ω → 0, the engine reaches Carnot efficiency, i.e. η → η C , but operates at zero power P 1 → 0. It is an interesting optimization problem to control a trade off between the efficiency and extracted work of an engine belonging to minimalcoupling engines class by changes of the qubit energy gap which, fixed at the beginning, later remains constant during the whole protocol. The unique optimal process with energy transformation (47) forces the stateσ S to have no coherences at the beginning of each step, α = 0. In this sense it leads to the conclusion that coherences have diminishing role both on the efficiency and the extracted work per cycle of minimal-coupling engines. The intuition behind this behavior is the fact that those coherences can be only created through the work-stroke by unitaryV (24) (and it costs additional energy), however, heat baths can only dump them (28).

Comparison with the Otto cycle
How well does the performance of the optimal engine within minimal-coupling engines class rank when compared to the performance of schemes taking advantage of higher dimensionality of the working body? We address this question comparing our model with that of a qubit working body in the Otto cycle, where work is performed by external field. There, the energy levels of the qubit are 0 and 1 ∈ { C , H }, H > C > 0 , and the engine works in 4 strokes: (i) shift of excited energy level C → H , (ii) thermalization in contact with hot reservoir at inverse temperature β H , (iii) shift of excited energy level H → C , (iv) thermalization in contact with cold reservoir at inverse temperature β H . In stroke operations framework, the Otto cycle on a qubit with time- dependent Hamiltonian can be equivalently described on a qutrit working body with energy levels 0 , C and H .
As a figure of merit in our comparison we choose the work production per cycle expressed in units of the energy gap H − C , i.e. the gap modulated via the adiabatic segments (i) and (iii), during which the work is extracted. In this way, the comparison between the engines is based on how effectively they use the energy gap of the working body to extract work.
For the Otto engine, we arrive with maximal work production given by P Otto for a fixed y = β C /β H , where optimization is performed over parameter z = β H C , and we exploit the fact that In Fig. 4 we see that, while both engines reach the same Carnot efficiency at zero power per energy gap, the minimal three-stroke engine performs better than the Otto engine for a region of high efficiencies. In principle, for the ratio β C /β H high enough, the minimal threestroke engine surpasses the bound 1/2 of the Otto engine. The reason for this is that we allow for arbitrary thermal operation to describe an interaction between the working body and a bath, while Otto engine is restricted to thermalisation. Nevertheless, the fact that the working body in the Otto cycle can be effectively defined on a higher, three-dimensional space, is reflected in higher values of power per energy gap for smaller efficiencies.

B. Many-stroke generalization
Analysis of the many-stroke engine is much more complicated then the simplest three-stroke one. The reason for this is that the roles of different strokes (i-iii) of a minimal-coupling engine are no longer unique. In this case, it is still valid that any positive efficiency requires performing at least one ergotropy extraction, ergotropy storing and releasing passive energy, however, many-stroke protocol is able to involve also other operations, like spending work or heat-flow from the system to the hot bath.
Here we consider the most natural generalization of the three-stroke engine to many-stroke engine, given by the unitarŷ where we assume that any hot bath stepÛ (k) SH is an ergotropy extraction (i.e. ∆R S > 0) and any work-strokê U (k) SB is ergotropy storing (i.e. W > 0). It is fully analogous to the work extraction protocol from the single heat bath which we have considered previously (37), however, here the cold bath operationÛ SC appears at the end in order to make the process cyclic. In other words, we investigate a subclass of minimal-coupling engines which are hybrids of engines performing work extraction from a single heat bath, described in the Fig. 2 (a), and the simplest cyclic three-stroke work extraction presented in the Fig. 2 (b). With such a definition of the many-stroke engine we are able to generalize the previous result, where the three-stroke engine reduces to the special case.
Firstly, temperature regimes at which the engines can operate with positive efficiency generalize to (see Section G of Appendix for details of the derivations). Further, maximal efficiency and maximal power are given by: where a H,C = e −β H,C ω . As previously, the optimal protocol is the one where all heat-bath strokes are the extremal thermal operations and any work-stroke is the maximal ergotropy storing process, such that energy of the working body in each step is given by formulas: where Z n = 1 + e −(nβ H +β C )ω and k = 1, 2, . . . , n.
One can further show that η 1 < η m (for m > 1), i.e. the simplest three-stroke engine is the one with the maximal efficiency. However, the work production P n of an engine increases with number of steps, i.e. P n > P m (for n < m). Once again we observe here a thermodynamic trade off between efficiency and power (see Fig.  5), which in this case is related to how many work extractions we perform within a single cycle of the engine. In other words, we see that increasing number of work extractions within a cycle gives us more work (i.e. higher power), but transformation of heat into work is less efficient.
We prove that three-stroke engine has the maximal possible efficiency within the class of many-step engines defined by Eq. (52). Nevertheless, the question what is the optimal two-level minimal-coupling engine with arbitrary number of steps remains open.

Realization
In this section we propose a particular unitaryÛ n which realizes the maximal efficiency η n and power P n . It allows us to analyze the behavior of the engine over many cycles.
Firstly, we assume a specific form of the heat bath Hamiltonians. We propose a well-known model of a heat bath given as a collection of harmonic oscillators, i.e.
such that in each from N steps, working body couples to a single oscillator. Then, the maximal efficiency η n can be realized through the unitary: where extremal bath operations are given by the following swaps of states: for k > 0. Analogously, the maximal ergotropy storing via battery operationÛ SB is realized by: where |k B is an eigenstate of the HamiltonianĤ B with eigenvalue kω. For suchÛ n there exist a unique diagonal stationary state of the working bodyρ S = Tr B [ρ SB with energy E 0 S , such that i.e. working body turns back to the same energetic state (see section I of Appendix). For this stationary state, engine operates with the maximal efficiency η n and work production P n . What is more, after many cycles arbitrary initial diagonal stateρ SB converges to the stationary one, i.e.

Work fluctuations
Let us now concentrate on the optimal threestroke minimal-coupling engine with a unitaryÛ 1 = U SCÛSBÛSH (57) and stationary state of a qubit with energy E 0 S (47). Periodicity of an engine means that cycle after cycle the marginal state of a working body during any step is the same (in this caseσ S =ρ S ). Specifically, any quantity solely dependent on the state of a working body is also stationary, like the efficiency η 1 and the extracted work P 1 .
Nevertheless, correlations between battery and working body are not periodic and affect the final state of the battery. In fact, thanks to the cyclicity of the working body we are able to extract information encoded in these correlations. Basically, we can compare final state of a battery, firstly, after N cycles of running of the three-stroke heat engine, and secondly, after the charging process of a battery through N uncorrelated qubits, such that each of them was subjected to the same workstroke operationÛ SB (58). Moreover, we take uncorrelated qubits in the same statê with energy E 1 S (47), equal to the marginal state of a working body just beforeÛ SB coupling during running of the three-stroke engine.
Then, we initialize battery in a 'zero state' |0 0| B and consider its final state after N = 2n cycles of the threestroke engine with unitaryÛ 1 =Û SCÛSBÛSH : (for even number of cycles only even eigenergies, i.e. 2kω, of the battery are occupied), and compare it with a battery charged through 2n independent couplingsÛ SB with qubits in a stateˆ S : The formulas for functions P n (k) andP n (k) are presented in section I of Appendix. From the conservation of the energy, the total extracted work is equal in both cases, i.e. W = Tr Ĥ BρB = Tr Ĥ Bˆ B = 2nP 1 .
However, the stateρ B (64) is different from the statê B (65) due to the accumulated correlations through repeated coupling with a single working body. As it is seen in the Fig. 6 created correlations between working body and battery have positive impact on fluctuations, i.e. the work distribution is more narrow then the one resulting from coupling with collection of uncorrelated systems.

IV. CONCLUSIONS AND DISCUSSION
The main result of this work is an establishment of new fundamental limits of quantum heat engines performance, which similarly to Carnot's result are independent of microscopic details of the engine dynamics. The new bounds comes from the additional restrictions on realization of heat engines via two-dimensional working body, operating only in two-body discrete strokes. This leads to the intrinsic irreversibility of thermodynamics processes, and as a consequence, a minimal-coupling micro engine defined in this way operates at efficiency smaller that of Carnot engine.
This opens a new field of research on minimal micro engines, i.e. restricted by the dimension of working-body and/or heat baths, or the number of subsystems that can interact with each other at a time. In particular, in order to obtain a better understanding of the roles which multi-body interactions and dimensionality of the system play in behavior of engines, one could diverge from our description by gradually taking into account multi-body interactions, and/or designing protocols for low-dimensional qudits acting as the working body. The challenge in the latter would be to find an optimal protocol, as we have done for the minimal-coupling engine. The difficulty of this task comes from the fact that structure of the set of thermal operations becomes complex quickly with increasing dimension of the working body, and different thermal operations may be needed for a specific choice of energy splittings of system Hamiltonian, temperature of environment and initial state of the working body in order to optimally extract work in a cyclic process. It would be of primary interest to establish an understanding of maximal ergotropy increase on the system possible in this general case.
Optimal usage of minimal-coupling engines with twolevel working body should also be further investigated. One would expect that increasing number of steps in a cycle can lead to improved efficiency of these engines. Therefore, studies of cycles which do not belong to the subclass of multi-step engines characterized in this article should be carried on. Especially, the reversed heat-flows from the heat baths and partial usage of the energy of the battery may turn beneficial for the operation of those engines.
Finally, the tools used in our analysis, control-marginal stateσ S (9) and ergotropy R S (12), deserve separate discussions of their own. Identification of work extractable from a system with its ergotropy is a consequence of the ideal weight model of the battery. As it is shown, this is equivalent to the cyclic dynamics of an isolated system driven by an external force, what makes a strong connection between theoretical frameworks with implicit and explicit work reservoirs. Nevertheless, the definition of the control-marginal state includes into description additional effects coming from coherences and correlations, which is absent when a battery is treated implicitly. Moreover, the ideal weight applied for heat engines as an energy storage naturally establishes the notion of cyclicity. Remarkably, this holds even in the presence of coherences and formation of correlations between the working body and battery, which occurs during cyclic operation of an engine. Studies of different possible notions of cyclicity, together with establishment of necessary and sufficient conditions for ergotropy to be a measure of extractable work, constitute subject for future research.

Appendix A: Preliminaries
The full information of the thermal engine in the framework of stroke operations is encoded in the joint battery and working body state:ρ where in general it is assumed a continuous and unbounded energy spectrum of the battery. However, the average quantities, like extracted work or exchanged heat, can be solely deduced from the effective, so called control-marginal state, defined as:σ is a unitary operator, andΓ is a shift operatorΓ For the two-level working body we further represent the stateσ S aŝ and describe it by corresponding quantities, i.e. energy, passive energy and ergotropy: where r = z 2 + |α| 2 ∈ [0, 1] and z ∈ [−1, 1].
is a thermal operation. In general thermal operation can be parameterized as: where the second sum is over all frequencies ω mn = m − n such that ω mn = ω ij .

Transformation of the control-marginal state
We would like to analyze how stateσ S evolves according to the heat-stroke. In general the total state of system and battery evolves as: According to the relation (B3), we obtain: (B5) Finally, the corresponding stateσ S transform as: (B6) In particular, for the two-level working body we obtain In our framework such a transformation corresponds to the hot bath step H or cold bath step C, and can be fully characterized by the parameter λ ∈ [0, 1] and such that where a k = e −β k ω and k = H, C. The phase δ can be arbitrary, however, it plays no role in thermodynamics of the engine since quantities given by Eq. (A6) depends only on the magnitude of the off-diagonal elements. That is why we further assume that α is real, i.e. α = α * , and δ = 0. Furthermore, one can easily show that heat defined for this process is equal to: Appendix C: Work-stroke characterization

Translational invariance and energy conservation
We start with showing that any unitaryÛ SB which obeys conditions whereΓ is the shift operator (A4), can be expressed in a general form: where V ij are some complex entries such that the following operator is unitary. In order to prove this, let us consider a general energy conserving unitary, such that it is block-diagonal in energy basis, and within each energy block E we have arbitrary unitary V ij (E). By following calculations one can show that: By means of operatorŜ (A3), the unitaryÛ SB can be rewritten in the form: where 1 B is the identity operator acting on battery Hilbert space.

Transformation of the control-marginal state
Let us now analyze how stateρ SB transform under the action ofÛ SB operation, i.e.
From this follows that transformation of the corresponding stateσ S is given bŷ

Work and ergotropy
We prove that the change of the average battery energy (i.e. work W ) is equal to the change of the ergotropy of the stateσ S . From the definition of work and the structure of unitaryÛ SB (C5), we have: where we used a fact that [Ĥ S ,Ŝ] = 0 (for simplicity we omitted the identity operators). SinceĤ S −V †Ĥ SV is operator acting only on the system Hilbert space S, we obtain finally: where the last equality follows from the fact that any change of the energy via the unitary transformationV is equal to the change of the ergotropy of the state. In particular, if we consider a two-level system (A5), then the maximal work which can be extracted is equal to: where we put ∆R S = R S − R S . To summarize, for the heat-stroke we present following relations: and analogous for the work-stroke: It is seen that quantities like exchanged heat Q and work W solely depend on the stateσ S , and we derive the rules how it transforms under stroke operations, where Λ[·] is arbitrary thermal operation, andV is arbitrary unitary operator.
Especially it shows that arbitrary function f (W, Q) (e.g. efficiency or extracted work per cycle) can be derived solely from the evolution of theσ S . In particular, any optimization problem based on the function f (W, Q) can be defined on the domain of all possible transformations of the stateσ S .

Appendix E: Characterization of the ergotropy extraction process
The following section is about ergotropy extraction process via the heat-stroke, i.e. coupling with heat bath in inverse temperature β. In this section a = e −βω (for simplicity we also put ω = 1), and we refer to quantities given by Eq. (A6) and state transformation (B6).

Ergotropy extraction and passive energy accumulation
We would like to show that whenever a < 1, we have In order to prove this, firstly we reveal that Let us assume that z > 0 (B9), what leads us to the formula: Then, it is enough to observe that |z | < |z|, since whenever what according to the assumption z > 0 implies Eq. (E2). The conclusion is straightforward if z > 0 (note that z = 0 since otherwise z ≤ 0), i.e. in this case we obtain: since |z| ∈ [0, 1]. On the other hand, for z < 0 we have following formula: The maximum value of this difference is given by: However, above minimum is achieved for λ = 1 and a = 1, and equal to −2|z|, what reveals that |z | ≤ |z|. Furthermore, according to our assumption that a < 1, we proved that |z | < |z|. Finally, whenever ∆P S ≤ 0 it implies z ≤ 0 (E2), and in this case ∆R S can be rewritten in the form: For the state without coherences, i.e. α = 0, it implies that α = γα = 0, and we have r = |z |. This leads us straightforwardly to conclusion that whenever On the other hand, for coherences we have the following chain of implications: Finally, from (E9) and (E10) follows (E1).

Maximal ergotropy extraction
Let us consider a positive ergotropy extraction, i.e. ∆R S > 0. From the previous considerations we obtain where the last inequality implies that and we used abbreviation z = z + λh (B9). The last inequality in the above formula means that the initial state is less excited than the Gibbs state.
In the following consideration we assume that h > 0, as a necessary condition for the positive ergotropy extraction. We will prove that for all such protocols, the maximal value of ∆R S and minimal value of ∆P S is for λ = 1.

a. No initial coherences (α = 0)
Maximal change of the ergotropy Due to the fact that z = −|z|, the initial state has no ergotropy, i.e. R S = 1 2 (z + |z|) = 0. In accordance, the change of ergotropy is solely dictated by the final value: and it is positive whenever z > 0, what is fulfilled if and only if λ ∈ (λ 0 , 1] (whereλ 0 = − z h ). If this is true, we can then rewritten formula (E13) as follows what indicates that it is an increasing linear function with maximum at the point λ = 1, and given by max λ∈(λ0,1] Minimal change of the passive energy.
Similarly, a change of the passive energy for the diagonal state is given by what in the regime where ∆R S > 0 gives us which is a decreasing linear function, and reaches the minimum in the point λ = 1: With initial coherences (α = 0)

Maximal dumping factor
Firstly, we calculate a derivative with respect to γ: From that follows that the ratio is maximal for the highest γ for any λ, thus we further only consider an extremal case where γ = (1 − λ)(1 − aλ) (see (B8)).

Maximal change of the ergotropy
The derivative of ∆R S with respect to λ is equal to Thus, it is an increasing function whenever Let us suppose that exist such λ 0 that above inequality is satisfied. Then, the derivative of the left hand side is positive, i.e. d dλ ∆R S λ=λ0 > 0, and the derivative of right hand side is negative, i.e. d dλ (A − λB) λ=λ0 = −B < 0. This implies that this inequality is also satisfied for all λ > λ 0 , and as a consequence ∆R S is an increasing function with respect to λ in the interval λ ∈ [λ 0 , ∞).
Next, we solve the equation ∆R S = 0, what gives us Later we use an abbreviation: The derivative in a point λ 0 is then equal to: and it is seen that However r = √ z 2 + α 2 > |z| ≥ −z, thus we proved that ∆R S > 0 whenever λ ∈ (λ 0 , 1], and in this interval d dλ ∆R S > 0. Finally, it shows that maximal positive value of ∆R S is in the point λ = 1, and it is equal to: where R S = 1 2 (z + r) is initial ergotropy of the system, and ∆R 0 is given by Eq. (E15).
Minimal change of the passive energy Next, we analyze the function ∆P S . The derivative with respect to λ is equal to: what gives us two intervals of monotonicity, i.e.
Let us firstly exclude situation where z + h < 0, which implies that ∆R S ≤ 0 (see proof in the next subsection). Then, we consider an opposite case where z + h ≥ 0: were we used a fact that r − z − 2h < 0 in order to have λ 0 < 1. We can further estimate that However, r > |z| what finally proves that for λ ∈ (λ 0 , 1] the minimal value of ∆P S is in the point λ = 1, and equal to: where ∆P 0 is given by Eq. (E18).

c. Positive ergotropy extraction
We would like to summarize conditions for positive ergotropy extraction. Whenever α = 0 or α = 0 the necessary condition is that h > 0 from which follows that z < − 1−a 1+a . Specifically for the case α = 0 we have a constraint: what in terms of the energy E S = ω 2 (1 + z) is equivalent to For the case α = 0 the necessary condition is One can show that also for the case α = 0 it is necessary that z + h > 0 (i.e. z < − 1−a a ), since in other case we have where we also used a fact that r ≥ |z| = −z. This proves that (E35) is valid for arbitrary α. Further, we can derive bounds on the parameter of the initial state 1 ≥ z ≥ −1 that enables positivity and convexity of ergotropy extraction ∆R (Fig. 7). From the definition of ergotropy change (E8), and putting α 2 = B(1 − z 2 ), where B ∈ [0, 1], direct calculation leads to the conclusion that the second derivative is non-negative iff which is satisfied in two regimes, i.e.
Further, one can show that λ 0 (E23) is a monotonously increasing function of z, and therefore achieves maximum at z = 1. Therefore, the maximum z allowable is calculated from the condition λ 0 = 1, and we have Appendix F: Three-stroke engine

Order of steps
Three-step engine is composed of three unitary operationsÛ SH ,Û SC andÛ SB . The state of the working bodyσ S can be parametrized by the energy E and coherence α, such that it evolves as follows where we do not yet assume in which order we have used operations. For each energy E n one can define corresponding ergotropy R n and passive energy P n , such that E n = R n + P n . Let us write changes of the working body energy (ergotropy and passive energy) for each step: where the first inequality is necessary in order to have a positive efficiency. From the conservation of state functions we have further The labels H and C at that moment just distinguishes between two different heat baths and so far we do not assume that T H > T C . We see that ∆R H S > 0 or ∆R C S > 0, what implies that ∆P H S = 0 and ∆P C S = 0 (see Eq.(E1)). Without loss of generality we can put ∆P C S < 0, what further implies that ∆R C S ≤ 0, and as a consequence ∆E C S < 0. On the other hand, we conclude also that ∆R H S > 0, ∆P H S > 0 and ∆E H S > 0. Furthermore, we have a freedom to assume that E 0 is the lowest energy. Then, the H step has to be the first one since ∆E B S < 0 and ∆E C S < 0. Let us further suppose that the second step is C. This however comes back the working body to the initial state, due to the fact that P 0 → P 0 + ∆P H S + ∆P C S = P 0 . Thus, in order to close the cycle, the last B step has to be the identity, what results with zero efficiency.
Finally, we deduct an unique order of steps for positive efficiency defined as: which is given by: where E 0 is the lowest energy, and we used a fact that H and C are thermal operations (where γ 1 < 1, γ 2 < 1). Let us now split the problem to two cases.
c. Cold bath step (heat-stroke) The last step C is used to bring the system back to the initial state such that Since step C is a thermal operation we have what implies that E 2 > ωa C 1+a C . If this is satisfied we can further formulate necessary condition for closing the cycle in the form: Now, we are able to derive temperature regimes for which η > 0, and we close the cycle. Firstly, we observe that in order to have positive efficiency (E35), we need which is the necessary condition for ergotropy extraction. From this we easily obtain a H > In order to derive range for the cold temperature, firstly let us observe that and thus we can estimate that Finally, from closing the cycle condition (F11), we obtain Finally, the range of cold temperature (with fixed hot temperature) is given by This implies that a C < a H what means that T C < T H .

e. Maximal efficiency and work production
We can proceed now with estimation of the efficiency η and work production P . From the definition we have: and For a fixed a H ∈ ( 1 2 , 1] and a C ∈ [0, 2 − a −1 H ), the problem reduces to the maximization over all Let us now split the problem into two parts: 1) E 0 ≥ ε 0 , and 2) E 0 < ε 0 where 1) For the first case we have what shows that condition (F11) is satisfied for all λ and ξ. It leads us to the maximal efficiency for λ = 1, such that h(1) = 0, ξ = 0, and The maximal work production in this case is also straightforward: 2) For the second case, where K(E 0 ) > 0, one can estimate that The function f (E 0 ) is increasing whenever what is satisfied if engine works in the cyclic mode (F17). Finally, since we consider situation where E 0 < ε 0 , then In analogy, for the extracted work, one can estimate: Finally, the maximum over all possible protocols which close the cycle is given by The maximum efficiency and work production is simultaneously achieved for the unique protocol, such that E 0 = ε 0 , λ = 1 and ξ = 0.

b. Battery step (work-stroke)
In analogy to the previous case, for the work-stroke we have (C10): thus we can represent change of the energy as where δ ∈ (0, ∆R H S − g(λ)). The important thing is that in this case parameter δ cannot be zero. It follows from the fact that α 0 = γ 2 α 2 = 0, and as a consequence also α 2 = 0. However, δ = 0 corresponds to the maximal ergotropy storing such that W = R 1 and R 2 = 0, what implies that α 2 = 0.

c. Cold bath step (heat-stroke)
For the C step we can derive an analogous condition: In analogy to the previous case, for α 0 = 0 we have a necessary condition for the positive ergotropy extraction (and positive efficiency) in the form: Moreover, the following inequality has to be fulfilled: and Finally, the temperature regimes are the same as for the engine with α 0 = 0, i.e.
The efficiency of the engine is given by and work production Once again we split the problem into two parts: 1) E 0 ≥ ε 0 , and 2) E 0 < ε 0 . 1) For the first case due to the fact that g(λ) − h(λ) ≥ 0, and we can put g(λ) = h(λ) = 0, since K(E 0 ) ≤ 0 (such that condition (F32) is always fulfilled), it straightforwardly leads us to the following bound: since we have shown that δ > 0. In analogy, the work production in this case is bounded by 2) For the second range of energies, i.e. E 0 < ε 0 , from (F32) we obtain exactly the same estimation as previously what proves that the maximal efficiency η 1 (and work production P 1 ) cannot be reached for the engine with non-zero initial coherence α 0 = 0.

General protocol a. Heat-and work-stroke
From the assumptions that all hot bath steps are the ergotropy extractions, from which follows that in general each of them can be parameterized as follows In order to fulfill this condition, any energy E k < ω(1 − 1 2a H ) for k = 1, 2, . . . , n − 1. For work-strokes we assume that each of them leads to the positive work, i.e. W k = −∆E B k S > 0, then one can write down: We assume as previously that each λ k ∈ (λ 0 , 1] and δ k ∈ [0, ∆R 0 (E k ) − g(λ k )), however, we notice that the condition E k < ω(1 − 1 2a H ) imposes here some additional constraints. Nevertheless, for arbitrary protocol: where the last term is always non-negative. For k = 1 we get since ∆P 0 (E) is a decreasing function with respect to E. Finally, we prove thatẼ k ≤ E k for k = 1, 2, . . . , n, where equality is for all λ k = 1 and δ k = 0. Having this we further assume that condition E k < ω(1 − 1 2a H ) is at least fulfilled for the extremal protocol (i.e. when E k =Ẽ k ), and we put: where s k ( λ, δ) ≥ 0. Finally, we can write down where s( λ, δ) = n k=1 s k ( λ, δ) ≥ 0. For the extremal protocol, such that each λ k = 1 and δ k = 0, then s( λ, δ) = 0.

b. Closing the cycle condition
For the many-step engine necessary condition for closing the cycle in this case generalize to: where

Temperatures regimes
We have following constraints for energies: E k < ω(1 − 1 2a H ) for all k = 1, 2, . . . , n − 1 andẼ k ≤ E k . In particular, the energy E n−1 just before the last ergotropy extraction has to satisfied those inequalities, from which follows that E n−1 < ω(1 − 1 2a H ). From this one can derive the minimal possible value of E 0 which is given by On the other hand a n H > , what constitutes the possible range of hot temperature at which engine can operate, i.e. a H ∈ (2 −n , 1]. (G14) The range for cold temperature can be derive as follows. Firstly, let us estimate an upper bound for the energy E n , i.e.
where we used a fact that g(λ k ) − h(λ k ) + δ k < ∆R 0 (E k ). Further, in order to close the cycle the following has to be satisfied: Although, we have where we used Eq. (G13). Finally, the possible range of cold temperatures for a fixed a H is given by the set

Maximal efficiency and work production
The upper bound for the many-step efficiency can be estimated as follows .

(G19)
Furthermore, one can prove that for any x ≥ 0 what leads to the algebraic bound for the efficiency, i.e.
Work production of the engine is given by: Once again we split the problem into two parts: 1) E 0 ≥ ε n 0 , and 2) E 0 < ε n 0 , however, in this case ε n 0 = ωa C a n H 1 + a C a n H .

(G28)
One can further show that the function f n (E 0 ) is increasing with respect to E 0 if and only if a C < (1 − a n H )(1 + a H ) n(1 − a H ) − 1.
However, in order to close the cycle we have a C < 2 − a −n H =⇒ a C < (1 − a n H )(1 + a H ) n(1 − a H ) − 1.
In analogy, the work production can be estimated by the condition (G11), i.e.

Free energy and ergotropy extraction
Let us consider the ergotropy extraction via the heat-stroke, i.e. ∆R H S > 0. We will prove that for any such a process ∆F S < 0. Firstly, let us observe that stateσ S with passive energy P S has entropy equal to: and since P S ∈ [0, 1 2 the entropy is an increasing function with respect to the passive energy of the state. Especially, due to the result given by Eq. (E33), the minimal change of the passive energy ∆P H S for any ergotropy extraction (i.e. when ∆R H S > 0) is for the extremal process with λ = 1, and for a state without initial coherences such that α = 0, what implies also the minimal change of the entropy ∆S H S . Furthermore, the change of the energy ∆E H S is maximal for the extremal process what shows that if inequality T ∆S H S > ∆E H S is fulfilled for λ = 1 and α = 0 it is also fulfilled for any other ergotropy extraction.
Let us then analyzed only this extremal case. If the initial energy is E 0 , then . From these follows that equation for the extremal thermal process can be only satisfied if qubit is in a Gibbs state, i.e. with energy E 0 = 1 − x 0 /ω = ωe −βω 1+e −βω , however as a consequence, it cannot be a work extraction process. Thus, for any ergotropy extraction we have what finally proves inequality ∆F S < 0.

Free energy and work extraction
Let us consider an arbitrary sequence ofÛ SH andÛ SB where the total change of the free energy is equal to ∆F S = ∆F H 1 + ∆F B 1 + ∆F H 2 + ∆F B 2 + · · · = k (∆F H k + ∆F B k ). (H14) Moreover, for each work-stroke we have ∆S B S = 0, thus and as a consequence where each ∆F H k ≤ 0 (H4). Then, we will prove the following: whenever ∆F S < 0 and stateσ S has no initial ergotropy R 0 = 0, it implies that W < −∆F S .
Firstly, let us observer that this is trivially obeyed if W ≤ 0. Otherwise, since for any work-stroke ∆F B m = ∆R B m , we have k ∆R B k < 0.
Next, since ergotropy is non-negative state function, we obtain the following: and according to the assumption that R 0 = 0, it implies that It is seen that at least one heat-stroke is the ergotropy extraction, i.e. ∆R H m > 0 for some m, what further implies ∆F H m < 0 (H13). Finally, this proves that where f (n + , n − , n 0 ) = (n + + n − + n 0 )! n + !n − !n 0 ! p Furthermore, for odd values of n 0 all trajectories always end up in the same final state |e, 2k e, 2k|. Then, it is enough to realize that the last step is always given by the O-transition |g, k g, k| → |e, k + 1 e, k + 1| with probability p 0 = a H a C , and the rest can be once again calculated from the trinomial distribution, namely p ge (2k, 2n) = p 0 n++n−+n0=2n n0 -odd δ 2k,n+−n−+1 f (n + , n − , n 0 − 1 2 ).
Finally, for arbitrary stateρ S = p |g g| S + (1 − p) |e e| S , we have P 2n (2k) = p p g (2k, 2n) + (1 − p) p g (2k + 1, 2n − 1). (I17) b. Work distribution for charging protocol via uncorrelated qubits Let us start with a definition of the mapT : The action of the map on basis states is following: |g, n g, n|T − → |e, n − 1 e, n − 1| , |e, n e, n|T − → |g, n + 1 g, n + 1| (I20) We then consider a battery state after the charging process by N = 2n uncorrelated qubits, where in each step the battery and particular qubit evolve according to the mapT , namely we define the state: In analogy to the previous consideration we have here once again a random walk process, however with only left and right transition. For the specific stateˆ S ,the left transition L is observe with probability p − = 1 − a H 1+a H a C , and right transition R with probability p + = a H 1+a H a C . As a consequence, the final distribution of the battery is simply given by the binomial distribution:P 2n (2k) = 2n n − |k| p n−k + p n+k − .