Thermodynamic geometry of ideal quantum gases: a general framework and a geometric picture of BEC-enhanced heat engines

Thermodynamic geometry provides a physically transparent framework to describe thermodynamic processes in meso- and micro-scale systems that are driven by slow variations of external control parameters. Focusing on periodic driving for thermal machines, we extend this framework to ideal quantum gases. To this end, we show that the standard approach of equilibrium physics, where a grand-canonical ensemble is used to model a canonical one by fixing the mean particle number through the chemical potential, can be extended to the slow driving regime in a thermodynamically consistent way. As a key application of our theory, we use a Lindblad-type quantum master equation to work out a dynamical model of a quantum many-body engine using a harmonically trapped Bose-gas. Our results provide a geometric picture of the Bose–Einstein condensate-induced power enhancement that was previously predicted for this type of engine on the basis of an endoreversible model (Myers et al 2022 New J. Phys. 24 025001). Using an earlier derived universal trade-off relation between power and efficiency as a benchmark, we further show that the Bose-gas engine can deliver significantly more power at given efficiency than an equally large collection of single-body engines. Our work paves the way for a more general thermodynamic framework that makes it possible to systematically assess the impact of quantum many-body effects on the performance of thermal machines.


Introduction
Thermodynamic processes on meso-and microscopic length and energy scales are commonly described in terms of non-autonomous differential equations, that couple the state variables of a working system such as the elements of a density matrix with external arXiv:2212.12076v1[cond-mat.quant-gas]22 Dec 2022 control variables like magnetic fields [1,2].Thermodynamic quantities such as net work output or net entropy production depend on both state and control variables.Thus, any attempt to optimize a given process with respect to its driving protocols generically leads to a complicated dynamical control problem.For systems that are weakly coupled to a thermal environment and driven slowly, relative to their internal relaxation timescale, thermodynamic geometry provides an elegant method to simplify such problems [3][4][5][6][7][8][9][10][11][12][13][14][15].The key idea of this approach is to solve the equations of motion of the working system, by means of adiabatic perturbation theory [8,16].The state variables of the system thereby become functions of the control parameters and their time derivatives.Upon inserting these solutions into the expressions for the considered figures of merit, they become functionals of the control variables and their time derivatives, which can be optimized by solving the corresponding Euler-Lagrange equations without dynamical constraints.In this way, thermodynamic quantities can be related to geometric concepts.For instance, the dissipation of a given process, when minimized with respect to the parameterization of the applied control protocols, can be expressed as the length of the control path with respect to a system-dependent pseudo-Riemannian metric in the space of control parameters; this quantity, which was first introduced in macroscopic thermodynamics [17][18][19][20][21], is known as thermodynamic length [22][23][24].
A promising avenue towards scaling up the power and constancy of quantum thermal machines is to replace working systems with few degrees of freedom by manybody systems capable of hosting collective effects, which may lead to uncovering new mechanisms of energy conversion .Such effects, whose thermodynamics is yet to be fully understood, include: tunable interactions between particles, which can be used for work-extraction [43][44][45]; super-radiance and broken time-translation symmetry, which emerge in multi-level systems coupled to a thermal bath via collective observables [46][47][48][49][50][51]; quantum phase transitions [52][53][54][55] or quantum statistics, which provides a means of controlling an effective pressure that has no classical counterpart [56][57][58][59][60]. Thermodynamic geometry offers a powerful tool to analyze these phenomena from a unifying perspective and thus a potential avenue towards a universal framework describing how many-body effects can alter the performance of quantum thermal machines.
Here, we take a first step in this direction by investigating the formation of Bose-Einstein condensates (BECs) in ideal quantum gases as an example of a quantum manybody effect which has been recently shown to enhance the performance of heat engines under suitable conditions [58].There, an endoreversible Otto cycle is considered for a harmonically confined Bose gas as a working medium.Cycles crossing the transition, between the condensate and normal phase are shown to enhance engine performance.This effect arises from the reduced effective pressure of the working system in the condensate phase, which makes it possible to carry out a compression stroke with significantly lower work input than in the normal phase.Expanding the gas in the normal phase, thus leads to an enhanced net work output compared to an engine that operates solely in the condensed or normal phase.To analyze this effect through the lens of thermodynamic geometry, we develop a dynamical framework to describe arbitrary thermodynamic cycles close to equilibrium with ideal quantum gases.The central idea underpinning this framework is that the principle of equivalence of ensembles should still hold in the adiabatic-response regime, where the system is not driven far away from equilibrium.Specifically, we start with a grand-canonical picture, where the chemical potential and temperature of a thermal reservoir coupled to the working system are considered as external control parameters along with the mechanical parameters that enter its Hamiltonian.In this setting, we fix the chemical potential such that at each instance of time the average number of particles within the system remains constant, thus making the chemical potential dependent on the remaining control variables.This procedure, which we show to be thermodynamically consistent, allows us to construct an effectively canonical picture.It thus becomes possible to develop the thermodynamic geometry of quantum-gas engines in analogy with earlier approaches based on few-body systems.As a result, the thermodynamic impact of Bose-Einstein condensation as a quantum manybody effect can be quantitatively assessed.We illustrate this idea for a Stirling cycle, whose working fluid consists of an ideal Bose gas in a tunable harmonic trap.For this model, we analyse the BEC-induced work enhancement as well as the trade-off between power and efficiency [25].Our results show that although both the work output and minimum dissipation are increased by the BEC, for large system sizes, the power output at given efficiency can be increased compared to a collection of single-body engines.
We organise this work in the following sections.In Sec. 2 we develop our geometric framework for the description of ideal quantum gases in the adiabatic-response regime.We continue by showing that the adiabatic-response coefficients in the grandcanonical setting gives rise to thermodynamically consistent, effective adiabatic-response coefficients in the canonical picture once the mean particle number of the system is fixed via the chemical potential.These effective coefficients enter thermodynamic vector potentials, Berry curvatures and a thermodynamic metric, which depends only on the remaining control variables, i.e., the temperature of the reservoir and the mechanical parameters controlling the Hamiltonian of the system.In Sec. 3, we apply our framework to a many-body heat engine, whose working system consists of an ideal Bose gas undergoing a Stirling cycle and analyze the thermodynamic effect of Bose-Einstein condensation.Finally, we provide our concluding remarks and outlook in Sec. 4.

