Thermodynamics of the Coarse-Graining Master Equation

We study the coarse-graining approach to derive a generator for the evolution of an open quantum system over a finite time interval. The approach does not require a secular approximation but nevertheless generally leads to a Lindblad–Gorini–Kossakowski–Sudarshan generator. By combining the formalism with full counting statistics, we can demonstrate a consistent thermodynamic framework, once the switching work required for the coupling and decoupling with the reservoir is included. Particularly, we can write the second law in standard form, with the only difference that heat currents must be defined with respect to the reservoir. We exemplify our findings with simple but pedagogical examples.


Introduction
With the advent of an era where the promises of quantum computation [1] are approached in laboratories, one has to face the problem that controlled quantum systems are inevitably coupled to the outside world. The outside world can be approximated as a reservoir, which by construction contains infinitely many degrees of freedom. Since the required resources to simulate even finite quantum systems on classical computers scale exponentially with the number of constituents, the exact solution of the system-reservoir dynamics is futile except from a few exactly solvable cases.
Therefore, one typically aims to describe the dynamical evolution of an open quantum system by means of its reduced (system) density matrix only. To preserve the probability interpretation, the dynamical map governing the time evolution of the reduced density matrix should preserve its fundamental properties like trace, hermiticity, and positive semidefiniteness, at least in an approximate sense. While it is known that the exact dynamical map can be represented as a Kraus map [2] with intriguing mathematical properties [3], such a Kraus map is in general difficult to obtain from microscopic parameters. Many authors thereby follow the approach to find a first order differential equation with constant coefficients for the system density matrix. Here, the Lindblad-Gorini-Kossakowski-Sudarshan (LGKS) form master equation [4,5] stands out as it always preserves the density matrix properties. Although only a small fraction of Kraus maps can be represented as exponentiated LGKS generators [6], the class of LGKS generators is important since there exist standard routes to obtain them via microscopic derivations [7][8][9][10] from a global Hamiltonian of system and reservoir and their interaction. Technically, the standard route [8] is built on three basic assumptions: First, the Born approximation involves at least initially a factorization assumption between system and reservoir. Second, the Markovian approximation assumes that the reservoir re-equilibrates much faster than the system. Together these two in general suffice to obtain a time-independent generator that preserves trace and hermiticity. Third, to obtain a generator of LGKS form, it is additionally necessary to apply the secular approximation that assumes that the splitting between system energies is large. For a reservoir in thermal equilibrium, the dynamical map obtained this way will drag the system density matrix towards the local thermal equilibrium state of the system (which does not depend on the system-reservoir coupling characteristics) and moreover has a transparent thermodynamic interpretation [11][12][13]. This has sparked ideas to explore the potential of open quantum systems as quantum heat engines [14], which is nowadays part of a somewhat larger research field called quantum thermodynamics [15]. Clearly, the approximations required to arrive at a LGKS generator may become invalid for realistic systems, and it has, e.g., been highlighted that the use of LGKS generators may lead to inaccuracies [16] and even unphysical artifacts such as finite currents through disconnected regions or discontinuous dependence on parameters [17]. These shortcomings need not be taken as argument against LGKS approaches in general [18] but should be considered as a warning to mind the region of validity and as a motivation to develop alternative derivation schemes with controlled approximations [19][20][21].
In this paper, we will consider the coarse-graining approach [18,[22][23][24][25][26][27][28][29][30], which by construction for short coarse-graining times approaches the exact short-time dynamics, is always of LGKS form, and for large coarse-graining times performs a secular approximation. For fixed coarse-graining times it effectively implements a partial secular approximation [31,32], for which to best of our knowledge a thermodynamic interpretation has only been performed from the system perspective [30] without an exact assessment of the reservoir heat.
The article is organized as follows: In Section 2 we introduce the coarse-graining generator with a counting field resolving the energy changes of the reservoir and discuss its properties. In Section 3 we then discuss the energy conservation and show a second-law type inequality for the entropy production rate. We proceed by exemplifying this for simple model systems where analytic approaches are possible like the spin-boson pure-dephasing model in Section 4, the single resonant level in Section 5, and the single-electron transistor in Section 6, before concluding in Section 7. Technical derivations are provided in an appendix.

Fixed-Time Coarse-Graining
We consider an open quantum system that is (possibly repeatedly) brought into contact with a unit of a stream of reservoirs as depicted in Figure 1.
In contrast to collisional models [33][34][35][36], we consider each unit of the reservoir stream to be of infinite size, such that even for a single system-unit interaction, the dynamics cannot be solved in general.
The total Hamiltonian of our setup can be written as with system Hamiltonian H S and reservoir Hamiltonian H B,n of unit n. The dimensionless coupling functions g n (t) sequentially turn on and off the interaction. For simplicity, we will consider them as piecewise constant and non-overlapping g n (t)g n+1 (t + 0 + ) = 0, but these conditions may be somewhat relaxed. Further, each interaction Hamiltonian can be expanded in terms of system (A α ) and reservoir (B α ) coupling operators Although achievable by suitable transformations, we do in this paper not require that system and bath coupling operators are individually hermitian. At the beginning of the interaction, each reservoir unit is prepared in the state ρ B,n . Since in the following we assume that all the reservoir units are identically prepared and coupled ρ B,n= ρ B , B α,n= B α , H B,n= H B , H I,n= H I , we will drop the index n, which just served as a reminder on which Hilbert space the associated operators are acting. This setting can be easily generalized to multiple reservoirs that are coupled simultaneously-in Figure 1 these would just induce parallel streams. To probe the case of just a constant system-reservoir interaction, we may consider the case τ → ∞, where the standard weak-coupling thermodynamic analysis applies.
For practical calculations, a time-local first order differential equation for the system density matrix-a master equation-is beneficial, since it allows for a simple propagation of the system density matrix. Going to the interaction picture (bold symbols) with respect to H S + H B allows to microscopically derive such a LGKS generator. Specifically, it follows by the demand to find a time-local generator L τ for the system that yields the same dynamics as the exact solution after coarse-graining time τ for all initial states of the system ρ S (t 0 ) and identical initial reservoir states ρ B . Consistently, we have also dropped the index n in the dissipator (calligraphic symbols denote superoperators throughout). The r.h.s. can be determined perturbatively [22], which allows to explicitly calculate the generator of the evolution. Since we generalize the setting by allowing for initial times t 0 > 0, we detail this derivation in Appendix A. Additionally, to track the statistics of energy entering the reservoir unit n, the dissipator can be generalized by a counting field, and a microscopic derivation of this along the lines of Ref. [37] is provided in Appendix B. The generalized coarse-graining master equation is then given by d Here, A α (t) = e +iH S t A α e −iH S t are the system coupling operators in the interaction picture (bold symbols throughout), and the generalized reservoir correlation functions encode the reservoir properties, where we use an (initial) grand-canonical equilibrium state with inverse temperature β, chemical potential µ, and partition function Z B = Tr e −β(H B −µN B ) . In case of multiple reservoirs that are simultaneously coupled to the system, this is generalized to a tensor product of local equilibrium states. The superoperator L τ evidently also depends on t 0 and the reservoir properties, which for the sake of brevity we do not make explicit. We summarize a few useful properties of Equation (4): • For ξ = 0 the conventional fixed-time coarse-graining master equation [22,23] is reproduced. Notationally, we will denote this limit as L τ ≡ L τ (0). Previous studies (for t 0 = 0 [22]) have shown that L τ is always of LGKS form, and we can also confirm this for finite t 0 , see Appendix C. Thus, Spohn's inequality [12] holds with any nonequilibrium steady stateρ τ obeying L τρτ = 0 (which may in general depend on t 0 as well).

•
It has been debated whether local or global LGKS approaches are more suitable to discuss quantum thermodynamics [34,[38][39][40]. To see how the dissipator (4) locates in this discussion, let us assume that our system is composed of multiple subsystems that are coupled by some constant interaction.
Then, system coupling operators A α that in the Schrödinger picture act locally on a subsystem component will in general transfer to non-local interaction-picture operators A α (t). Thereby, the Lindblad operators from the LGKS generator (4) will in general globally act on the whole system. An obvious exception arises in the case when the time-dependence of the system operators itself is negligible A α (t) ≈ A α , which happens, e.g., in the singular coupling limit [8] or for very short coarse-graining times. Another exception arises when the couplings between the subsystem components are comparably weak, such that the operators in the interaction picture A α (t) remain approximately local over the course of the coarse-graining timescale τ. • By going to the energy eigenbasis of the system, it is possible to cast the dissipator (4) into a single-integral form. Furthermore, for τ → ∞, the Born-Markov-secular (BMS) master equation [8] is reproduced [10] lim τ→∞ L τ = L BMS , (8) such that the secular approximation can be performed by τ → ∞, which we detail also for finite t 0 in Appendix D. We also find that in the secular limit, the energy current entering the system and the energy current leaving the reservoir are identical, which demonstrates that a secular approximation imposes energy conservation between system and reservoir.

•
When the dissipator does not depend on the initial time t 0 -this happens, e.g., when only certain combinations of coupling operators contribute A α (t 1 ) = A α e +i α t 1 and A β (t 2 ) = A † α e −i α t 2 such that the integrand in Equation (4) depends only on t 1 − t 2 -the system will under repeated system-reservoir couplings relax to the nonequilibrium steady stateρ τ . When this nonequilibrium steady state is reached, Spohn's inequality (7) would predict a vanishing entropy production rate.
As we will show in this paper, despite the fact thatρ τ is a nonequilibrium steady state already for a single stream of reservoirs, a thermodynamic interpretation of the coarse-graining master equation for finite t 0 and τ is possible. The conservation of energy then requires to take into account the work required for coupling and decoupling the reservoir and one can then demonstrate positivity of a global entropy production rate, which involves system and reservoir units altogether. After the interaction, another collision can take place with a fresh reservoir, whereas the used reservoir is wasted (faint colors). The effective evolution of the system over the interval [t 0 , t 0 + τ] is described by the coarse-graining dissipator L τ , but the statistics of heat entering the reservoir (detector symbol) can be tracked with a generalized master equation by means of a counting field ξ. The generalization to multiple reservoirs that are coupled simultaneously would induce parallel streams (not shown).

Energetic Balance
The energy change of system and reservoir together must be balanced by the switching work spent to couple them via g n (t) at t 0 and to decouple them at t 0 + τ Thus, when the switching work is negligible, this implies that the energetic changes in the reservoir can be deduced from the changes in the system, and an explicit counting field analysis would not be necessary.
To the contrary, when the system density matrix has reached a (possibly stroboscopic) steady state such that ∆E S can be neglected, all the switching work invested is dissipated as heat into the reservoir. It is reassuring to test the energy conservation explicitly, see Appendix E. Since we will in general not be able to write down exact expressions for the energetic system and reservoir changes and the switching work, we in the following derive expressions based on (4) valid to second order in the system-reservoir interaction strength. For fixed coarse-graining time τ, the time-dependent solution of the coarse-graining master equation is given by ρ S (t) = e L τ (t−t 0 ) ρ 0 S . By using this dissipator, we will of course match the initial condition ρ 0 S when t = t 0 . Likewise, for t − t 0 = τ, one will best approximate the true solution. Using the dissipator L τ for times 0 < t − t 0 < τ just yields coarse-grained estimates of the evolution while the system is in contact with the first unit. Whereas for t − t 0 = nτ with n ∈ N, the solution describes n successive interactions with units, the choice nτ < t − t 0 < (n + 1)τ yields coarse-grained estimates as solution for n successive interactions that have passed while the system is in the process of interacting with the n + 1st unit. Thus, t > 0 can be chosen freely while τ is fixed. Then, the system energy change is for fixed τ just given by We denote this as energy current entering the system, adopting the convention that positive contributions increase the system energy. Furthermore, for an additive decomposition of the dissipator into multiple reservoir contributions L τ → ∑ ν L ν τ it is straightforward to also decompose the current into contributions entering from reservoir ν To obtain the energy change of the reservoir, we consider the counting field ξ. The first moment of the energy change can be computed by the first derivative with respect to the counting field (see Appendix B), whereas for the energy current we consider an additional time derivative. Then, we have for the energy current leaving the reservoir (this is positive when it decreases the reservoir energy) where we have used the trace conservation property of L τ . Furthermore, here, for multiple reservoirs, an additive decomposition of the dissipator L τ (ξ) → ∑ ν L ν τ (ξ ν ) with reservoir-specific counting field ξ ν transfers to an additive decomposition of the total current In the secular limit τ → ∞ we can show that the currents in Equations (10) and (12) coincide, see Appendix D. By the conservation of energy (9), we therefore define the switching power as but in Appendix E we also provide an independent approximation (A25) to the switching work.

Entropic Balance
We start from the generalized coarse-graining master Equation (4) with an energy counting field ξ. We can evaluate this equation in the (orthonormal) basis (see also, e.g., [41]) where its solution, the time-dependent density matrix, is diagonal such that |j(t) represent the eigenstates and P j (t) the eigenvalues of the density matrix. Only when τ → ∞ and the system relaxes to a steady state, this would correspond to the system energy eigenbasis (see Appendix D), but in general this basis will be different. To describe also models with particle exchange between system and reservoir, we additionally assume that these eigenstates are also eigenstates of the system particle number operator N S |j(t) = N j |j(t) , i.e., the system density matrix must not contain superpositions of states with different particle numbers. Then, by evaluating Equation (4) in the basis |j(t) , one finds that the eigenvalues P i (t) obey a generalized rate equation and the (tacitly time-dependent) transition rate from j → i is generated by the jump term of Equation (4) where we have omitted the time-dependence of the eigenstates for brevity. The energy-resolved quantity R τ ij,+ω is thus also time-dependent but unambiguously defined by a Fourier transform with respect to the counting field. In Appendix F we detail that R τ ij,ω ≥ 0 and hence it can be interpreted as a rate for processes with a system transition from j → i that go along with a reservoir energy change +ω. In the eigenbasis of the time-dependent solution ρ S (t), the energy current leaving the reservoir (12) can be represented in the standard rate equation form (albeit with time-dependent rates) However, we emphasize that the above current can be determined using Equation (12) without diagonalizing the time-dependent density matrix. For the specific examples we consider below, even an analytic calculation of the time-dependent rates R τ ij,+ω is possible. When the total particle number (of system and reservoir unit together) is conserved [H S , N S ] = [H B , N B ] = [H I , N S + N B ] = 0, any particle change N i − N j in the system is accompanied by the corresponding negative change N j − N i in the reservoir, such that a matter current leaving the reservoir or entering the system can be defined in analogy to Equation (10) We then show in Appendix F that the energy-resolved time-dependent rates obey a detailed balance relation whereas the integrated rates R τ ij (0) do not. For multiple reservoirs characterized by local equilibrium states of inverse temperature β ν and chemical potential µ ν , each fulfilling Tr H I ρ (ν) B = 0, we have under the weak-coupling assumption an additive decomposition of rates where R τ,(ν) ij,+ω represents the individual contribution of the νth reservoir. Then, the detailed balance relation (20) holds locally and also the matter current can be written in a reservoir-specific form We show in Appendix F that the second law can with (22) and (13) be written aṡ where S = −Tr {ρ S (t) ln ρ S (t)} is the entropy of the system only and the other terms describe the entropy produced in the reservoir units. Individually, each of these contributions may become negative and is only subject to the constraint that the second law is obeyed globally. We have constrained ourselves to fixed coarse-graining times, for which we can write the second law in differential form, since the usual LGKS formalism, albeit with differently defined energy currents, applies. Considering the dynamical coarse-graining approach [23,28,30], we note that the integrated entropy production ∆ i S(τ) = τ 0Ṡ τ i (t)dt ≥ 0 is then evidently also positive but not necessarily a monotonously growing function of τ.

Model and Exact Results
The pure dephasing spin-boson model describes a two-level system with energy splitting ω that is coupled via a purely dephasing interaction with spontaneous emission amplitudes h k to a reservoir of harmonic oscillators of (positive) energies ω k .
Since interaction and system Hamiltonian commute, the model can be solved exactly [22,42], and from the exact solution one finds that the populations in the system energy eigenbasis remain constant, whereas the coherences decay where β denotes the inverse reservoir temperature (we consider µ = 0) and Γ(ω) = 2π ∑ k |h k | 2 δ(ω − ω k ) the spectral density of the reservoir. Constant populations in the system eigenbasis imply that the system energy remains constant. Additionally, the exact solution also predicts that energy is radiated into the reservoir (see Appendix G) which does not depend on initial system and reservoir states and stems from the interaction Hamiltonian.

Coarse-Graining Dynamics
The coarse-graining dissipator (4) for the pure-dephasing model is particularly simple as the system coupling operator in the interaction picture carries no time-dependence Here, the Lamb-shift contribution has been dropped as it is proportional to the identity, and the correlation function is given by C(∆t) = 1 2π dωΓ(ω)[1 + n B (ω)]e −iω∆t where the analytic continuation of the spectral density as an odd function is understoodΓ(−|ω|) = −Γ(|ω|) andΓ(+|ω|) = +Γ(|ω|), and n B (ω) = [e βω − 1] −1 denotes the Bose distribution. Since the integrand only depends on the difference t 1 − t 2 , the dissipator does not even depend on the initial time t 0 . The solution of the above differential equation predicts a decay of coherences (t 0 = 0) where sinc(x) ≡ sin(x)/x, whereas populations remain constant. For t = τ, this result matches the exact solution (27) [23], i.e., we have ρ exact (30) and (27) can be explicitly seen by rewriting in the above equation the negative frequency component of the integral.

Energetic Balance
Additionally, we show that also the energy radiated into the reservoir is faithfully reproduced by the generalized coarse-graining master equation. The energy current entering the system (10) vanishes We note that for this model, alternative constructions for a refined system energy current based on a time-dependent Hamiltonian of mean force would lead to the same result: Since the system Gibbs state ρ β = e −βH S /Z S is just invariant under the pure dephasing dissipator, the "refined heat flow" suggested in Equation (66) of Ref. [30] vanishes as well.
From the counting field formalism we do however obtain that the energy current leaving the reservoir (12) in this model remains finite and time-independent where the last line can be shown by usingΓ(−ω) = −Γ(ω) and [1 + n B (−ω)] = −n B (ω) in the negative frequency components of the integral. The integral over this current over the coarse-graining time precisely matches the exact solution (28): τ I E,B = ∆E ex B (τ, 0). We also remark that the approximation to the switching work (A25) becomes 2π sinc 2 ωτ 2 , which in this case is exactly equivalent to the integral of the energy current leaving the reservoir (32) up to t = τ, i.e., to the end of the collision. Thus, in this model we obtain that the complete switching work is dissipated as heat into the reservoir ∆W(t 0 + τ, t 0 ) = ∆E B (t 0 + τ, t 0 ).

Entropic Balance
The energy-resolved rates become With them, we can likewise confirm that the energy current (32) is time-independent-using completeness of the basis and (σ z ) 2 = 1. Inserting this in the global entropy production rate (23) we obtaiṅ This decomposes into two separately positive terms: The first term is the change of the system entropy, which by mere reduction of coherences just increases (see, e.g., [43]), and has been analyzed for this model before (see, e.g., [44]). Once the system has reached its stationary limit, it will vanish. The second term is positive since the integrand is positive but it remains finite for finite τ. Furthermore, since both the reduced system dynamics and the energy leaving the reservoir are exactly reproduced for t = τ, we also note that this matches the results of Ref. [45] when applied to the pure dephasing model. We additionally remark that we can compare the global entropy production rate with the entropy production rate σ τ based on Spohn's inequality. Here, the second term in Equation (7) vanishes since lnρ S has only diagonal and L τ ρ S has only off-diagonal components, such that σ τ =Ṡ yields only the entropy change in the system. Thus, in the pure-dephasing model, Spohn's inequality completely neglects the entropy production in the reservoir, see also Figure 2 for a comparison. Spohn production rate σ (τ=t) global production rate (τ=t) Figure 2. Global entropy production rateṠ τ i for either fixed coarse-graining times (orange, for Γτ ∈ {1, 2, 3, 4} from top to bottom) or dynamical coarse-graining times (red symbols) and Spohn entropy production rate (black symbols) versus dimensionless time. Bold curve segments correspond to a single unit interaction, whereas the thin dashed projections for t > τ describe repeated system-unit interactions, leading to a finite non-vanishing steady state entropy production rate. Both global entropy production rate and Spohn's entropy production rate are positive, but the latter underestimates the full entropy production significantly. Parameters: ρ ij 0 = 1/2,Γ(ω) = Γω/ω c e −|ω|/ω c with Γβ = 1, ω c = 10Γ.

Model
The single resonant level (SRL) is described by a single fermionic mode of energy (e.g., a quantum dot in the strong Coulomb blockade regime) that is tunnel-coupled to a fermionic reservoir with single-particle energies k via the amplitudes t k Here, we have already represented the interaction Hamiltonian in terms of local system and reservoir fermions. Such a tensor product decomposition is possible using a Jordan-Wigner transform [17] but is typically performed tacitly. We can thus identify the system coupling operators A 1 (t) = d † e +i t and A 2 (t) = de −i t and the Fourier transforms of the reservoir correlation functions γ 12 denotes the spectral density (also termed bare tunneling rate in this context) and f (ω) = [e β(ω−µ) + 1] −1 the Fermi function of the reservoir in equilibrium. The model is also exactly solvable [24,46,47], but we will only consider the coarse-graining dynamics here (which converges to the exact solution, e.g., in the weak-coupling limit or for short times).

Coarse-Graining Dynamics
The coarse-graining master Equation (4) for the SRL reads in the interaction picture It does not depend on t 0 , since due to the structure of the correlation functions, only time differences enter Equation (4). An alternative motivation of such a dissipator with two terminals can be found via repeated projective measurements on the system that restore a product state between system and reservoir [48]. Further, since a single quantum dot does not carry any coherences, we have [ρ S (t), d † d] = [ρ S (t), dd † ] = 0, and the Lamb-shift type commutator term drops out from the beginning. Still, the dot populations can change under the dynamics. From the above dissipator, the probability of finding a filled dot follows the differential equation with the positive rates which for τ → ∞ collapse to the usual secular description of the SRL. This differential equation can be readily solved

Energetic Balance
The energy current leaving the reservoir (12) becomes This current differs from the energy current entering the system (10) and they become equal when τ → ∞.
When we consider the approximate switching work (A25), we get where we see that the first law is respected to O{Γ} = O λ 2 .

Entropic Balance
Since the basis diagonalizing the time-dependent density matrix is constant, the energy-resolved rates are constant as well and reproduce Equation (42) when computing the energy current via I E,B = dωω ∑ ij R ij,ω P j . We can thus insert the energy current leaving the reservoir (42) and the matter current I M,B (t) = γ τ in [1 − P 1 (t)] − γ τ out P 1 (t) into the second law (23) Here, the first and second contributions of system and reservoir can individually become negative. In fact, in Figure 3 we start from the maximum entropy state in the system, such that the system entropy can only decrease. However, this is then always over-balanced by the other contribution, such that one can see in Figure 3 that the global entropy production is positive. Further, the associated Spohn production rate (7) still significantly underestimates the global entropy production rate. One can also see that the global entropy production rate does not vanish for t → ∞ as long as τ remains finite (dashed extrapolation of orange curves), in contrast to Spohn's inequality. This limit t τ corresponds to repeated interactions with the reservoir units, and although the system reaches a (nonequilibrium) steady state, the switching work leads to a constant energy current entering the reservoir streams, producing entropy there also at steady state. Spohn production rate (τ=t) global production rate (t=t) Figure 3. Entropy production rates of the SRL (color coding as in Figure 2). The global entropy production rate (red and orange) is significantly larger than that given by Spohn's inequality (black). Parameters: (ω−ε) 2 +δ 2 with ε = = 0, Γβ = 0.1, δβ = 10, βµ = −2.

Example: Single Electron Transistor
We have so far discussed examples with an equilibrium environment. The SRL discussed before may directly be extended to two terminals, which in Figure 1 would correspond to two parallel streams of reservoir units, and the dissipator under the weak-coupling assumption decomposes additively in the reservoirs. Then, the expressions for the energy current (43) can be straightforwardly generalized: The energy current (13) leaving the reservoir ν becomes and similar one gets for the matter current (22) entering from reservoir ν With this, the second law (23) becomeṡ We plot the entropy production rate in Figure 4. t→∞ t=1000τ t=100τ t=10τ τ=t→∞ (stat. BMS limit) ∈τ=1 (τ=t) ∈τ=10 (τ=t) ∈τ=100 (τ=t) Figure 4. Entropy production ratesṠ τ i (t) of the single electron transistor versus bias voltage V = µ L − µ R . The stationary BMS entropy production rate (black, t = τ = ∞) is finite since the environments are at different thermal equilibrium states, such that a stationary current is flowing, except at its minimum where it vanishes. For finite system and reservoir contact duration τ, the entropy production rate over one contact is significantly larger (red, dark green, dark blue), and in particular does not vanish anywhere as entropy is produced in the reservoirs. This is also observed when the corresponding dissipator is applied repeatedly (light colors with t = 10τ (dashed), t = 100τ (dash-dotted), and t = 1000τ (dotted) and t → ∞ (thin solid). Parameters: There, we see that the BMS entropy production rates of the SET (see also Ref. [49] for this limit) are approached only for comparably large coupling times between system and reservoir (blue).
At steady state (t → ∞ but τ finite), the system relaxes tō and accordingly, the system contribution to the second law drops outṠ → 0. Furthermore, we can use that the matter currents at steady state are conservedĪ M ≡Ī E,B ≥ 0. At steady state, we also haveĪ E,B = 0. This implies that, when using expressions for the entropy production rate based on system energy currents, one can for example break the steady-state thermodynamic uncertainty relation [50]. Instead, using our expression for entropy production based on reservoir energy currents, we did numerically not find any violation for multiple parameters.
As an application, we outline how to estimate efficiency bounds following from the second law at steady state. Since at steady state, the system cannot absorb energy anymore, we can write the stationary switching power (14) simply asP sw = −Ī E,B , which allows us to write the second law at steady state as¯Ṡ When (without loss of generality) we consider the scenario µ L < µ R and β L < β R (i.e., the left reservoir is hotter T L > T R ), one can use heat from the hot left reservoir unit to transport electrons through the dot against the potential biasĪ M > 0, generating electric power P el = −(µ L − µ R )Ī M > 0. Considering the original scenario of converting only heat from the hot (left) reservoir to electric power we also assume that the switching power is negativeP sw < 0. Then, the efficiency of this process is Thereby, the wasted switching power reduces the maximum achievable efficiency below the Carnot value.
In contrast to this analysis, continuously operating engines accomplish the conversion of energies while remaining coupled to all reservoirs all the time [51]. Since in these devices one does not have a cost associated to coupling and decoupling processes, they have an intrinsic advantage compared to their finite-stroke counterparts.

Summary and Conclusions
We have provided a thermodynamic interpretation of the coarse-graining master equation. The switching work required to couple and decouple system and reservoirs leads to a difference between the energy entering the system and the energy leaving the reservoir. With a counting field formalism, we can track the latter and established a second-law inequality, which assumes a standard form despite the fact that the coarse-graining dissipators drag to a nonequilibrium steady state. We exemplified this for the pure-dephasing model, the single resonant level, and the single electron transistor. Although these models are particularly simple and even admit a mostly analytical treatment, we would like to stress that the method can be applied to arbitrary systems. In this case, the time-dependent currents in the second law will have to be calculated numerically. We expect our findings to be relevant for systems that are coupled to reservoirs only for a finite time, e.g., in finite time thermodynamic cycles [52][53][54][55][56][57][58], where the coarse-graining dissipator is a more appropriate choice for finite-time dissipative strokes than the usual BMS limit.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Derivation of the Coarse-Graining Dissipator
To derive Equation (4) we consider the time evolution operator in the interaction picture (bold symbols). It propagates the solution of the time-dependent Schrödinger equation By integrating the above equation and inserting the solution into the r.h.s., we get the expansion 1 1 is small (which happens for weak coupling strengths but also for short coarse-graining times). However, there are also other cases where the interaction Hamiltonian in the interaction picture is so rapidly oscillating that all higher order contributions can be neglected. In these cases, coarse-graining attempts to find a time-local generator L τ for the system that yields the same dynamics as the exact solution after coarse-graining time τ, provided the system and the reservoir at time t 0 are in a product state. If H I (t) = O{λ} and Tr B {H I ρ B } = 0 (which can be achieved by suitable transformations if not present from the beginning), we conclude from Equation (3) that L τ = O λ 2 , such that to second order in λ we get the relation (A4) We represent the interaction Hamiltonian (2) with piecewise-constant coupling function g n (t) ∈ {0, 1} in the interaction picture as H I (t) = ∑ α A α (t) ⊗ B α (t) with not necessarily hermitian system A α (t) = e +iH S t A α e −iH S t and bath B α (t) = e +iH B t B α e −iH B t operators. Furthermore, for fermions, such a tensor product form can be obtained. Then, we can also introduce the reservoir correlation functions C αβ (t 1 , which yields Equation (4) in the main text without a counting field (ξ = 0) applied to an initial state ρ S (t 0 ). The above coarse-graining dissipator depends on t 0 and τ, but is always of LGKS form, see Appendix C. A smoother dependence of the coupling function g n (t) would lead to more complicated integrands but the derivation would look essentially similar. Moreover, since the first order expectation value of the interaction Hamiltonian vanishes, even overlapping coupling functions g n (t) would be allowed.

Appendix B. Inclusion of Full Counting Statistics
To include the counting field in Equation (4), we use that the two-point measurement formalism [37] can be easily combined with the coarse-graining approach. We define the moment generating function for the energy transferred into the reservoir during [t 0 , t 0 + τ] where H B | = E | defines an (abstract) initial measurement of the reservoir energy. For a particular realization of the measurement the quantity ρ ( ) B = | | ρ B | | denotes the appropriately projected density matrix. Then, one can see that moments of the energy transferred into the reservoir can be obtained by pulling derivatives with respect to the counting field ∆E k B = (−i∂ ξ ) k M(ξ)| ξ=0 . For the coarse-graining approach, the derivations in Ref. [37] can be followed in a straightforward way: Under the assumption that ∑ ρ ( ) B = ρ B (which holds for a reservoir equilibrium state and energy measurements), where H +ξ/2 I (t) ≡ e +iξ/2H B H I (t)e −iξ/2H B . Upon inserting the correlation functions, the counting field only remains in the jump term eventually yielding Equation (4) in the main text with counting field ξ. To the regime of validity of the expansion, the moment-generating function can then be evaluated by the generalized density matrix of the system only and suitable derivatives can be used to extract, e.g., the energy current (12), but also higher moments can be computed. Particle counting in the reservoirs can in principle be performed in full analogy (where in the above derivation ξ H B → χN B ), but for the sake of simplicity we consider setups where the total Hamiltonian is particle conserving, such that the particle statistics in the reservoir can be reconstructed from the particle change in the system.

Appendix C. Demonstration of LGKS Form
To demonstrate that Equation (4) is for ξ = 0 a LGKS-type generator, we have to demonstrate two issues.
We first show that the effective Hamiltonian (Lamb-shift term) in the commutator term of Equation (4) is hermitian where we have used that H I (t) = H † I (t) and exchanged α ↔ β as well as t 1 ↔ t 2 . Still we note that in contrast to the secular limit, we have [H S , H LS ] = 0 for finite τ.
Second, we rewrite the dissipator term via introducing an arbitrary fixed operator basis where L ab ≡ |a b|. Then, the dissipative part of Equation (4) becomes for ξ = 0 and we need to show that the coefficient matrix γ ab,cd (which depends on t 0 and τ) is positive semidefinite. We demonstrate this via where positivity in the last line follows for any valid density matrix ρ B and arbitrary operators C. The LGKS property of Equation (4) is thus quite general and-since we did not make the time-dependence of the coupling operators explicit-valid also for any time-dependent driving. When transforming back to the Schrödinger picture, the generator will for finite τ obtain some time-dependent phases and will thereby generalize to a time-dependent LGKS form, which however also preserves the density matrix properties.

Appendix D. Single Integral Representation and Secular Limit
Making the interaction picture time dependence explicit by diagonalizing the system Hamiltonian H S |a = E a |a and introducing Fourier transforms of the correlation functions where the sum over ω 1 includes the Bohr frequencies (transition energies) of the system, we can perform all temporal integrations where sinc(x) ≡ sin(x)/x. With this, we can write the coarse-graining dissipator (4) in terms of a single frequency integral For large coarse-graining times, the band-filter functions converge to which collapses one sum and the integration in the dissipator which for ξ = 0 is just the standard Born-Markov-secular master equation. It has the appealing property that for a non-degenerate system Hamiltonian, it decouples the evolution of populations and coherences yielding the usual Pauli master equation with its favorable thermodynamic properties [8], but also for a system Hamiltonian with exact degeneracies a consistent thermodynamic formulation can be established [59]. For finite coarse-graining times however, Equation (4) will maintain a coupling between populations and coherences in the system energy eigenbasis. We also show that the energy current entering the system (10) and the energy current leaving the reservoir (12) coincide in the secular limit. For this, we note that the decomposition (A14) implies that [A α,ω 1 , H S ] = −ω 1 A α,ω 1 . These relations can be used to rewrite the energy current entering the system (10) in the secular limit τ → ∞ as Simple execution of the derivative in Equation (12) in the secular limit (A18) shows that then, the energy current leaving the reservoir is identical to the energy current entering the system and it formally explains that for τ → ∞, the global entropy production rate and Spohn's entropy production rate coincide.

Appendix E. Conservation of Energy
To explicitly show the global validity of the first law (9), we write for the system energy change which follows from the definition of the coarse-graining dissipator. The reservoir energy change can likewise be written as and in these steps we have used that the system and reservoir energies do not depend on the switching process (e.g., E S (t 0 − ) = E S (t 0 + ) for piecewise-constant switching). To evaluate the switching work, we have to be more careful. It is composed from the energy required for coupling at t 0 and for decoupling at t 0 + τ. Thus, for → 0 we can write ∆W(t 0 + τ, t 0 ) = Tr {[g n (t 0 + ) − g n (t 0 − )] H I (t 0 )ρ S (t 0 ) ⊗ ρ B } + [g n (t 0 + τ + ) − g n (t 0 + τ − )] × × Tr H I (t 0 + τ)U(t 0 + τ, t 0 )ρ S (t 0 ) ⊗ ρ B U † (t 0 + τ, t 0 ) where we have used that g n (t 0 + ) = g n (t 0 + τ − ) = λ and g n (t 0 − ) = g n (t 0 + τ + ) = 0, see Figure 1 bottom. For smooth dependencies g n (t), we expect that the analysis would be more complicated but could still be split into infinitesimal piecewise-constant coupling and decoupling processes. Combining it all we get which follows since system and reservoir unit evolve as a closed system while they are coupled, such that their joint energy cannot change, thereby confirming the first law (9) in the main text. The last three equations are solved bỹ which also respects the initial conditionb k (0) = b k . This already tells us that the total expectation value of the reservoir energy becomes where the second term on the r.h.s. yields Equation (28). For completeness, we note that the remaining two differential equations can be re-organized as d dtσ σ + and similar for the hermitian conjugate, which can in principle be solved after inserting the solutions above.