Surpassing the Carnot Efficiency by extracting imperfect work

A suitable way of quantifying work for microscopic quantum systems has been constantly debated in the field of quantum thermodynamics. One natural approach is to measure the average increase in energy of an ancillary system, called the battery, after a work extraction protocol. The quality of energy extracted is usually argued to be good by quantifying higher moments of the energy distribution, or by restricting the amount of entropy to be low. This limits the amount of heat contribution to the energy extracted, but does not completely prevent it. We show that the definition of"work"is crucial. If one allows for a definition of work that tolerates a non-negligible entropy increase in the battery, then a small scale heat engine can possibly exceed the Carnot efficiency. This can be achieved even when one of the heat baths is finite in size.


Introduction
Given resources where energy is only present in its most disordered form (heat), how efficiently can one convert such heat and store it as useful energy (work)? This question lies at the foundation of constructing heat engines, like the steam engine. Though nearly two centuries old, it remains one of central interest in physics, and can be applied in studying a large variety of systems, from naturally arising biological systems to intricately engineered ones. Classically it is known that a heat engine cannot perform at efficiencies higher than the Carnot efficiency (CE), which is given by Hot being the temperatures of the heat reservoirs at which the engine operates between. This fundamental limit on efficiency can be derived as a consequence of the second law of thermodynamics, which is regarded as one of the 'most perfect laws in physics' [1].
Recent advancements in the engineering and control of quantum systems have, however, pushed the applicability of conventional thermodynamics to its limits. In particular, instead of large scale machines that initially motivated the study of thermodynamics, we are now able to build nanoscale quantum machines. A quantum heat engine (QHE) is a machine that performs the task of work extraction when the involved systems are not only extremely small in size/particle numbers, but also subjected to the laws of quantum physics. Such studies are highly motivated by the prospects of designing small, energy efficient machines applicable to state-ofthe-art devices, particularly those relevant for quantum computing and information processing. The question then arises: how efficient can these machines be? never violated because one always has to invest extra work in order to create and replenish these non-thermal reservoirs. Nevertheless, the study of using such non-thermal reservoirs can still be of interest, since they potentially may boost other features of the heat engine, such as the rate of extracting work. However, in this manuscript we are focusing on the standard setting of a QHE, in which the baths are thermal, where in classical thermodynamics, it is proven that although CE can be approached, it can never be surpassed [14].
Even without additional resources such as those in EQHEs, QHEs are already radically different from classical engines, since energy fluctuations are much more prominent due to the small number of particles involved. The laws of thermodynamics for small quantum systems are more restrictive due to finite-size effects [14][15][16][17][18][19]. It is known that such second laws introduce additional restrictions on the performance of QHEs [14]. Specifically, not all QHEs can even achieve the CE. The maximal achievable efficiency depends not only on the temperatures, but also on the Hamiltonian structure of the baths involved. Furthermore, considering a probabilistic approach towards work extraction, [20] found that the achievement of CE is very unlikely, when considering energy fluctuations in the microregime.
Can we design a QHE that operates between genuinely thermal reservoirs and yet achieves a high efficiency 5 ? To answer this, several protocols have been proposed and analyzed [9,11,17,[22][23][24][25][26][27], some showing QHEs that operate at the CE [9,27,28]. However, crucial to these results is the definition of work. In these approaches, the most common approach of quantifying work is to measure the average increase in energy of an ancillary system, sometimes referred to as the battery, after a certain work extraction protocol [9,[28][29][30][31]. Such a measure of work would be adequate, if the entropy of the battery, denoted as DS remains invariant. Indeed, already in classical thermodynamics, D = S 0 is always assumed when deriving the upper bound on heat engine efficiency. However, all explicit QHE protocols to-date do not, and cannot satisfy such an assumption, since in the quantum nanoregime, fluctuations in work become highly non-negligible and hard to quantify/analyze. In this regime, work is almost always a random variable, characterized by a non-trivial probability distribution [32][33][34][35]. Attempts to keep this entropy increase arbitrarily small often use additional assumptions such as a catalyst/control system with an unphysical Hamiltonian [36,37], or with infinite energy/coherence resources [38,39]. If one does not make such assumptions, then one has to live with the fact that the energy extracted is tainted by heat, and be satisfied as long as the amount of heat contribution is simply upper bounded [9]. In the second approach, the quality of work extracted is usually argued to be good by quantifying higher moments of the energy distribution, or by restricting the amount of entropy to be low. Underlying all these results a fundamental concept remains hidden: how should work be quantified in the microscopic regime? A universally agreed upon definition of performing microscopic work is lacking, and this remains a constantly debated subject in the field of quantum thermodynamics [31,33,35,[40][41][42]. This is mainly why a complete picture describing the performance limits of a QHE remains unknown.
The goal of our paper is to show that average energy increase is not an adequate definition of work for microscopic quantum systems when considering heat engines, even when imposing further restrictions such as a limit on entropy increase. Specifically, we demonstrate that if one allows for a definition of work that tolerates a non-negligible entropy increase in the battery, then one can in fact exceed CE. Most importantly, this can already happen when (1) the cold bath only consists of 1 qubit, where finite-size effects further impede the possibility of 1 and stores the extracted energy. 5 In this manuscript we concern ourselves with the main problem of efficiency, although there are other features of a heat engine such as power and constancy that are important as well. See [21] for a discussion about tradeoffs between these features. thermodynamic state transitions, and (2) without using additional resources such as non-thermal reservoirs. The reason for being able to surpass CE stems from the fact that heat contributions have 'polluted' our definition of work extraction. We show that work can be divided into different categories: perfect and near-perfect work, where heat (entropy) contributions are negligible with respect to the energy gained; while imperfect work characterizes the case where heat contributions are comparable to the amount of energy gain. We find examples of extracting imperfect work where the CE is surpassed. This completes our picture of the understanding of work in QHEs, since we already know that by drawing perfect/near perfect work, no QHE can ever surpass CE [14].

General setting of a heat engine
The setup Let us first describe a generic QHE, which is a setup that extracts work. A generic QHE comprises of four basic elements: two thermal baths at distinct temperatures T Hot and T Cold respectively, a machine that operates between the baths in a cyclic fashion, and a battery that stores energy for further usage ( figure 1) The initial machine r (ˆ) H , M 0 M can be chosen arbitrarily, as long as its final state is preserved (and therefore the machine acts like a catalyst).
In order to investigate the fundamental limits to the performance of QHEs, we adopt a thermodynamic resource theory approach [15,[43][44][45], where all unitaries U on the global system such that M defines a catalytic thermal operation [16] which one can perform on the joint state ColdW. This implies that the cold bath is used as a non-thermal resource, relative to the hot bath. By catalytic thermal operations that act on the cold bath, using the hot bath as a thermal reservoir, and the machine as a catalyst, one can extract work and store it in the battery. The aim is to achieve a final reduced state r r = ( ) tr ColdMW For a parameter e Î [ ) 0, 1 , we consider the initial and final battery states to be respectively. This can be seen as a simple form of extracting work: going from a pure energy eigenstate to a higher energy eigenstate (except with failure probability ε). More general battery states may be in principle allowed, however this does not affect the main focus of our result, and therefore for simplicity of analysis we consider final battery states of the form in equation (5). The extracted work W ext is defined as the energy difference - The parameter ε corresponds to the failure probability of extracting work, usually chosen to be small. To summarize, we make the following minimal assumptions: (A.1) Product state: There are no initial correlations between the cold bath, machine and battery, since each of the initial systems are brought independently into the process. This is an advantage of the setup, since if one assumed initial correlations, one would then have to use unknown resources to generate them in the first place. . This is to ensure that the machine does not get compromised in the process: since if r M 0 was initially correlated with some reference system R, then by monogamy of entanglement, correlations between r M 1 and r ColdW 1 would potentially destroy such correlations between the machine M with R.
(A.3) Isolated quantum system: The heat engine as a whole, is isolated from and does not interact with the world. This assumption ensures that all possible resources in a work extraction process are accounted for. Mathematically, this implies that the global Hamiltonian is time-independent, while the system evolution is described by global unitary dynamics.
(A.4) Finite dimension: The Hilbert space associated with r ColdHotMW 0 is finite dimensional but can be arbitrarily large. Moreover, the HamiltoniansĤ , ColdĤ , HotĤM andĤ W all have bounded pure point spectra, meaning that these Hamiltonians have eigenvalues which are bounded. This assumption comes from the resource theoretic approach of thermodynamics [15].

Quantifying work and efficiency
We have seen from equations (4) and (5) that a failure probability of work extraction is allowed. This probability injects a certain amount of entropy into the battery's final state, compromising the quality of extracted work. For an initially pure battery state, let DS denote the von Neumann entropy of the final battery state, Since the distribution of the final battery state has its support on a two-dimensional subspace of the battery system, DS coincides with the binary entropy of ε, denoted by e ( ) h 2 . The more entropy DS created in the battery, the more disordered is the energy one extracts, i.e. the larger are the heat contributions. Since work is ordered energy, therefore ideally, zero entropy is desirable; where the final state of the battery is simply another pure energy eigenstate r = ñá W . Not only then we obtain a net increase in energy, but also we have full knowledge of the state r W 1 , since it is also pure. This prompts the following characterization of work: Definition 1 (Perfect work [14]). An amount of work extracted W ext is referred to as perfect work when e = 0.
Perfect work, although desirable in principle, is an extremely strict form of work where work extraction happens with zero failure probability, that is to say, D = S 0. In fact, it has been proven in [14] that for any initial state of the cold bath which is of full rank, if we require perfect work, then  W 0 ext . Since thermal states are always of full rank, a positive amount of perfect work can never be extracted in a heat engine that operates only between two thermal heat baths. Such a phenomena is closely analogous to zero-error data compression: whenever a piece of information is represented by a random variable X over a probability distribution of full rank, then one cannot achieve zero-error in transmission if the data is compressed and transmitted in a message of shorter length [46].
Let us therefore proceed by considering another example: for a fixed amount of average energy increase from r r  W 0 W 1 , the entropy increase DS is maximized when the final state r W 1 is thermal. However, another problem emerges: it is known that a thermal state by itself cannot be used to obtain work, if only energypreserving unitaries are allowed. This is precisely why only multiple copies of thermal states (as long as they are of a fixed temperature) are allowed in the resource theory framework as free states [16]. For such a thermal state r W 1 to be useful in work extraction, it has to be combined with other resources (for example another heat bath) in order to obtain ordered work. Therefore, while energy has increased, one cannot justify the full amount of average energy increase as work.
From the above example, we have seen the importance of constraining the amount of ε (or equivalently, the amount of DS), in order to properly justify that whatever energy stored in r W 1 indeed corresponds to useful work. However, the absolute value of DS is not so important by itself. In particular, we could have cases where although DS is arbitrarily small, the amount of energy extracted could also be arbitrarily small, even comparable to DS. Indeed, many protocols for work extraction such as [9,33] involve infinitesimal steps that extracts energy by small amounts in each step. In the light of such considerations, we may consider the following regimes: Definition 2 (Near perfect work [14]). We say that a sequence of heat engine protocols leads to near perfect work extraction if . Definition 2 requires that if the amount of near perfect work W ext for the whole sequence is bounded away from infinity, then there must always be a subset of protocols where the failure probability of work extraction governed by ε is arbitrarily small. However, it is also more stringent than just that: for near perfect work, whenever W ext is finite, items (1) and (2) are both satisfied only in the limit e  0, and if and only if = e D + lim 0.
S W 0 ext If this limit is not satisfied, we say that the work extracted is imperfect.
Definition 3 (Imperfect work). We say that a sequence of heat engine protocols leads to imperfect work extraction if The reader might be concerned with using DS W ext as a parameter to characterize work quality, since DS W ext is not dimensionless. However, one can simply consider the rescaled and dimensionless quantity D k T S W B ext , for any value of T from the surrounding bath. Since k T B only comes into the characterization as a multiplicative factor which is positive but finite, one can therefore see that the regimes of perfect, near perfect and imperfect work would remain the same, had we use D k T S W B ext instead of DS W ext . Next, we introduce the notion of a quasi-static heat engine. Traditionally in thermodynamics, the expression quasi-static refers to a process that happens slowly such that the system remains in thermal equilibrium at all times. In this manuscript, we use this term to denote a heat engine cycle that changes the state of the final cold bath only slightly, such that it remains a thermal state, however its temperature is slightly increased.
Definition 4 (Quasi-static [14]). Consider a sequence of heat engine protocols, where in each protocol, the final state of the cold bath is thermal with an inverse temperature of This heat engine (sequence) is called quasi-static, if for any positive number > G 0, there exists a non-trivial subset of protocols where  g G. The quasi-static limit refers to the subset of protocols in the limit where  + G 0 .
In this manuscript, we constantly refer to g as the quasi-static parameter.
Having fully described the QHE in section 2, and expounding on different characterizations of extracted energy in definitions 1-3, one asks: for what values of W ext can the transition r r  ColdHotMW 0 ColdHotMW 1 occur? The possibility of such a thermodynamic state transition depends on a set of conditions derived in [16], phrased in terms of quantities called generalized free energies (see appendix A). These conditions place upper bounds on the amount of work W ext extractable, and since our initial states are block-diagonal in the energy eigenbasis, these second laws are necessary and sufficient to characterize a transition.
The efficiency of a particular heat engine is given by

Results
We show that CE can be surpassed in a single-shot setting of work extraction, even without using non-thermal resources. We obtain this result through deriving an analytical expression for the efficiency of a QHE in the quasi-static limit, when extracting imperfect work. Consider the probability ε where the final battery state is not in the state ñá | | E E k k , according to equation (5). This is also what we call the failure probability of extracting work. The limit e  0 is the focus of our analysis for several reasons. Firstly, recall that when categorizing the quality of extracted work, one is interested not only in the absolute values of entropy change in the battery, which we denoted as DS. Rather, DS compared to the amount of extracted work W ext , in other words the ratio DS W ext is the quantity of importance. For any given finite n number of cold bath qubits, the amount of work extractable is finite. Extracting near perfect work means that DS should be negligible compared with W ext , as we have seen in definition 2. Since according to equation (6), , therefore we are concerned with the limit where ε is arbitrarily small. On the other hand, now consider imperfect work. The quasi-static limit, i.e.  g 0 is the focus of our analysis that aims to provide examples of imperfect work extraction. In the quasi-static limit, since the cold bath changes only by an infinitesimal amount, therefore the amount of work extractable W ext is also infinitesimally small. For most cases of imperfect work (when the ratio of DS W ext is finite) we know that DS is vanishingly small, and therefore so is ε.
In [14], it has been shown that perfect work is never achievable, while considering near perfect work allows us to sometimes achieve arbitrarily near to CE, but not always. Therefore, our results, when combining with [14] provide the full range of possible limits for DS W ext , with the corresponding findings about maximum achievable efficiency, which we summarize in table 1. Theorem 1 formally states our main result. This theorem establishes a simplification of the efficiency of a quasi-static heat engine, given a cold bath consisting of n identical qubits, each with energy gap E. We consider a special case where the failure probability e µ g is proportional to the quasi-static parameter g (see definition 4), and evaluate the efficiency in the limit  g 0. We show that this corresponds to extracting imperfect work, in particular, For such a case, we show that 0 , and the inverse efficiency (equation (8)) of the described heat engine is given by We plot, in figures 2-4 the comparison between CE and the efficiency achievable according to theorem 1. In all these plots we observe that CE is always surpassed, therefore providing us with examples of heat engine cycles that surpass CE. However, this does not imply that the surpassing of CE when extracting imperfect work solely happens for quasi-static processes. The quasi-static limit is not a necessary restriction; it is simply a specific example we have chosen in order to demonstrate the consequences of considering imperfect work. The reason for such a choice, is because if we consider perfect or near perfect work instead, a quasi-static heat engine is most advantageous, i.e. whenever the CE is achieved, it is achieved only by a quasi-static process.  [14] h C is the theoretical maximum, and can only be approached uniquely in the quasi-static limit. However, h C can be approached only if certain conditions on the bath Hamiltonianare met. Otherwise, the maximum attainable efficiency is strictly upper bounded away from h C . Imperfect work (this paper) It is worth noting that equation (10) formulates a condition on the energy gap E of the cold bath qubits, as a function of b b , c h . This condition is also a sufficient condition for achieving the CE when extracting near perfect work [14]. Therefore, the blue curve never falls below the yellow line. The improvement in efficiency happens most when the parameter * a is adjusted, since this is the parameter that determines how quickly the ratio  ¥ DS W ext in the quasi-static limit. Given that in table 1, the case of Î ¥ ( ) p 0, also corresponds to imperfect work, one might wonder if CE can also be surpassed in this regime. We show that this is not possible.

Methods
There are several steps taken in order to achieve the proof of theorem 1, which we outline in this section. For details, the reader is referred to corollary 1 and its proof in the appendix C.1, which directly implies theorem 1.
Theorem 1 is obtained by considering a cold bath of n-identical qubits, and calculating the ratio of extractable work W ext against DC in the quasi-static limit, i.e.  + g 0 . Then, by using equation (8), one can evaluate the efficiency. The main difficulty lies in evaluating W ext , the amount of extractable work. This quantity represents the maximum value of the batteryʼs energy gap, such that a transition t r r r is possible according to the generalized second laws described in appendix A. Applying the generalized second laws, we can calculate W ext , which is given by a minimization problem over the continuous range of a real-valued variable a > 0, , where e 1 is independent of the quasi-static parameter g.

2.
Starting out from the expression for extractable work given in lemma 1, we prove that in the quasi-static limit, the regime a Î ( ) 0, 1 need not be considered in the optimization. This is proven in lemma 4.
3. We show that the function a W which we desire to minimize has at most one unique local minima. To do so, we establish technical lemmas 7-9, in order to arrive at lemma 10.
4. We show that e 1 can be chosen such that e > 0 (lemma 11), and that we can choose it so that we know that a particular * a Î ( ) 1, 2 corresponds to a local stationary point (lemma 12) and specifically a local minima (lemma 13). Since we have established item 3, this implies that we have identified a unique local minima. 5 are fixed, and for the quasi-static limit, we expand DC in terms of the quasi-static parameter g.
One can ask whether it is possible to always exceed CE when imperfect work is drawn. For example, observing in remains finite in the quasi-static limit. It is interesting to note that, if only the standard free energy is responsible for determining state transitions, then CE again might be exceeded. In conclusion, in the regime where p is finite, the reason that one cannot exceed CE stems from the fact that there exists a continuous family of generalized free energies in the quantum microregime (see appendix A). 6 The reason why ¥ W is not the relevant quantity in our scenario, as in many other scenarios [15,16,33,47], is noted by the fact that ¥ W usually provides the maximum possible amount of work extracted, which leads to the cold bath being in a final state that is thermalized with the surrounding hot bath. However, this process is not the one that maximizes efficiency, which is our goal in this calculation. The fact that we consider a process that is not completely thermalizing, gives rise to the importance of other a W quantities.

Discussions and conclusion
Why is it important to distinguish between work and heat? Suppose we have two batteries A 1 and A 2 , each containing the same amount of average energy. However, A 1 is in a pure, defined energy eigenstate; while A 2 is a thermal state corresponding to a particular temperature T 2 . Note that there is an irreversibility via catalytic thermal operations for these two batteries: the transition  A A 1 2 might be possible, but certainly  A A 2 1 , since the free energy of A 1 is higher than of A 2 . This makes A 1 a more valuable resource compared to A 2 . Indeed, if we further consider the environment to be of temperature T 2 , then having A 2 is completely useless: it is passive compared to the environment and cannot be used as a resource to enable more state transitions. Even more crucially, the full amount of energy contained in A 1 can be transferred out, because we have full knowledge of the quantum state.
Indeed, for the case of extracting imperfect work, and in particular for the choice of ε proportional to g, heat contributions are dominant. This is because in such an example, the average energy in the battery increases, its free energy actually decreases. This can be seen because by using equations (4)-(6), the free energy difference can be written as , and when e µ g in the quasi-static limit, DS is much larger than W ext . This indicates that the free energy difference, instead of average energy difference in the battery would serve as a more accurate quantifier of work. Indeed, by adopting an operational approach towards this problem, [40] has also identified the free energy to be a potentially suitable quantifier.
Our result serves as a note of caution when it comes to analyzing the performance of heat engines, that quantifying microscopic work simply by the average energy increase in the battery does not adequately account for heat contribution in the work extraction process. Therefore, this might lead to the possibility of surpassing the CE, despite finite-size effects, even in the absence of non-thermal resources. For example, the work extraction protocol proposed in [9] indeed corresponds to  ¥ DS W ext , when the intial battery state is a pure energy eigenstate. With each step in the protocol, an infinitesimal amount of energy is extracted, while a finite amount of entropy is injected into the battery. This reminds us that work and heat, although both may contribute to an energy gain, are distinctively different in quality (i.e. orderliness). Therefore, when considering small QHEs, it is not only important to propose schemes that extract energy on average, but also ensure that work is gained, rather than heat.
Acknowledgments NHYN and SW acknowledge support from STW, Netherlands, an ERC Starting Grant and an NWO VIDI Grant. MPW acknowledges support from the Engineering and Physical Sciences Research Council of the United Kingdom.
Appendix A. Second laws: the conditions for thermodynamical state transitions Macroscopic thermodynamics says that for a system undergoing heat exchange with a background thermal bath (at inverse temperature β), the Helmholtz free energy is necessarily non-increasing. For macroscopic systems, this also constitutes a sufficient condition: whenever the free energy does not increase, we know that a state transition is possible. However, in the microscopic quantum regime, where only a few quantum particles are involved, it has been shown that macroscopic thermodynamics is not a complete description of thermodynamical transitions. More precisely, not only the Helmholtz free energy, but a whole other family of generalized free energies have to decrease during a state transition. This places further constraints on whether a particular transition is allowed. In particular, if the final target state r ColdW 1 is diagonal in the energy eigenbasis, these laws also give necessary and sufficient conditions for the possibility of a transition r r  where t h ColdW is the thermal state of the system at temperature T Hot of the surrounding bath. The quantity r s a ( ) F , for  a 0 corresponds to a family of free energies defined in [16], which can be written in the form are known as α-Rényi divergences. Sometimes we will use the short hand . On occasion, we will refer to a particular transition as being possible/impossible according to the F α free energy constraint. By this, we mean that for that particular value of α and transition, equation (A2) is satisfied/not satisfied. The α-Rényi divergences can be defined for arbitrary quantum states, giving us necessary (but insufficient) second laws for state transitions [16,48]. However, since we are analyzing states which are diagonal in the same eigenbasis (namely the energy eigenbasis), these laws are both neccesary and sufficient. Also, the Rényi divergences can be simplified to where p , i q i are the eigenvalues of ρ and the state τ. The cases a = 0 and a  1 are defined by continuity, namely is also known as the relative entropy, while it can be checked that r t ( ) F , 1 coincides with the Helmholtz free energy. We will often use the convention r t r t and r t ( ) F , is the final state of the cold bath, and the battery states are given by   is the maximum value that satisfies the inequalities equation (B8) for all  a 0. , In the quasi-static limit, where recall that this implies r , one may rewrite equation (B6) into an approximation for small e g, ;this is done by expanding equation (B6) according to variables g and ε. More precisely, let us define the order terms as follows: Definition 5 (Big Q notation [49]). Consider two real-valued functions ( ) ( ) Remark 1. In definition 5, if the limit of x is unspecified, by default we take a=0. In [49], these order terms were originally defined for  ¥ x . However, choosing a general limit  x acan be done by simply defining the variable ¢ = - x a 1 , and  + x a is the same as taking ¢  ¥ x .
By the use of the notation for such order functions, one can first simplify A in equation (B7) for small g by Taylor expanding A in g, i.e. for  g 1, On the other hand, the function -( ) x ln 1 when  | | x 1 (in our case, x depends on both g and ε) can also be written as While multi-variable order terms can be defined in a much more general way, it is not necessary in our case. Here, when the order functions depend on both variables e g, , we have simply adapted a shorthand notation that for any functions ( ) P g 1 and e ( ) P 2 , the order function e e Q = Q Q ( ( ) ( )) ( ( )) · ( ( )) P g P P g P . Furthermore, we also checked explicitly that by first taking the limit a a ¥ W lim , then expanding in small e g, gives the same expression, i.e. equation (B11) holds also in the limit a  ¥.
As in this article, we are considering the limit where both e  g, 0. Throughout our proof, we have dealt directly with the general expression found in equation (B6). However, in the end we shall see that in this limit, only the largest order terms in equation (B11) matter. In other words, we will show that when e  g, 0, taking the infimum over the largest order term in equation (B11) for all a > 0 yields the same solution a 1 , which also achieves the infimum over equation (B6).
In the special case where the cold bath consists of n identical qubits, i.e.  We also list several expressions that will be useful in deriving our results later. Taking the derivatives of B α as defined in equation (B13) w.r.t. α, we have Next, an simple identity will be important for the evaluation of efficiency for a quasi-static heat engine as well. This we present as a lemma here.
Then in the quasi-static limit, where the cold bath final state is a thermal state of inverse temperature The third tool is an observation initially made in [14] for choices of e( ) g as a function of the quasi-static parameter g. There, it is shown that one can characterize any choice of continuous function e( ) g by the real parameters   k s Î , 0 .
Therefore, we summarize some results from [14] into the following table B1, for any continuous function

B.2. Technical lemmas
Building on the results adapted from [14] and summarized in section B.1, this section contains the technical lemmas and proofs used to develop the proof of theorem 1.  , where e > 0 1 is independent of α and g . Then there exists ¢ > g 0 such that for all where a W is defined in equation (B6).
Proof. We start out from the most general expression of extractable work, given by equation (B6). Let us first note that for any a Î ¥ , a W is a continuous function of g, and that = , therefore for all a > 0, we have = a W 0 (the case of W 1 is automatically true as well, since W 1 is defined by taking the limit a  1). can be obtained at different values of α such that the optimal α depends on g. However, in the quasi-static limit, there must exist a particular a > 0 1 that achieves the minimum value, i.e.  This implies that the solution a 1 to the minimization problem of a a > W inf 0 , in the limit where  g 0, is also the solution for the minimization problem a a> ( ) I inf 0 . Substituting e e = · g We now see how equation (B28) behaves in the limit  g 0. For any a < 1, the terms involved are = Equation (B32) in particular implies that in the limit of  g 0, a ( ) I diverges to infinity in the interval a Î ( ) 0, 1 . Furthermore, note that since this does not happen for the regime a > 1, and all other terms do not diverge, therefore in the a > 1 regime there must be some α such that a < ¥ ( ) I is finite. This allows us to conclude that a Ï ( ) 0, 1 1 .
⎟ ⎟ This implies that lim g g 0 ln 1 We will now exclude the point a = 1 from the minimization. We make use of the small e g , expansion of a W in equation (B11) to see why this is so, by calculating the limit , With lemma 4, one can dismiss the regime  a < 0 1 when considering the infimum over a W in equation (B11). In this lemma, we have also shown that in the quasi-static limit, the solution a 1 that corresponds to the infimum in W ext coincides with the solution of the infimum for the function a = a ( ) I W g d d . By again making use of this function a ( ) I , in the next step, we show that since we are interested in the quasi-static limit and the case where e e = · g 1 , another useful simplification will help us to obtain the minimum for W ext .
where a W is given by equations (B6) and (B7). Let a 1 be the solution that achieves the infimum in the quasi-static limit, such that for all other a¢ > 0, Then, a 1 is also the solution that achieves the infimum for a a a e = + in the quasi-static limit, where we are interested in finding the solution a 1 that satisfies equation (B24), it suffices to analyze a much simpler function . Looking back to compare a ( ) G with the Taylor expansion of a W evaluated in equation (B11), we see intuitively why this function provides us the same solution to a 1 as for W ext in the quasistatic limit: a ( ) G is simply the largest order term (more precisely, it is the term associated with order g) of the Taylor expansion in the interval a Î ¥ Furthermore, we can already apply lemma 4 to understand how DS W ext behaves in the quasi-static limit, which we prove in lemma 6. , with e 1 independent of g, in the quasi-static limit  + g 0 , we have The second equality is obtained by substituting e e = · g 1 and writing e e e -= -+ Q ( ) ( ) ln 1 2 in terms of Taylor expansion. The third equality is obtained by expanding out all the multiplied brackets, while the last equality is obtained by noting that e Q = Q ( ) ( ) g , and therefore concluding that the leading order term (which has the slowest convergence rate as  g 0) is of order g g ln . With this, one can evaluate the limit e a ae D = -+Q +Q +Q + +Q +Q +Q +Q b a a a a a   - The second equality is obtained by dividing both numerator and denominator with g. Then we see that in the numerator, e -· g ln 1 goes to infinity, while the other terms remain finite. On the other hand, the denominator goes to a finite constant. Therefore, we conclude that = ¥ , Recall that we have previously estalished in lemmas 4 and 5 that the solution a 1 for the optimization of W ext in equation (B5)-(B7), in the quasi-static limit, will be the same value that minimizes the function a ( ) G in equation (B45). From here onwards, we focus our analysis to the case where the cold bath consists of qubits. Therefore, B α is given by equation (B13), and ¢  1 , which is found in the rhs of equation (B46). Then . This also implies that a ( ) f has at most 3 roots in the regime a Î ¥ ( ) 1, .
It has been shown in lemma 12, is a strictly concave function. On the other hand, by using the definitions in equations (B14) and (B16), one can evaluate the second derivative of All the terms in the equation above are positive, except for the last term which is always negative when b b < h c . Therefore, the function ¢  a a B B 2 is strictly concave as well. This implies that a ¢( ) f is the addition of two strictly concave functions, and therefore is also strictly concave itself. , One can apply lemma 7 to analyze the function a ( ) G to show that it does not have more than 3 stationary points.
. Then the limit a a¥ ( ) G lim exists and is approached from above.
Proof. We have seen from equation (B34) that a a¥ ( ) G lim exists and is some finite number. We then only need to prove that in the limit of large α, the quantity < a a This can be seen from equation (B46), which we rewrite here again Let us compare the terms in the large bracket of the rhs. The first term a a a a b b has a quadratic term in α multiplied by a term which decreases exponentially in α, i.e. Proof. By lemma 8, we know that the function a ( ) G has at most 3 stationary points in the regime a Î ¥ ( ) 1, . Firstly, suppose that a ( ) G has only 1 or 2 stationary points. Then it is clear that there cannot exist two distinct local minimas, since for a continuous function with two local minimas, there has to be at least another local maxima in between, which is also a stationary point. Now, suppose that a ( ) G has 3 stationary points, found at a a a < < < < ¥ 1 1 2 3 respectively. Note that two neighboring stationary points cannot both correspond to local minimas, as reasoned out in the previous paragraph. Therefore, the only way for there to exist 2 local minimum points, is to have a a , 1 3 corresponding to local minimas. If there are no more stationary points in the regime a a > 3 , then the function a ( ) G can only be non-decreasing, and the limit a  ¥ has to be approached from below. However, by lemma 9 we know that this cannot be true.
This establishes the fact that a ( ) G does not have two distinct local minimas. Therefore, it implies that whenever we find some * a corresponding to a local minima, it will be the unique local minima of the entire function. This simplifies the minimization of a ( ) In the next lemma, we then prove that by making use of our liberty to choose e 1 , we can design it such that a a> ( ) G inf 1 is obtained at any * a we desire (albeit still within a certain range).  we can expressed in a simplified form, For this to be positive, it implies that One can then calculate the last term in equation (B73), which we again obtain a simplified expression via Mathematica,  We need one last condition: that In the next lemma, we again develop conditions such that this is true.
Proof. To do so, we write out the expressions for * a ( ) G and ¥ ( ) G : Expanding equation (B85), and using the shorthand The calculation above can be checked as follows: the first equality is obtained by taking out a common factor from all the three terms. The second equality focuses on the large bracket, and combines the first and third terms by expanding one of the X in the first term. In the third equality, one recognizes more common factors in equation (B88), and therefore pulls out * + The fourth equality is obtained by expanding X, while regrouping terms. To demand that One can continue to simplify the expression by bringing , and subsequently the −1 to the lhs, yielding Then finally, one obtains an expression for * a E:

Appendix C. Results
In [14] it has been shown that for a heat engine to extract any positive amount of work at all, e > 0 has to be true. Therefore, perfect work can never be drawn. Also, in [14] the regime of near perfect work was analyzed. There, it was found that the maximum efficiency can never exceed the CE.
In this paper, we develop an example of a heat engine which extracts imperfect work. In section C. . We find that in this regime, according to the generalized second laws, CE cannot be surpassed.
C.1. Main result: an example of drawing imperfect work surpassing the CE Our main result is stated in theorem 1 of the paper. Here, we present corollary 1, which is a direct consequence of combining all the technical lemmas derived in section B. This corollary is a more detailed version of theorem 1 in the main text.  3. The (inverse) efficiency of the described heat engine in the quasi-static limit is given by , if equation (C2) holds, then equation (B62) holds. Therefore item 1 is a direct result of lemma 11. Item 2 concerns the quantity W ext , given by equations (B5)-(B7). Suppose that a 1 is the solution such that equation (C3) holds. Since we have made a choice of ε according to item (1), then in the proof of lemma 4, we have shown that a 1 is also the solution that provides the infimum for in the quasi-static limit. Furthermore, in lemma 5, we have also shown that a 1 is also the solution that ahieves the minimum for a a> ( ) G inf 1 , where a ( ) G is given by equation (B45)  . If one chooses * a Î ( ) 1, 2 and that equation (C2) holds, then equation (B71) holds as well, and so lemmas 13 and 14. Therefore, • By lemma 10 we know a ( ) G does not have more than one distinct local minima.
• By lemmas 12 and 13, * a ( ) G is a unique local minima.
• By lemma 14, is the global minima.
The second equality holds by noting that both DC and * a W vanish in the limit  g 0, and therefore apply the L'Hospital rule. In the third equality, we used the first derivative of DC as calculated in equation (B20) of lemma 2. Subsequently, we have used lemma 5 to calculate the value of With this, we can numerically plot out the achievable efficiency as a function of * b b a n E , , , , c h , in the limit where  + g 0 . These expression are plotted out in several regimes in figures 2-4. It is worth noting that from the expression for inverse efficiency in corollary 1, we see that h -1 contains terms that originate from the expression of e 1 chosen in item 1 of corollary 1. It is then, perhaps, unsurprising that we observe the surpassing of CE (for some values of * a > 1). Indeed, although the average energy change in the battery is positive, i.e. e D = -> ( ) W W 1 0 ext , the change in free energy of the battery, is actually negative. This can be seen when we compute the limit  One can see that only certain choices of e( ) g will lead to having such a limit, which we shall see later in detail on table B1. We prove that for all choices of ε such that equation (C13) is true, one cannot surpass the CE. Proof. Firstly, note that an example for such a choice of ε can be constructed, i.e. e = e · c g ln 1 .
We make use of equation (C14) to analyze W ext , which is given in appendix B. Rewriting equation (B11) by first drawing out a factor of g, where any a > 0 gives an upper bound. However, since DC and a W are both vanishing in the quasi-static limit (for any a > 0), we can also evaluate the limit by using equation (B19), 1 goes to infinity as  + g 0 , while other terms are finite. This implies that the minimization can be restricted to parameters  a 1. Notice also all the order terms vanish when we take the limit  g 0, therefore we need only to deal with the largest order terms in equation (C16).
Consider the case where a = 1. ,W 1 can also be disregarded in the minimization (see figure C1 for a pictorial understanding).
Upon scrutiny, one sees that in the quasi-static limit, the contribution from ε has dropped out of the expression for W ext . Intuitively this tells us that having such a probability of failure ε does not help to boost W ext , and in turn the efficiency. In particular, we can use the lower bound: The first equality in equation (C22) comes by noting that = B 0 1 , and therefore applying the L'Hospital rule. The second equality comes again from noting that = B 0 1 . Finally, substituting this into equation (C21), we have one finds that the upper bound on efficiency yields the Carnot expression, i.e.  h h C . This means that for choices of e( ) g according to the statement of the theorem, CE cannot be surpassed. ,