System
We consider a quantum many-body system, whose Hamiltonian H V can be altered through an external field V .The system exchanges both energy and particles with a thermo-chemical reservoir, whose temperature T and chemical potential µ we assume to be independently tunable.Hence, the dynamics of the system are controlled by three parameters which form the control vector Λ = (V, T, µ) ≡ (Λ w , Λ u , Λ z ).
A general thermodynamic cycle can be realised through periodic variation of these parameters, where the vector Λ traces out a closed path γ : t → Λ t in the space of control parameters.Once the system has settled into a periodic state, ρ t = ρ t+τ , where τ denotes the period of the driving, the thermodynamic net effect of one cycle can be described in terms of the three variables Here, dots indicate derivatives with respect to time and the generalized forces, , f u t = −tr ρ t log ρ t , and correspond to the effective pressure, the entropy and the mean particle number of the system.Hence, X w is the applied work per cycle, and X u and X z correspond to the effective intake of thermal and chemical energy from the reservoir.Note that we set Boltzmann's constant to 1 throughout.The dissipated availability provides a measure for the irreversibility of a thermodynamic process [21,25].To better understand the physical meaning of this quantity, we may rewrite it in terms of standard thermodynamic variables as follows.Upon integrating by parts and using the periodicity conditions, f α t = f α t+τ and Λ t = Λ t+τ , we may express the dissipated availability as Here, we have first identified the entropy S t = f u t and mean particle number N t = f z t of the system.In the second step, we have used the first law Ėt = P t + J t , where E t = tr H Vt ρ t is the internal energy of the system, P t = f w t Λw t is the power applied by the mechanical driving and J t is the rate of energy uptake from the reservoir.Finally, we have introduced the heat flux into the reservoir Qt = − J t − µ t Ṅt and the total rate of entropy production Σt = Ṡt + Qt /T t .Since the second law requires Σt ≥ 0, Eq. ( 4) shows that A ≥ 0.

