Quantum machines powered by correlated baths

We consider thermal machines powered by locally equilibrium reservoirs that share classical or quantum correlations. The reservoirs are modelled by the so called collisional model or repeated interactions model. In our framework, two reservoir particles, initially prepared in a thermal state, are correlated through a unitary transformation and afterwards interact locally with the two quantum subsystems which form the working fluid. For a particular class of unitaries, we show how the transformation applied to the reservoir particles affect the amount of heat transferred and the work produced. We then compute the distribution of heat and work when the unitary is chosen randomly proving that the total swap transformation is the optimal one. Finally, we analyse the performance of the machines in terms of classical and quantum correlations established among the microscopic constituents of the machine.

The theoretical modelling of such devices usually involves the system in contact with equilibrium uncorrelated baths at different temperatures.However, some papers have generalised this picture to non equilibrium reservoirs [14][15][16][17][18][19][20], including the case of the Otto engine in contact with squeezed reservoirs [21][22][23][24], which can lead to efficiencies and performances beyond the Otto and Carnot limit.This conclusion, obviously, does not take into account the cost of maintaining a non equilibrium reservoir which is then considered as a free resource but shows how to best employ these resources (see also [25]).Other works have considered thermal devices coupled to spatially separated reservoirs which share correlations, classical or quantum [26][27][28][29][30][31][32].
Here we propose a general framework based on collisional models [19,22, which allows us to analyse, in a consistent thermodynamic sense as recently proven in Ref. [58], the effect of classical and quantum correlations between reservoirs in the functioning of quantum thermal machines.
Our setup, depicted in Fig. 1, consists of a working medium made of two quantum systems S 1 and S 2 .Each of these is in contact with a reservoir modelled by the repeated interaction of flying auxiliary particles.These particles are first prepared in a thermal state at T 1 and T 2 , respectively, and then undergo a unitary operation U which correlates them before their collision with the systems S 1 and S 2 .We study the steady state of the system after many collisions with the flying particles.
Such a microscopic model has the advantage that all thermodynamic contributions, e.g.energy, heat, work and entropy, are accountable and that it is consistent with the laws of thermodynamics [41,42,58].From the point of view of open quantum systems, our model leads to a non trivial evolution of a quantum system in contact with correlated reservoirs.As we will show, under the assumption of continuous evolution in the limit of collisions lasting an infinitesimal amount of time, U ρth (n 1 ) ρth (n 2 ) 1. Setup of our scheme: thermal particles emerging from the cold and hot baths and prepared in the states ρth (n 1 ) and ρth (n 1 ), respectively, are made to collide to each other under a unitary operation U.The emerging correlated particles in the global state ρ B collide with the system's particles S 1 and S 2 .
the system's evolution can be cast in the form of a Markovian Lindblad master equation with collective jump operators acting non trivially on both systems (see also Ref. [59]).
In this paper we showcase the functioning of our model assuming the system and environment's particles to be qubits.However our framework is general and could be equally applied to higher-dimensional systems including infinitedimensional ones, for instance quantum harmonic oscillators.
After discussing the setup in more detail in Sec.II and discussing its thermodynamics in Sec.III, we assume in Sec.IV the unitary operation U to be a partial swap.We will show how the amount of swapping between the flying qubits controls the amount and direction of the heat flow among the system's qubits.We then consider in Sec.V the most general twoqubit unitary operations and study the distribution of work produced and heat exchanged by the system when the unitaries are chosen randomly.We find that the extremal points of the distribution correspond to eight non-correlating unitaries with the optimal one corresponding to the complete two-qubit swap.In this context we analyse the quantum and classical correlations established among the quantum constituents of our setup.We find that, while correlations among the flying qubits are not necessary for the machine to work, quantum and classical correlations among the system's particle must be nonzero for the optimal performance.Finally in Sec.VI we summarise and conclude.

II. SETUP AND PRELIMINARIES ON REPEATED INTERACTIONS
We assume the system to be composed of two coupled qubits described by the XXZ Hamiltonian: where J, ∆ and B i are the interaction strength, anisotropy and local magnetic field, respectively.Here and throughout the paper we assume = k B = J = 1 expressing all physical quantities in these units.The operators σ xi , σ yi , σ zi are the Pauli matrices for the qubit i.Notice that the total magnetisation S z = σ z1 + σ z2 is a conserved quantity as it commutes with the system Hamiltonian.
We assume the system to be affected by a reservoir modelled by the so-called repeated interactions [19,22,.In this model, represented in Fig. 1, each qubit of the system interacts with a stream of uncoupled environment qubits (or flying qubits).The interaction between the system qubit and a flying qubit only lasts for a short time τ during which the interaction Hamiltonian is constant and given by: where the operators σxi , σyi , σzi are the Pauli matrices for a flying qubit interacting with the system qubit i = 1, 2. The coefficient γ determines the strength of the interaction while n i models the thermal occupation of the flying qubit.Additionally each flying qubit is subject to the local Hamiltonian: and we define Usually, in the literature, the state of the environment qubits for different reservoirs has been assumed to be uncorrelated.In this paper we challenge this assumption and introduce some correlations, not necessarily quantum ones, between the flying qubits.These are initially uncorrelated and prepared in a thermal state corresponding to a thermal occupation n i : where and 1 is the identity operator.
We then correlate the flying qubits with a unitary transformation U so that their state becomes: After this initial preparation, each flying qubit collides with a system's qubit (see Fig. 1).The collision, lasting for a time τ, is described by the unitary operator: where H tot = H S + H B + H S B is the total Hamiltonian.If we call ρ S (t) the state of the system at time t, then its state at time t + τ after the collision becomes In the following we will always consider the steady state that the system approaches after many collisions which is defined by the relation: and for simplicity we will drop its time dependence and write simply ρ steady S .

III. THERMODYNAMICS
We now discuss the different thermodynamics contributions arising in our setup after the system has reached its steady state.As the state of the system does not change anymore, the internal energy variation is zero: where ρ S B = ρ steady S ⊗ ρ B and ρ S B = U collision ρ S B U † collision .To define heat and work we distinguish two scenarios, called partial and complete scenarios, which we explain in more details in the following.

A. Partial scenario
In the partial scenario, we assume that we are provided with the flying qubits in the state ρ B and that we are not paying for the work of the unitary U.In this scenario, we are provided with a non-equilibrium reservoir and thus the second law of thermodynamics may not apply.This is still an interesting scenario to study for two reasons: first, it continues the investigation of the functioning of thermodynamic machines in the presence of non thermal environments [14][15][16][17][18][19][20][21][22][23]; second, it gives us an opportunity to study the open quantum system dynamics in the presence of correlated reservoirs as developed in Sec.IV.
Under these assumptions the work is potentially produced or injected during the system-environment collision [58].This is given by: Similarly the heat exchanged by the system with the flying qubits is equal to the energy balance of the latter ones: At steady state, the first law for the two-qubit system reads: where partial .Notice that throughout this paper we employ the convention that positive work or heat corresponds to energy injected into the system contributing to the increase of the system energy.

B. Complete scenario
In the complete scenario we account for the extra work needed to implement the correlating unitary U: so that the total work in the complete scenario is the sum of the two contrinutions: Equally, the heat exchanged is the energy balance of the environment during the whole process: from their preparation into the product thermal state ρ B to their final state after the two unitaries U and U collision : and A modified first law holds also in this scenario:

IV. RESERVOIRS IN A PARTIALLY SWAPPED LOCALLY THERMAL STATE
Here, we consider the special case in which the unitary U correlating the flying qubits is a partial swap operation: which is a total swap for φ = π/2.This leads to the following expression for the bath density matrix after the action of the partial swap S φ : where the basis of eigenstates of σ z1 and σ z2 has been used to write the matrix representation of ρ B .The action of the partial swap is to partially exchange populations between the auxiliary qubits.Indeed, the two flying qubits are still locally in a thermal state although at a different temperature compared to their state before the partial swap: where i = 1, 2 and Tr¯i represents the partial trace with respect to the qubit other than i.The effective population after the application of S φ is: The effective populations N i of the two flying qubits are shown in Fig. 2 where it is evident that for φ = π/2 the populations are completely swapped.The partial swap creates quantum correlations, measured for instance by quantum discord [60,61], among the two auxiliary qubits, except for the special values of φ = mπ/2, m ∈ Z, regardless of the values n 1 and n 2 .This happens because, as it is evident from Eq. ( 19), ρ B is not a product state.
Depending on the values of n 1 , n 2 , but with the condition that n 1 n 2 , the state ρ B can furthermore be entangled as evidenced by the analysis of the concurrence in Fig. 2, whose complicated analytical expression is not amenable of a simple interpretation.Notice how unbalancing the two populations n 1 and n 2 leads to larger entanglement.
The work for implementing the partial swap is given by: Notice that similarly to what is found in Ref. [58,62], the work vanishes for B 1 = B 2 or n 1 = n 2 and is maximum for the total swap φ = π/2.We set the parameters in such a way that for φ = 0 the twoqubit system acts as an engine (W < 0, Q (1) < 0, Q (2) > 0 for both scenarios).It is possible to find the analytical expression of the steady state, the work and heats exchanged per cycle.While their expressions are quite long and hard to read, it is possible to show that all their ratios are proportional to ratios of the local magnetic fields, B 1 and B 2 .As a consequence, and similarly to other models [29,58,62], the efficiency η = |W|/Q (2) , if the setup works as an engine, or the coefficient of performance (COP) η COP = Q (1) /W, if the setup works as a refrigerator, correspond to the Otto value.For example in the former case, the efficiency is given by (B 2 < B 1 ): and in the latter case the COP is given by (B 1 < B 2 ): In the partial scenario, φ can be used to control the functioning of the thermodynamic machine making it switch from an engine to a refrigerator.In the interval 0 ≤ φ ≤ π/2, the machine behaves an engine for 0 ≤ φ < π/4 and as a refrigerator for π/4 < φ ≤ π/2.For values of φ outside the interval [0, π/2], the situation described repeats periodically.The switching points are found for N 1 = N 2 which occurs for cos 2φ = 0, i.e. φ = (2m + 1)π/4, m ∈ Z.These switching points correspond to effective Carnot points where work and heat exchanged are zero (see also [58] where the condition n 1 = n 2 corresponds to the Carnot point).
Numerical results for the partial scenario are plotted in Fig. 3 which shows the periodic change of the machine operating as an engine and as a refrigerator.Interestingly, the largest absolute values of the thermodynamic quantities are obtained for the values φ = mπ/2, m ∈ Z at which the partial FIG. 3. Thermodynamic quantities: work and heat exchanged per collision for the steady state of the system in contact with the flying prepared with the partial swap Eq. ( 18).Top: partial scenario.Bottom: complete scenario.Parameters: swap operation S φ corresponds to the identity (even m) and the total swap (odd m).
Thus the partial swap operation can be employed as a valve to control the direction of the heat flowing between the system's qubits without altering the equilibrium reservoirs that prepare the flying qubits.These can be particularly useful in physical implementations in which one does not have full control of the environment.
Let us now move to the complete scenario.In this case, since we are taking into account all work contributions including those coming from the action of the swap operation, both first and second law are fulfilled.The corresponding results plotted in Fig. 3 show that the work and heats exchanged do not change sign and the machine always behaves as an engine.The action of the partial swap is to amplify the work production and the heats exchanged, while keeping the same performance, reaching a maximum for φ = mπ/2, m = ±1, 3, 5, . . .at which the swap is total.
This shows that given the two flying qubits, initially in equilibrium states with fixed temperatures, the maximum work that can be extracted is achieved by completely swapping their states before making them to collide with the system's qubit.As we will see in Sec.V this is the maximum value that can be obtained for any unitary operation between the flying qubits.
It is possible to prove, using the methods developed in Refs [42,58,63], that in both the complete and partial scenarios the second law is fulfilled by showing that the entropy production is always non negative, while being zero at the Carnot point n 1 = n 2 .
We end up this section by considering the continuous limit of τ → 0. Up to first order in φ one obtains the following Lindblad master equation: where L a (ρ) = 2aρa † − a † aρ − ρa † a is the usual Lindblad operator and M(a, b, ρ) = 2aρb − baρ − ρba is a modified Lindblad-like operator.In Eq. ( 26) we have also defined the jump operators σ ±i = 1 2 (σ xi ± iσ yi ).The presence of quantum correlations in the initial state of the bath is the reason for the appearance in the master equation of the collective term M proportional to φ which corresponds to environment-induced processes of emission of an excitation from one qubit and absorption from the other.
In this continuous limit, it is possible to define work power and heat currents both in the partial and complete scenario.However, in the complete scenario, one should assume that the work necessary for the swap operation given in Eq. ( 23) scales to zero as τ → 0. This is indeed the case up to first order in φ consistently with our master equation.

V. RESERVOIRS PREPARED BY RANDOM UNITARIES
Here we generalise the approach developed in the previous section by considering thermal flying qubits which are subject, before the collision with the system qubits, to a unitary transformation U R .The unitary transformation is always the same for all collisions for a given setup and allows the system to reach a steady state which we then analyse.We repeat the same procedure for an ensemble of 6 × 10 6 random unitaries U R chosen with uniform distribution according to the Haar measure [64].
For a generic U R , the creation of finite quantum coherences and correlations between the environment qubit may lead to difficulties in the derivation of a consistent master equation in the continuous limit τ → 0, see Ref. [49].In this section, we will therefore restrict our analysis to a small but finite τ.Under this assumption, the repeated interactions remain a discrete map for the system which, after many applications reaches a steady state, which we analyse.
We consider a setup which, for U R = 1, corresponding to the situation in which no unitary is applied to the flying qubits before their collision with the system, operates as an engine.Analogous results can be obtained for the refrigerator regime.
In the partial case, as in Sec.IV, work and heat fluxes are proportional to each other with the prefactor being a ratio of the local magnetic fields, B 1 and B 2 , related to the Otto efficiency.For this reason we only show the analysis of the work probability distribution shown in Fig. 4. Its probability density function (PDF) is approximately Gaussian with a very small average statistically compatible with zero.
The maximum and minimum values of the partial work W partial are obtained with unitaries that do not create correlations, classical or quantum, among the auxiliary qubits.As we will see in more detail in the complete scenario, this type of unitary operations do not create any mutual information between the flying qubits but simply rearrange the populations of the four basis states.In the partial scenario we find that the minimum negative value of the work (largest value of produced work) is obtained with the unitary that inverts the populations of the qubit prepared in the hottest temperature and leaves unchanged the qubit prepared in the coldest temperature: U R = σ x2 (corresponding to operation III defined later).In contrast, the maximum positive value of the work (largest value of the work injected), is obtained with the unitary that inverts the populations of the qubit prepared in the coldest temperature and leaves unchanged the qubit prepared in the hottest temperature: U R = σ x1 (corresponding to operation VI defined later).
Let us now pass to the complete scenario in which the work produced or extracted is not necessarily proportional to the two heat fluxes.We plot in Fig. 5 the joint histogram of the complete work and the heat input from the hot environment.The distribution is confined by a non-regular octagon whose eight vertexes correspond to unitary operations that do not create quantum or classical correlations between the environment qubits.Let {p 1 , p 2 , p 3 , p 4 } be the vector of the populations of the density matrix ρ B of the flying qubits after their preparation in equilibrium states but before undergoing the unitary U.These eight unitary operations only affect the populations of the flying qubits according to: complete .The dashed gray line represents the Otto efficiency.The blue dots, connected by thin solid lines, are obtained for non correlating unitaries marked by the corresponding number.These special points form an extremal octagon within which all other machines obtained for random unitaries must be located.The colour code identifies the number of values in each bin of the histogram.Parameters: Bottom: Extremal octagons obtained for the same parameters of the top panel but different values of B 2 = 0.15, 0.3, 0.6, 0.9, corresponding to vertexes denoted by circles, squares, triangles and diamonds, respectively.

Label Populations Unitary
where S π/2 is the transformation that completely swap the state of the two qubits, see Eq. ( 18) for φ = π/2.
Notice the symmetry between the unitary operations and the position of the corresponding vertex of the octagon.In Fig. 5, two vertexes are opposite on the octagon if their transformations can be obtained one from the other by applying the total swap operation.Moreover, one of the sides of the octagon, delimited by the vertexes I and II, corresponds to the Otto efficiency given in Eq. ( 24), so that points above the line corresponds to engines operating at a lower efficiency or, for W complete ≥ 0 operating as an accelerator, if Q (2)  complete > 0 or a heater if Q (2)  complete < 0. In the complete scenario, there are no unitaries that lead to refrigeration, similarly to what we discussed in Sec.IV for the partial swap.
The optimal point II yielding the larger amount of work produced (minimum negative value) corresponds to the complete swap operation.This can be related to an engine proposed by Campisi, Pekola and Fazio also based on a complete swap transformation but applied to the qubits of the working fluid [62].
In Fig. 5 we also show how the shape and size of the extremal octagon change when B 2 is varied while all other parameters are kept fixed.Notice that, as we increase B 2 , the region corresponding to the engine increases, leading to a higher probability of achieving this operation mode.This can be understood as follows.First, Q (2)  complete ∝ B 2 , thus if we rescaled the horizontal axis of the lower diagram in Fig. 5, all the vertexes would have the same horizontal coordinates.Second, for W complete = W partial + W U the situation is more involved.While the partial work always fulfils W partial ∝ B 2 − B 1 , the work W U needed to implement the non-correlating unitaries is a linear function of B 2 and B 1 which depends on the actual transformation.Therefore there exists no rescaling of the vertical axis that would bring the vertexes of different octagons to the same vertical coordinate.Furthermore, the vertex IV, corresponding to an accelerator for B 2 = 0.15, turns into an engine for the larger values of B 2 we analysed.
To get more insight into the relationship between the functioning of the whole system as an engine and the quantum features of the working medium quantum steady state, we looked at two measures of correlation between two parts of the engine.The mutual information between two quantum objects O 1 and O 2 is defined as: where S (ρ) = −Trρ ln ρ is the von Neumann entropy and the density matrices of the corresponding objects.The mutual information quantifies both classical and quantum correlations.If one subtracts the maximum amount of classical correlations that can be obtained by local measurements, the quantum discord, a genuine measure of quantum correlations, is obtained [60,61] .This can be defined as: where the classical information J O1O is the maximum information that can be extracted on O 2 if we perform local mea-surements on O 1 : In Eq. ( 29), we have defined the probabilities q i = Tr[Π i ρ O1O2 Π i ] of the outcome i and the post-measurement states ρi = Tr O1 [Π i ρ O1O2 Π i ] of the object O 2 .The minimisation is done over all possible sets of measurements {Π i } on O 1 , not necessarily orthogonal projectors.
The results are shown in Fig. 6.We start with the distribution of the mutual information I S 1 S 2 between the system qubits in the steady state.This shows that, although the optimal point II corresponds to uncorrelated flying qubits, the system qubits are nevertheless correlated as a result of their direct interaction and of reaching a non-equilibrium steady state due to the multiple collisions with the environment.A similar distribution is also obtained for the quantum discord D S 1 S 2 , which shows that the system qubit are also genuinely quantum correlated.
We have also considered the mutual information I A 1 A 2 between the flying qubits after the unitary but before the collision with the system.This shows that the preparation unitaries applied before the correlations do indeed create a lot of correlations, quantum or classical, but these do not necessarily lead to large values of work produced or injected.The extremal operation II in fact corresponds to zero mutual information between the flying qubits, which are thus in a product state.Similar conclusions, although quantitatively different, are reached when analysing concurrence and discord between the two flying qubits.
Finally, we have analysed the mutual information I AS between the flying qubits and the system after the collision.As before, the state of the system is steady.Thus, although it does not change during the collision, it sustains correlations to be created between system and each pair of environmental qubits.These correlations are necessary for allowing exchange of heat between the two reservoirs through the system.The distribution of I AS plotted in Fig. 6, shows that to achieve large amounts of work, and consequently heat exchange, it is sufficient a small value of I AS .In particular the non-correlating operations I-VIII, that leave the flying qubits in a product state, correspond to the smallest values of I AS .Finally, in all these figures of merit, the non-correlating operations I-VIII do not necessarily correspond to extremal points since these functions, mutual information and discord, are not linear functions of the state in contrast to the average work and heat.

VI. CONCLUSIONS
In this paper we have proposed a general framework to model quantum thermal machines in contact with correlated reservoirs using repeated interactions.Different conclusions are found depending on whether we assume the partial or the complete scenario, the latter one being always consistent with the laws of thermodynamics.
We have shown how, in the partial scenario, the amount of partial swapping among the flying qubits, allows one to control the operating mode of the thermal machine switching it from an engine to a refrigerator.
In the case of random unitaries, we found a complex geometrical structure in the distribution of heat and work bounded by a non regular octagon whose vertexes correspond to non correlating unitaries.We analysed the discord and mutual information between the flying qubits, the system qubits and between system and environment.We found that correlations in the system steady state and between system and environment are necessary to achieve the optimal performance.
Our work leads the way to future studies of open quantum systems with correlated environments consistently with thermodynamics.

36 FIG. 2 .
FIG.2.Top: Effective populations of the two flying qubits as a function of φ for n 1 = 1 and n 2 = 3. Bottom: Concurrence of the two flying qubits as a function of n 1 and n 2 for φ = 0.2π.

FIG. 4 .
FIG. 4. Histogram of the partial work W partial with the vertical axis measuring the corresponding probability density function (PDF) for 6 × 10 6 random unitaries.The solid line is the best fit normal distribution with average 9.6×10 −7 and standard deviation 1.1×10 −3 .The vertical dashed lines signpost the minimum and maximum possible values of W partial obtained with non-correlating unitaries (see text).Parameters as in Fig. 3 except for the local magnetic fields which are B 1 = 0.1 and B 2 = 0.15.

FIG. 5 .
FIG.5.Top: Joint histogram of the complete work W complete versus heat Q(2)  complete .The dashed gray line represents the Otto efficiency.The blue dots, connected by thin solid lines, are obtained for non correlating unitaries marked by the corresponding number.These special points form an extremal octagon within which all other machines obtained for random unitaries must be located.The colour code identifies the number of values in each bin of the histogram.Parameters:∆ = 1, γ = 1, B 1 = 0.1, B 2 = 0.15, n 1 = 0.1, n 2 = 2, τ = 0.1.Bottom: Extremal octagons obtained for the same parameters of the top panel but different values of B 2 = 0.15, 0.3, 0.6, 0.9, corresponding to vertexes denoted by circles, squares, triangles and diamonds, respectively.

FIG. 6 .
FIG.6.Histograms of the mutual information and quantum discord versus the total work W complete .From left to right: I S 1S 2 , , I A1A2 , I AS D S 1S 2 (see definition in the main text).The blue dots are obtained for non correlating unitaries specified by their label I-VIII.