Quasi-static limit
If the driving is quasi-static on the typical relaxation timescale of the system, its periodic state reduces to an instantaneous Gibbs state, i.e., ρ t = Λt with The thermodynamic forces (2) can then be expressed as partial derivatives of the grandcanonical potential Φ Λ with respect to the conjugate control parameters.That is, where ∂ α denotes the partial derivative with respect to Λ α .Since the generalized forces now depend parametrically on the driving protocol Λ t , the thermodynamic quantities (1) admit a geometric representation as line-integrals along the control path γ, being the components of the thermodynamic vector potential, This result shows that the quantities X α do not depend on the parameterisation of the control path γ.A second geometric expression can be found by using Stokes' theorem to express the line-integral over the vector potentials as an integral over some surface Γ bounded by the path γ, being the thermodynamic Berry curvature and ∇ Λ = ∂ w , ∂ u , ∂ z denoting the gradient with respect to Λ. Finally, the dissipated availability becomes Hence, any thermodynamic cycle is reversible in the quasi-static limit, as expected.

Adiabatic response
If the system is driven at finite speed but still slowly on its typical relaxation timescale, its state remains close to the instantaneous Gibbs state (5).In this adiabatic-response (AR) regime, the generalized forces can be expanded to first order in the driving rates, where the adiabatic-response coefficients R αβ Λt depend parametrically on the driving protocol.The dissipated availability thus becomes denotes the elements of a symmetric positive semi-definite matrix [25], which can be interpreted as a pseudo-Riemannian metric in the space of control parameters.While A is of second order in the driving rates, and thus not a geometric quantity, it still admits a geometric lower bound.Specifically, applying the Cauchy-Schwartz inequality gives denotes the thermodynamic length, i.e., the length of the path γ with respect to the metric g αβ Λ .This quantity provides a measure for the dissipation incurred by finite-time driving in the lowest order in 1/τ .
The inequality (12) can be saturated for any control path γ by optimizing its parameterisation.To this end, we make the thermodynamic length a functional of a monotonically increasing speed function φ t by replacing Λ t with Λ φt .Solving the Euler-Lagrange equation for φ t with respect to the boundary conditions φ 0 = 0 and φ τ = τ returns the optimal parameterisation which is implicitly given by the expression [25]

Systems with fixed particle number
Our analysis thus far has assumed a grand-canonical setting, where the system has access to a thermo-chemical reservoir.However, in the context of thermal machines, one is usually interested in thermodynamic cycles, where the system exchanges only heat with its environment, while its particle number remains constant.Such cycles must generally be described in a canonical setting, which is however technically more difficult to implement than the grand-canonical one.In the quasi-static limit, this problem can be circumvented by applying the principle of equivalence of ensembles.That is, for sufficiently large systems, equilibrium quantities can be calculated in the grandcanonical ensemble with the mean particle number being fixed afterwards by tuning the chemical potential.This approach should still be valid in the AR regime, where the system remains close to equilibrium.Under this assumption, the grand-canonical framework of thermodynamic geometry can be systematically and consistently reduced to a canonical one, as we show in the following.
To fix the particle number, we have to choose the chemical potential Λ z t such that holds for any 0 ≤ t ≤ τ and for some value N 1.In AR, this condition yields the relation which can be perturbatively solved for Λ z t using the ansatz with yet undetermined coefficients Λ za λ .Here, we have introduced the reduced control vector λ = (Λ w , Λ u ) ≡ (λ w , λ u ).Furthermore, we use the convention that Greek indices run over w, u, z and Latin ones run over w, u.
Inserting the ansatz ( 16) into Eq.( 15) and expanding to first order in the control rates gives where we have defined the coefficients and ∂ a denotes a partial derivative with respect to λ a .We note that we drop all time arguments until Eq. ( 23) for notational clarity.In zeroth order, Eq. ( 17) yields the condition which makes Λ z0 a function of λ; in practice, the function Λ z0 λ will typically have to be found numerically.Furthermore, taking a time derivative of Eq. ( 19) gives Since the parameters λ a are independently controlled, the summands in Eq. ( 20) have to vanish individually.We thus have Together, with this result and the condition (19), Eq. ( 17) implies with Rαβ The relations ( 21) and ( 22) fully determine the chemical potential Λ z t for any λ t at all times 0 ≤ t ≤ τ , up to second-order corrections in the driving rates.
We can now construct a geometric framework for thermodynamic cycles with fixed particle number.First, in the quasi-static limit, the generalized forces are given by Our two main quantities of interest, the applied work X w and the uptake of thermal energy X u , thus become being the components of the reduced thermodynamic vector potential and the reduced Berry curvatures being given by where and ab = δ wa δ ub − δ ua δ wb .Here, γ is the reduced control path in the w-u plane and Γ is the area it encircles.In AR, the generalized forces are connected to the driving rates by the relations with the reduced adiabatic-response coefficients which can be found by inserting the ansatz (16) into the expression for the generalized forces Eq. ( 10), expanding to first order in the driving rates λa , and substituting in the relations (21) and (22).
To verify that our approach is thermodynamically consistent we still have to show the second law is upheld.To this end, we consider the dissipated availability A for a general thermodynamic cycle, insert Eq. ( 16) for the chemical potential Λ z t and expand to second order in the driving rates.These steps yield with ĝab λ = − Rab λ + Rba λ /2.Hence, the reduced dissipated availability Â can be expressed in the same form as A with g αβ Λ replaced by ĝab λ .It remains to show that the coefficients ĝab λ define a positive semi-definite matrix, which can be interpreted as a pseudo-Riemannian metric in the reduced space of control parameters.To this end, we observe that, for arbitrary Since the elements g αβ Λ form a positive semi-definite matrix for any Λ, it follows that a,b ĝab λ X a X b ≥ 0, which is the desired result.With these prerequisites, it is now straightforward to derive a geometric bound on Â.From the Cauchy-Schwartz inequality, we have being the reduced thermodynamic length.As before, this bound can be saturated for any reduced control path γ by optimizing its parameterization.The corresponding optimal speed function is implicitly defined by the condition

Many-body heat engines
In the following, we show how the general framework developed in the previous section makes it possible to describe heat engines that use an ideal quantum gas as a working system.As a key application of this theory, we demonstrate how the enhancement of engine performance through Bose-Einstein condensation, which has been described recently in Ref. [58], can be understood through the lens of thermodynamic geometry.

Geometry of engine cycles
We begin with a brief review of the thermodynamic geometry of heat engines that are driven by continuous periodic variations of a mechanical control parameter, V = λ w , and the temperature of a thermal reservoir, T = λ u ; for details see [25].Note that, here, we consider the canonical setting, where the working system exchanges only thermal energy with its environment.With the definitions of the previous section, output and input of a general engine cycle are given by where W is the generated work per cycle and U is the thermal energy uptake from the reservoir.The dissipated availability per cycle is thus given by which shows that U can be understood as the available energy for work production.It is therefore natural to define the efficiency of the engine as where the driving protocol λ t must be chosen such that W > 0.
A second figure of merit for a heat engine is given by its power output P = W/τ .In AR, this figure is linked to the efficiency (35) by the universal trade-off relation where W = −X w is the geometric work and L is the thermodynamic length of the control path that is mapped out by the driving protocol λ t .Notably, equality is achieved in Eq. ( 36) if A = L 2 /τ .That is, the trade-off relation can be saturated for any control path by optimizing its parameterization so that it minimizes the dissipated availability.
The trade-off relation (36) shows that the power of a generic heat engine decays at least linearly to 0 as its efficiency approaches its maximum value in the quasi-static limit τ → ∞, where A → 0. The slope of this decay is determined by a purely geometric figure of merit Ψ ≡ W/L 2 .Although derived originally for microscopic heat engines, these results do not rely on any assumption on the size of system and hence are directly applicable to many-body engines.The figures W and Ψ can then be used to quantitatively probe the role of collective effects for the performance of general engine cycles in AR.

BEC engine
To further develop this idea, we now consider a many-body heat engine, whose working system consists of an ideal Bose gas in a two-dimensional, isotropic harmonic trap with tunable strength ω = V .This system is capable of hosting one of the simplest collective quantum effects, the formation of an ideal Bose-Einstein condensate, which has recently been shown to enhance engine performance under certain conditions [58].To keep this paper self-contained, we first present the relevant background material describing the equilibrium thermodynamics of the system [67,68].We then lay down a dynamical model based on a quantum master equation, which makes it possible to calculate the thermodynamic length L, thus giving us access to the figure of merit Ψ.In both cases, we start with a grand-canonical description, which is technically easier to implement than a canonical one, and then fix the particle number in the working system by tuning the chemical potential of the reservoir.

Equilibrium
We consider a collection of non-interacting bosons with mass m confined by a 2dimensional, harmonic trap with strength ω.The single particle Hamiltonian reads with the usual creation and annihilation operators a ≡ mω/2(x + ip/mω), a † ≡ mω/2(x − ip/mω) and the 2-dimensional position and momentum operators x and p.The Hamiltonian is readily extended to a many-body system by introducing the Fock-space operators, A n and A † n , which remove and add particles to the singleparticle eigenstates |n .Both Fock-space operators are implicitly dependent on the trap strength.According to the standard rules of second quantization, we have where n = (n x , n y ) ∈ N 2 0 and E n = ω(n x + n y + 1) are the single-particle energy levels.In the grand-canonical ensemble, the thermostatics of the system are fully determined by the grand potential, where q = exp[− ω/T ] < 1 and z = exp[(µ − ω)/T ] ≤ 1. Upon using the series expansions log [1 − x] = − ∞ j=1 x j /j and [1 − x] −1 = ∞ j=0 x j for x < 1, this expression can be rewritten as Up to this point, no approximations have been made.To obtain a tractable expression for Φ Λ , we now make the assumption ω/T 1 and expand the denominator of the second term in (40) to leading order in T / ω, which yields [67] Here, we have used the definition of the polylogarithmic functions, Li s (z) = ∞ k=1 z k /k s .The average particle number of the system is now given by The first term in Eq. ( 42) corresponds to the groundstate population N 0 and the sum of the additional terms to the population of excited states, N .We can now transition to an effectively canonical picture by using Eq. ( 42) to fix the chemical potential µ = Λ z , or equivalently the effective fugacity z, for a given N .Since N is bounded by N max = N z=1 , it follows that the ground state must be macroscopically occupied for N > N max .Upon evaluating N max to leading order in ω/T , this condition yields the critical temperature For T < T c , the system hosts a Bose-Einstein condensate.In the following we refer to this regime as the condensate phase and the regime T > T c as the normal phase.

Lindblad dynamics
To describe the dynamics of the system in AR, we can formulate a quantum master equation.To this end, we assume that the system is weakly coupled to a thermochemical reservoir with temperature T and chemical potential µ, where ω, T and µ are independently tunable.Provided that the control parameters vary slowly on the relaxation timescale of the system, the time evolution of its state ρ t can be thermodynamically consistently modelled with the Lindblad equation [69] ρt = L t ρ t , where The first term of L t accounts for the unitary evolution of the system and the dissipation super-operator describes the exchange of particles with the reservoir.Here, is the Bose-Einstein factor and κ is the rate setting the relaxation timescale.The master equation ( 44) has the instantaneous stationary solution That is, if the control parameters are fixed, the system relaxes to a Gibbs state.This condition is both sufficient and necessary for thermodynamic consistency in the weak-coupling limit [70][71][72].Furthermore, reflecting micro-reversibility, the dissipation super-operator obeys the quantum detailed balance condition where D † Λ denotes the adjoint dissipator, Figure 1. Outline of a typical Stirling cycle with a harmonic trap and a schematic of the population distribution of the BEC population (dark-grey) and excited states population (light-grey).Starting at A, in the first stroke, A → B, the system is operated at the cooler temperature, T l , whilst the trap frequency is increased, ω l → ω h .In this 'compression' stroke, work is done on the system.In B → C the trap strength is kept fixed at ω h and the temperature is increased T l → T h , adding heat to the system.The trap strength is then returned, keeping T h fixed, in the 'expansion' stroke C → D, decreasing the level spacing between energy levels and extracting work from the system.Finally in D → A, the temperature is returned to T l .The cyclic modulation of the parameters in λ maps the path γ in the ω-T plane.

Stirling cycle
For concreteness, we now focus on a Stirling cycle which consists of four distinct strokes: two isothermal ones, where the temperature T is fixed and the trap frequency, which plays the role of the inverse volume, is varied between the initial and final values ω l and ω h = ω l + ∆ω with ∆ω > 0, and two isochoric strokes, where the trap frequency is fixed and the temperature is varied between T l and T h = T l + ∆T with ∆T > 0. An outline of this cycle is shown in Fig. 1.
To apply the general framework developed in Sec. 2, we require two types of quantities.First, the quasi-static generalized forces, F α Λ = −∂ α Φ Λ , which can be readily obtained from the expression (41) for the grand-canonical potential, are given by where ξ n = n ω − µ.Second, solving the master equation ( 44) to first order in adiabatic perturbation theory gives the periodic state of the system in the form Λα t [8].Inserting this state into the definitions of the generalized forces (10) and expanding to first order in the driving rates yields the primary AR coefficients with coefficients D α n and C n defined as and degeneracies g n = (n+1) and h n = 2 3 (n+1)(n+2)(n+3).The approximate analytic forms of these coefficients are found in the same way as with the grand potential, see Appendix C.
To carry out the reduction to an effectively canonical system, to which the trade-off relation ( 36) applies, we still need the coefficients These quantities can be directly obtained from the expressions ( 49)-( 51) for the quasistatic generalized forces and are spelled out in Appendix B for reference.The reduced thermodynamic Berry curvature Ba λ and AR coefficients Rab λ can thus be constructed from Eqs. ( 26) and ( 28) upon eliminating Λ z by numerically solving the constraint F z Λ = N for z.With these prerequisites, all relevant thermodynamic quantities can now be calculated.

Results
We consider Stirling cycles with ∆ω = 0.1ω l and ∆T = 50 ω l for a range of T l , from T l = 10 ω l to 2.5 × 10 3 ω l .Each Stirling cycle is performed for a range of systems with fixed average particle number from N = 10 3 to 10 6 .The critical temperature is given by Eq. ( 43).We identify three distinct regimes of operation.First, for T l T c the engine operates only inside the condensate phase.In this regime, the net work output is suppressed by the presence of a BEC, which reduces the effective pressure of the gas and thus the work that can be extracted during the expansion stroke.Second, for T l T c , the engine operates completely in the normal phase, where its performance resembles that of a collection of N independent single-particle engines (SPE) as the quantum gas behaves increasingly classical.Finally, if T l ∼ T c , the cycle crosses the transition between the two phases.In this regime, the compression stroke (A → B) and expansion stroke (C → D) are performed with largely different groundstate populations.While the expansion occurs in the vapour-phase with normal effective pressure, the compression is carried out in the presence of a BEC, which substantially reduces the effective pressure and thus the amount of work required to increase the trap strength.This effect, which has been described before in Ref. [58], leads to a significant increase in the net extracted work compared to cycles operating solely in the vapour-or condensate phase.
In the geometric picture, the BEC-induced work surplus appears as a peak in the Berry curvature Bw λ along the transition line T = ω √ 6N /π in the ω − T plane, which translates into a peak of the geometric work W as a function of the base temperature T l around T l T c , see Fig. 2. To highlight the collective nature of this effect, we have included the geometric work for a SPE, in the plots 3c) and 3d); for details of the calculation, see Appendix A.1.
For the same cycles, we plot the normalised thermodynamic length L/ √ N , in Fig. 3a and b.As with the geometric work per particle, the thermodynamic length has a distinct peak above the work output of SPE in the region where T l T c , i.e., when the cycle crosses the phase transition.This result shows that BEC-induced work enhancement comes at the cost of additional dissipation.To further understand the behaviour seen in Figs.3a and b), we first observe that the thermodynamic length of the single-particle Stirling cycle features a non-monotonic dependence on T l , which arises from the competition between the two contributions, W and U , to the dissipated availability, see Eqs. (33) and (34).At high temperatures, the isothermal strokes dominate since compressing the working system at high temperature, and thus at high effective pressure, requires a large work input.At low temperatures, the leading contribution comes from the isochoric strokes, since even small-scale changes in T lead to large variations in the entropy of the system, see Fig. 4. For the many-body cycle, an additional peak in the thermodynamic length emerges, which is caused by the creation and vapourization of a BEC.As the particle number increases, the critical temperature goes up and the peak is offset by the increasing thermodynamic length of the isothermal strokes.If T l T c the groundstate is macroscopically occupied throughout the cycle.As a result, both the work exchange during the isothermal strokes and the exchanged thermal energy during the isochoric strokes are suppressed, which leads to a decreasing The majority of the expansion stroke occurs in the normal phase and the compression stroke in the condensate phase.The curvature is peaked around T c , giving rise to a boost in the geometric work, which is found by integrating the Berry curvature over the area enclosed by the cycle.c) and d), Work output per particle as a function of T l and T l /T c , for a range of system sizes.Each point along the curves correspond to a cycle with a different T l .To emphasise the collective work enhancement we compare this with the same Stirling cycles for a SPE (orange-dashed).The coloured dots in a) and c) indicate the cycles considered in Fig. 6 dissipated availability and thus to a reduced thermodynamic length.We now turn to the figure of merit Ψ = (W/ L) 2 , which limits the power-efficiency trade-off relation (36) and is plotted in Figs.3c) and d).These plots show a distinct peak in Ψ/N around the critical temperature, indicating that the BEC-induced work surplus dominates over the corresponding increase in dissipation, in AR.Hence, when operated in the crossoverregime, the many-body Stirling engine can generate significantly more work output per particle at a given efficiency than the corresponding SPE.However, since the peakvalue of the thermodynamic length increases faster with N than the maximum of the geometric work, the peak of Ψ/N is suppressed at large N .It is therefore possible to determine an optimal system size for a BEC Stirling engine for a specified ∆T .In Fig. 5, we plot the work per particle, thermodynamic length and figure of merit over the same range of T l for ∆T = 20 ω l and ∆T = 2 ω l to illustrate this point.Finally, the   derivatives of the optimal speed functions, which lead to the saturation of the bound (36), are shown in Fig. 6.The plots show φs for three cycles, highlighted in Figs. 2 and  3, for the SPE and BEC engines, respectively, with N = 10 6 .In the high temperature limit, both the SPE and BEC cycle have the same optimal parameterization.In the low temperature limit, the isochoric strokes dominate the dissipated availability and hence are slowed down as to minimize the overall dissipation.Around the critical temperature, the BEC engine exhibits a slight change in the driving rate during the strokes that cross the transition temperature.This feature is not observed for the SPE. Figure 6.Derivative of the optimal speed functions that minimize the dissipated availability for the SPE (dashed) and BEC engine (solid) with N = 10 6 .We show results for cycles in the condensate phase (blue), normal phase (red) and across the transition (green), corresponding to the coloured dots in Figs. 2 and 3.

Concluding Perspectives
We have presented a geometric framework in which the impact of collective effects on close-to-equilibrium thermodynamic cycles of ideal quantum gases can be quantitatively described.
Starting with a grand-canonical picture and invoking the principle equivalence of ensembles, we have derived a set of effective adiabatic-response coefficients, which enable a canonical description of the working system in the language of thermodynamic geometry.This framework includes general expressions for the Berry curvature, which determines the geometric work output of engine cycles, and the thermodynamic length, which determines the minimal dissipation incurred by a given cycle.We have shown that a slowly driven quantum gas engine exhibits an enhanced work output in the quasi-static limit, for cycles that operate across the transition between normal and condensed phase.This result is in agreement with recent work that considers an endoreverisble Otto cycle in a similar setting [58].In our approach this enhancement naturally appears as a peak in the corresponding Berry curvature.We have further shown that the thermodynamic length increases in a similar way for cycles that cross the phase boundary, indicating that an additional thermodynamic cost arises from driving the Bose gas across the Nonetheless we find that the power output of the BEC-enhanced engine, which is bounded by a previously derived geometric trade-off relation [25], can be increased at a given efficiency.
Bose-Einstein condensation is thus an example of a collective quantum effect which can enhance the performance of engine cycles.Further developing our approach could it possible to explore the role of other many-body effects, such as interactions between particles or quantum phase transitions, in a similar way.The systemindependent nature of thermodynamic geometry, which provides, among other results, universal trade-off relations between thermodynamic figures of merit [25,27], may thus enable a more comprehensive assessment of the role of collective phenomena for the performance of cyclic processes in adiabatic-response.
In this article, we have focused on the geometric trade-off between power and efficiency of ideal quantum-gas engines.As a next step, it would be interesting to include constancy, i.e., inverse power fluctuations, as a third figure of merit, for which similar geometric trade-off relation have been derived [27].Whether Bose-Einstein condensation leads to enhanced or diminished work fluctuations in adiabatic-response is generally an open question, which cannot be immediately addressed within our framework for two major reasons.First, quantifying work or power fluctuations would require specifying the protocol for work measurements, which will generally perturb the state of the system.Second, our analysis is based on a grand-canonical treatment which, for sufficiently large systems, is equivalent to a canonical one on the level of mean values of thermodynamic observables.This equivalence does not however necessarily extend to higher-order cumulants.In fact, it is known that the fluctuations of the ground state occupation in an ideal Bose-gas remain macroscopic even at low temperatures in the grand-canonical setting, while they become small in the canonical one [73,74].One might therefore, expect that our approach would lead to drastically increased work fluctuations below the critical temperature, resulting from macroscopic fluctuations in the groundstate occupation.Overcoming this problem would require formulating a geometric framework for quantum gases in a strictly canonical setting, where the microscopic equations of motion of the working system conserve its particle number.We leave it to future research to find suitable theoretical methods to carry out this program.
On the experimental side, a recently reported realization of an isothermal engine with ultra-cold atoms and tunable interactions that change the quantum statistics of the working system, provides an exciting subject for future studies [59].Here, it is a priori unclear how a geometric framework should be constructed, since, at least in an effectively non-interacting model, the statistics of quantum particles cannot be continuously tuned between Bose-Einstein and Fermi-Dirac.Describing this process on a microscopic level, would require interactions between particles to be taken into account, to enable the transition from a molecular BEC to a Fermi sea.In a more general perspective, extending our dynamical approach to more realistic interacting systems would be a significant development in its own right, which would give access to a new class of collective effects that cannot be observed in ideal quantum gases.which describes a single harmonic oscillator, coupled to a thermal bath at temperature T .The unitary evolution is described by the first term in (A.4) and the dissipation super-operator is given by with the adjoint Here, the rate κ > 0 sets the relaxation timescale.The dissipation super-operator thus obeys the detailed balance condition being the instantaneous stationary solution of Eq. (A.4).We now make the ansatz for the periodic state, which we substitute into Eq.(A.4).Expanding the left hand side in time derivatives of the control parameters and equating coefficients of λa yields where L 1 t −1 is the psuedo-inverse of the Lindblad generator L 1 t .From here we drop the time arguments for notational convenience.The derivatives of the Gibbs state with respect to the control parameters are where angular brackets denote the thermal average, i.e., X = tr[X λ ], which we substitute into Eq.(A.9) to obtain In AR, the thermodynamic forces admit the expansion up to first order in the driving rates, where R ab λ are the AR coefficients that appear in the expression for the thermodynamic length.Upon substituting the state ansatz (A.8) into (A.14) and equating coefficients of λb , it is straightforward to show that the AR coefficients are given by We can therefore determine the coefficients R ab λ by inserting the results from Eqs. (A.12) and (A.13) into Eq.(A.15), which yields ω/T as for the grand-potential, Φ Λ , in Sec.3.2.1.

Figure 2 .
Figure 2. Quasi-static results.a) Plot of the normalised Berry curvature Bλ /N , for N = 10 6 , over a range of the parameter space.The range over which Stirling cycles are swept is outlined (black) along with the critical temperature (red).The outlined region in blue is expanded in b), where a cycle that crosses the transition line is shown.The majority of the expansion stroke occurs in the normal phase and the compression stroke in the condensate phase.The curvature is peaked around T c , giving rise to a boost in the geometric work, which is found by integrating the Berry curvature over the area enclosed by the cycle.c) and d), Work output per particle as a function of T l and T l /T c , for a range of system sizes.Each point along the curves correspond to a cycle with a different T l .To emphasise the collective work enhancement we compare this with the same Stirling cycles for a SPE (orange-dashed).The coloured dots in a) and c) indicate the cycles considered in Fig. 6

Figure 3 .
Figure 3. Normalised thermodynamic length and figure of merit Ψ for BEC Stirling cycles.a) and b) show the thermodynamic length for the range of Stirling cycles and system sizes considered in Fig. 2 against T l and T l /T c in comparison with the thermodynamic length of the corresponding single-particle cycles (orange-dashed).Plots c) and d) show the figure Ψ that appears in the trade-off relation (36).

Figure 4 .
Figure 4. Plots of the normalised thermodynamic length (dashed) and the total contribution arising from isochoric strokes (red) and isothermal strokes (blue) for a) the BEC Stirling engine and b) the SPE.

Figure 5 .
Figure 5. Plots for a) geometric work b) thermodynamic length and c) Ψ/N for the BEC Stirling engine with cycles where ∆T = 20 ω l .Plots d)-f) are the same results for cycles with ∆T = 2 ω l .The results for the SPE (orange-dashed) are shown for comparison.