Completely positive master equation for arbitrary driving and small level spacing

Markovian master equations are a ubiquitous tool in the study of open quantum systems, but deriving them from first principles involves a series of compromises. On the one hand, the Redfield equation is valid for fast environments (whose correlation function decays much faster than the system relaxation time) regardless of the relative strength of the coupling to the system Hamiltonian, but is notoriously non-completely-positive. On the other hand, the Davies equation preserves complete positivity but is valid only in the ultra-weak coupling limit and for systems with a finite level spacing, which makes it incompatible with arbitrarily fast time-dependent driving. Here we show that a recently derived Markovian coarse-grained master equation (CGME), already known to be completely positive, has a much expanded range of applicability compared to the Davies equation, and moreover, is locally generated and can be generalized to accommodate arbitrarily fast driving. This generalization, which we refer to as the time-dependent CGME, is thus suitable for the analysis of fast operations in gate-model quantum computing, such as quantum error correction and dynamical decoupling. Our derivation proceeds directly from the Redfield equation and allows us to place rigorous error bounds on all three equations: Redfield, Davies, and coarse-grained. Our main result is thus a completely positive Markovian master equation that is a controlled approximation to the true evolution for any time-dependence of the system Hamiltonian, and works for systems with arbitrarily small level spacing. We illustrate this with an analysis showing that dynamical decoupling can extend coherence times even in a strictly Markovian setting.


Introduction
Modeling experiments requires taking into account that physical systems are open, i.e., not ideally isolated from their environments. Usually an environment contains many more degrees of freedom than the system itself, but is not in any interesting phase of matter where the detailed modeling of each of those degrees of freedom is required. This makes the problem of modeling open systems tractable. More precisely, the problem is tractable under a list of assumptions on the parameters of the bath (environment) and its interaction with the system [1][2][3].
One natural approach is to consider the case when this interaction is weak compared to all other energy scales in the problem. In this limit, Davies showed [4] that the dynamics of the system are given by a Markovian master equation with what is now called Davies generators. Rigorous bounds on the error between the solution of this equation and the true evolution can be obtained [presented here in Eq. (264)]. The largest contribution to the error comes from making the rotating wave approximation (RWA). 1 After the system evolves for a time set by a relevant relaxation timescale, the error in its density matrix is given by: system-bath coupling strength × bath correlation time/system level-spacing . (1) This quantity, in general, becomes exponentially large in the system size due its denominator, so that the coupling strength or the bath correlation time need to be sufficiently small for the use of Davies generators to be justified, up to some upper system size limit. In practice, for convenience and also because it may apply in a range that is larger than the rigorous but conservative bounds imply, the Lindblad master equation [5] with Davies generators is often used outside its formal range of applicability in modeling of experiments (e.g., Ref. [6][7][8][9]). In such cases it should be understood as a semi-empirical model of open system dynamics, that possesses all the physical properties of the dynamics without reproducing them exactly. Unfortunately, since we naturally wish to apply modeling tools to problems for which we do not know a priori what the correct answer is, this approach cannot provide correctness guarantees. However, other methods are even more susceptible to this problem, e.g., a path-integral (non-master equation) approach based on integrating out the bath [10][11][12]: this involves integration over a very high-dimensional space, so methods [13] that bring it back into the realm of numerical feasibility usually involve uncontrollable approximations. One of the important requirements of open system dynamics is complete positivity [14], under which density matrices whose eigenvalues are by definition non-negative are mapped to other such matrices, even when applied to a subsystem of a larger system. 2 This property is equivalent to the Markovian master equation being in Lindblad canonical form [5,16]. There are numerous other master equations (e.g., Refs. ), some in Lindblad form and some not, whose domains of validity and ranges of applicability were not always studied in detail. One promising candidate is a coarse-grained master equation (CGME) [40], which is in Lindblad form and thus automatically completely positive (CP). In this work we show that a suitably generalized variant of this equation, that includes an arbitrarily time-dependent system Hamiltonian (hence called the "time-dependent CGME"), has a much milder error than (1): system-bath coupling strength × bath correlation time , which does not diverge with the system size n for local observables, and has only a polynomial [O(n α ) with 1/2 ≤ α ≤ 1] prefactor for nonlocal observables. We note that the full form of the error estimate (2) is not uniform over the evolution time, unlike some of the error bounds developed elsewhere [39,41]. We also show that this new master equation is an improvement over the Lindblad equation with Davies generators in that it has a local structure, compatible with approximate simulation methods with asymptotically smaller costs [O(n) vs. O(exp(n))], and that the error estimate (2) is valid for an arbitrary time-dependence of the system Hamiltonian. In particular, the time-dependent CGME is compatible with the assumption of arbitrarily fast gates, often made in the circuit model of quantum computing, e.g., in the analysis of fault-tolerant quantum error correction [42]. This assumption was shown to be incompatible with the derivation of the Davies master equation [43]. This paper is structured as follows. We summarize our main results in Sec. 2, where we present the main master equations involved in this work: Redfield and Davies-Lindblad (well known), and coarse-grained, both time-independent and time-dependent (new). We also present bounds that provide the range of applicability of each type of master equation (new). We show that these bounds can be expressed entirely in terms of only two timescales, namely the fastest system decoherence timescale, and the characteristic timescale of the decay of the bath correlation function. The reader interested only in the results and not in the details of derivations can safely read only this section and then skip to the conclusions in Sec. 7. Derivations begin in Sec. 3, where we present a simple, new derivation of the time-independent CGME. We express the equation in CP (Lindblad) form, state the range of validity for different approximations made in the derivation, and thus for the equation itself. We also compare the range of applicability with other master equations, and note the spatial locality of the Lindblad generators of the CGME. At this point we are ready to address the case of time-dependent Hamiltonians. The derivation of the equation for this case (which happens to result in exactly the same form) is given in Sec. 4. In particular, this equation is well suited for the simulation of open system adiabatic quantum computation, but also for dynamical decoupling, which involves the opposite limit of very fast system dynamics. We note that while we will sometimes refer to qubits, none of the results we discuss in this work are limited to qubits, and in fact any finite multi-level system, or interacting set of such systems, is captured by the formalism. We study some applications and examples in Sec. 5, including error suppression using a dynamical decoupling protocol, and numerical results of the comparison of our master equation with the Redfield and Lindblad-Davies master equations. In the remainder of the paper we derive the range of validity of the various master equations we study. We give a detailed treatment of the Born approximation and the other approximations involved, in terms of rigorous bounds presented in Sec. 6, where we also discuss the generalization to multiple coupling terms and analyze the scaling of the error bounds for large system sizes. Conclusions are presented in Sec. 7. Various additional technical details are given in the Appendix.

Three master equations
This section provides a summary of our main results. We first present a brief background to define basic concepts and notation, followed by the definition and properties of the two main timescales we use later to provide bounds and ranges of applicability. We then summarize the three master equations we focus on in this work, followed by upper bounds on the distance of their solutions from the true state.

Background
Consider a system interacting with its environment as described by the total Hamiltonian Here H is the time-independent system Hamiltonian (we treat the time-dependent case in Sec. 4), H b is the bath Hamiltonian, and A and B are, respectively, Hermitian system and bath operators. The more general situation, with V = A ⊗ B replaced by i A i ⊗ B i , is easily treated as well (see Sec. 3.7), but we avoid it here to simplify the notation. We choose A to be dimensionless with A = 1 [the operator norm is defined in Eq. (36)] and B to have energy units, but we deliberately do not set B = 1, since we wish to account for baths (such as harmonic oscillator baths) for which B can be infinite. We also set ≡ 1 throughout, so that energy and frequency have identical units. Let the eigenstates of H be {|n } , and the corresponding eigenvalues {E n }. Equivalently, H = n E n Π n , where Π n is a projector onto the eigenspace with eigenvalue E n , and Π m Π n = δ mn Π n . Note that in the interaction picture A(t) = U † (t)AU (t) = nm A nm e −iEmnt |n m| where E mn = E m − E n , A nm = n| A |m , and U is the solution ofU = −iHU . Let so that 3 Here ω runs over all the energy differences (Bohr frequencies) between the eigenvalues of H. We assume henceforth that the bath is stationary -[ρ b , H b ] = 0 where ρ b is the bath state -and introduce the bath correlation function C(t) and its Fourier transform γ(ω), known as the bath spectral density: where B(t) = e iH b t Be −iH b t and f (ω) = Note that the real-valued functions S(ω) and γ(ω) are related via a Kramers-Kronig transform where P 1 x dx is the Cauchy principal value. 4 When A ⊗ B is replaced by i A i ⊗ B i , we note the positivity of γ ij (ω) = dte iωt Tr[ρ b B i (t)B j ] as a matrix in the indices i, j (of course this reduces to γ(ω) ≥ 0 in the scalar case). This is a non-trivial fact that is usually associated with Bochner's theorem, as e.g., in the textbook [2]. In Appendix A we give two different proofs, one using Bochner's theorem and another that is direct. If we assume not only that the bath state is stationary, but that it is also in thermal equilibrium at inverse temperature β, i.e., ρ b = e −βH b /Z, Z = Tre −βH b , then it follows that the correlation function satisfies the time-domain Kubo-Martin-Schwinger (KMS) condition [2,44]: If in addition the correlation function is analytic in the strip between t = −iβ and t = 0, then it follows that the Fourier transform of the bath correlation function satisfies the frequency domain KMS condition [2,44]: We note that the thermal equilibrium assumption is not necessary for the results we derive in this work, and we never use it in our proofs. We mention it here for completeness, and also since we use it in one of our dynamical decoupling examples later on. Finally, note that C(t) has units of frequency squared.

The bath correlation time τ B and the fastest system decoherence timescale τ SB
We define the two key quantities Here T is the total evolution time, used as a cutoff which can often be taken as ∞. We show later that in the interaction picture ρ 1 ≤ 4 ρ 1 /τ SB , where ρ is the system density matrix and the trace norm defined in Eq. (35), so that we can interpret τ SB as the fastest system decoherence timescale, or timescale over which ρ changes due to the coupling to the bath, in the interaction picture (i.e., every other system decay timescale, including the standard T 1 and T 2 relaxation and dephasing times, must be longer). The quantity τ B is the characteristic timescale of the decay of C(t). We return in Sec. 6 to why we define these timescales in this manner, but note that Eq. (11b) becomes an identity if we choose |C(t)| ∝ e −t/τ B and take the limit T → ∞. We further note that τ SB and τ B are the only two parameters relevant for determining the range of applicability of the various master equations; in particular, nothing about the norm or time-dependence of H tot affects the accuracy of our time-dependent CGME, given below. In particular, H tot can be arbitrarily large or small in the operator norm (strong coupling, unbounded bath), or have an arbitrarily large derivative (non-adiabatic regime). This remark is important in light of previous approaches, so we expand on it some more.
In previous work it was common to extract a dimensionful coupling parameter g, i.e., to replace B by gB, where B = 1. One then defines τ B = ∞ 0 |C(t)|dt in terms of a dimensionless correlation functioñ C(t) = C(t)/g 2 [31]. One problem with this approach is the arbitrariness of distributing the numerical factors between g andB. Another is that it precludes unbounded baths, such as oscillator baths, for which B = ∞. In contrast, the formalism we present here is applicable even when B diverges. Furthermore, B contains an extra scale that does not carry any new information about the range of applicability of the master equations we discuss and derive. By not introducing this extra scale we highlight that there are only two free parameters in our analysis of the error: τ B and τ SB , and no other information about the bath is 4 This follows from the identity needed. I.e., even though different baths will lead to different equations, our results are universal for any bath with the same values of these two parameters (in fact only their dimensionless ratio matters). Note that we can relate τ B and τ SB to the spectral density. First, using γ(ω) > 0 and C(t) = C * (−t): The dephasing time T 2 and relaxation time T 1 for a single qubit are usually defined as ∝ 1/γ(0) and ∝ 1/γ(ω) respectively, where ω is the qubit operating frequency (e.g., see Ref. [45]), so we see that τ SB T 1 , T 2 , which illustrates our earlier comment that τ SB is the fastest system decoherence time-scale. Second, where the limit is taken in Eq. (11b). And lastly, dγ(−ω) dω , so that: This implies that γ (0) > 0, so that under the KMS condition (10) we can replace Eq. (13) by The upper bounds on the approximation errors of all the master equations we present below involves the ratio τ B /τ SB [see, e.g., Eqs. (26)- (28)]. The smallness of this ratio is sufficient for the CGME to be useful, while additional assumptions are required for the Davies-Lindblad equation and some versions of the Redfield equation. It follows from Eq. (15) that for our bound to be small it is necessary that the temperature β −1 is not too low and/or the spectral density at ω = 0 (roughly the same as the dephasing rate T −1 2 ) is not too large. The simple condition βγ(0) 1 already rules out diverging spectral densities such as the case of 1/f noise, though this can be ameliorated by introducing a low-frequency cutoff.
We now present the three master equations, in the Schrödinger picture.

Redfield master equation
For the derivation see Sec. 3.2. This equation was known earlier than the Davies-Lindblad equation [19], and is often used in quantum chemistry. It is not CP and hence cannot be put in Lindblad form: where we defined the "filtered" operator: where f (ω) is defined in Eq. (7), and we used the subscript R to denote that the density matrix satisfies the Redfield equation (we use a similar subscript notation below to distinguish the solutions of different master equations). There is no natural way to separate the Lamb shift. One of the benefits of the Redfield equation is that there is only one generator A f per interaction with the environment A ⊗ B. We will show that as long as it preserves positivity, the Redfield equation is more accurate than the Davies-Lindblad master equation.

Davies-Lindblad master equation
For the derivation see Sec. 3.3. This is the familiar result [4] ρ where H LS is the Lamb shift. We note that ad hoc forms of the Lindblad equation are often written down and used without justification, e.g., with just one Lindblad term per qubit (e.g., σ − or I − σ z [46,47]). In reality the Davies generators are derived from first principles, i.e., from the description of the total Hamiltonian of the system and bath. The number of Davies generators is unfortunately exponential in the number of qubits n: ω is over all 4 n energy differences.
2.5 Coarse-grained master equation (CGME) for time-independent or time-dependent system Hamiltonians This is our main new set of results, generalizing Ref. [40] to the time-dependent case.

The time-independent case
For the derivation see Sec. 3.4. First, considering time-independent system Hamiltonians, we obtain: where the Lindblad operators are with sinc(x) ≡ sin(x)/x, and where T a is the averaging, or coarse-graining time, discussed below. The continuous family of terms labeled by is an unusual form of the Lindblad equation, but is manifestly CP. The more standard form in terms of a discrete sum over transition frequencies is equivalent to this one, and is given in Eq. (71) below. The range of applicability of the CGME is only slightly smaller than that of the Redfield ME, as we discuss in Sec. 3.5. Much like for Davies generators, there are exponentially many frequency differences, but unlike the Davies case the discretization of the continuous integral d makes it possible to keep the number of generators constant in the system size for each A ⊗ B term. These results are presented in Sec. 3.6. The same applies for the Lamb shift, which is where ω + = ω+ω 2 . Note that F ωω is well defined in the limit ω + → 0. The results above are generalized to the n-qubit setting in Sec. 3.7.

The time-dependent case
For the derivation see Sec. 4. In the case of a time-dependent system Hamiltonian H(t) we obtain the same form, and even the same range of applicability, except that all the operators are now time-dependent: where the time-dependent Lindblad operators are where A(t , t) = U † (t , t)AU (t , t) with U (t , t) = T exp[−i t t H(s)ds] (the forward time-ordered exponential, from t on the left to t on the right), and the time-dependent Lamb shift is Although the coarse-graining time T a is a free parameter, we show that to minimize the upper bound we derive on the distance between the solutions of the Redfield and coarse-grained master equations it is nearly optimal to choose T a = τ SB τ B /5 .

Error bounds and range of applicability
The error bound of the Redfield master equation is where ρ true (t) denotes the true (approximation-free) state. The error bound of the Davies-Lindblad master equation is where δE =min i =j |E i − E j | is the level spacing, with E i the eigenenergies of the system Hamiltonian H. The error bound of both the time-independent and time-dependent coarse-grained master equation is: 5 In the above expressions, O(X) is understood for X → 0, specifically for CGME X = τ B /τ SB e 6t/τ SB . There is a subtlety in the definition of big-O notation that we would like to emphasize. By definition, "f (X) = O(X) at X → 0" means there exist X 0 , M s.t. for any X ≤ X 0 we have f (X) ≤ M X. Applying this to Eq. (28), we have the following unpacking of the above statement: there exist universal constants Note that for sufficiently small τ B /τ SB , a dimensionless quantity t/τ SB can have an arbitrarily large constant value in this bound. The error can be made arbitrarily small at any fixed value of t/τ SB just by choosing a sufficiently small τ B /τ SB . This is what is commonly referred to as the weak coupling limit. We emphasize that the constants X 0 , M involved in this statement are universal, i.e. independent of the parameters of the equation such as the Hamiltonian and the initial state. In that sense, our bound is uniform. It does depend on time t as explicitly stated, so it is not uniform in time. 6 Thus, comparing these bounds, we observe that the Redfield bound is the tightest, which is natural given that it involves the fewest approximations. However, recall that the Redfield master equation is not CP. When comparing the bounds on the solutions of the two CP master equations, we observe that unlike the Davies-Lindblad equation the CGME does not involve the energy gap, which means that the CGME in principle has a much larger range of applicability, in particular for systems whose gap shrinks with growing system size. 7 While the equations and inequalities can be derived for any bath, we made some extra assumptions to prove the error bounds as presented above. Specifically, we assumed a Gaussian bath and the convergence of our series expansion for the Born error, as defined and discussed in detail in Sec. 6.2. For a non-Gaussian bath, extra time scales relating to higher correlation functions generally appear, and the error bound can be derived by a straightforward generalization of our approach. It will contain, besides τ B and τ SB , additional terms involving those time scales.

(Re-)Derivation of the coarse-grained master equation
Our goal in this section is to present a compact and simplified derivation of the CGME found in Ref. [40]. This master equation is in Lindblad form but avoids making use of the RWA, which contributes the largest approximation error. Instead, the key idea is to introduce a coarse-graining (averaging) timescale, first exploited in this context in Refs. [20,22]. In this section we consider the case of a time-independent system Hamiltonian, and later generalize our derivation to the time-dependent case, which includes adiabatic evolution as a special case.
Along the way we also derive the Redfield and Davies-Lindblad master equations.

Setting up
We start from the total Hamiltonian given in Eq.
(3), and let V = A ⊗ B. Recall that A is dimensionless and B has units of energy. The first few steps in our derivation are standard [2]. In the double system-bath interaction picture , and the state satisfiesρ Substituting this back into the original equation yields: The reduced system state in the interaction picture is defined as ρ true, , where the subscript "true" denotes that this is the correct, completely approximation-free state. The corresponding true system state in the Schrödinger picture is ρ true = U 0 (t)ρ true,I U † 0 (t). The Born approximation, together with the shift of B such that Tr[ρ b B] = 0 allows one to write: which can be understood as the definition of the Born approximation error E B : Henceforth we assume that the bath correlation function decays rapidly, namely that τ B τ SB , where τ SB and τ B were defined in Eq. (11). Now, let ρ B,I denote the solution of the master equation after the Born approximation: Later we collect other errors as letters next to B. The error estimate given in Eq.
We digress briefly to carefully explain the meaning of the norms and big-O notation used here, since this is important for the remainder of this work. E B is an operator acting on the system Hilbert space. The trace norm A 1 is: The operator norm X is defined as follows: where λ X,i are the eigenvalues of |X| ≡ √ X † X (singular values of X) indexed by i. The big-O notation E = O(x) is taken for times such that t/τ SB ≤ M and x → 0, i.e., there exist an M -dependent number M and an M -dependent constant C M such that for any x < M the error It is natural to use the trace norm for density matrices. Indeed, if we want to find the deviation in an observable O relative to the difference between two states, δρ = ρ 1 − ρ 2 , then The second expression gives a tighter bound, if we manage to have the same bound on δρ 1 as on δρ .
Fortunately, this will turn out to be the case in this work, and was already observed for the Markov error in Ref. [31]. The key property used to prove the inequality above is submultiplicativity, valid for any unitarily invariant norm [48]: For simplicity, we assume the bath state to be stationary, such that C(t, t ) = Tr[ρ B B(t)B(t )] is invariant with respect to shifts in time of both arguments. 8 We can then replace C(t, t ) by C(t) = Tr[ρ B B(t)B], as in Eq. (6a). Recall that C * (t) = C(−t). After expanding the commutators, one arrives aṫ where K B,2 t−τ is a superoperator. Taking the trace norm, we note that: where we used our earlier choice of setting A = 1, and the constant c B is chosen as an upper bound on ρ B,I 1 (if this were a CP map, c B = 1 would hold). Under the condition ∀t, ρ test (t) 1 = 1 we have We next introduce the Markov approximation ρ B,I (τ ) → ρ B,I (t): Equation (42b) is the Redfield equation [2], which is notoriously non-CP (though various fixes have been proposed [28,49]). The Markov approximation error E M is of same order as the Born approximation error given in Eq. (33) (for more detail see Sec. 6). We note that the errors on the r.h.s. are not generally additive: if we try to write a Markovian master equation for the true (approximation-free) evolution ρ true,I , then the error on the r.h.s. will, besides E B + E M , contain a correction to the Markov error from the Born error: In this particular case, using methods from Section 6 the difference between bounds on E M (ρ true ) 1 and E M 1 can be found to be subleading in τ B /τ SB . Since we wish to present higher orders of the error, we do not attempt to collect errors as in Eq. (43a). Instead, our derivation will present a sequence of equations, e.g., ρ true , ρ B , ρ BM , and an error estimate for each step.
After using Eq. (5), i.e., in the frequency representation, Eq. (42b) takes the following form: We sometimes omit the explicit time dependence of ρ on the r.h.s. since it is always ρ(t) from hereon.

Redfield master equation
Let us digress briefly in order to establish the form of the Redfield equation presented in Sec. 2. Rotating Eq. (42b) back to the Schrödinger picture we obtain: Introducing a new integration variable t = t − τ : We extend the upper integration limit from t to ∞, which introduces an additional error: where for the first summand in Eq. (47b) we assumed a lower cutoff on the evolution time t > τ SB δ > 0 where δ is a small constant number which we absorbed in the big-O notation [i.e., 1/t = O(1/τ SB )]. We analyze the transients happening for t < τ SB δ in Sec. 6.6. The constant c BM is chosen as an upper bound on ρ BM,I 1 (again, if this were a CP map, c BM = 1 would hold). We will see in Sec. 6 that c BM = O (1) in terms of our big-O notation, specified in Eq. (49). For the second summand, we introduced a new bath parameter For most physically motivated choices of bath correlation functions ∞ 0 t|C(t)|dt converges, so we may replace the total evolution time T → ∞ and then T = 0. But, in case τ B /τ SB diverges as a function of T [Eq. (11b)], the above bound should be used. The big-O notation in terms of all of these parameters τ SB δ ≤ t ≤ τ SB M, T , τ B /τ SB , c BM should be understood as follows: there exist constants C(M, δ), (M, δ) such that for τ B /τ SB + T ≤ (M, δ) As seen in the derivation above, C(δ, ) = max(4c BM /δ, 4c BM ) in fact does not depend on . Note that the change of integration limit t → ∞ is optional: the Redfield equation can be used without it, but the change does simplify its form. Eq. (47a) without the error gives: Introducing the "filtered" operator A f = ∞ 0 C(−t )A(−t )dt immediately yields Eq. (16), so that in fact ρ BM l = ρ R . Replacing A(−t ) in A f by its Fourier decomposition [Eq. (5)] gives Eq. (17), for which the integral can be expressed in multiple ways:

Davies-Lindblad master equation
As a second digression let us establish the form of the Davies-Lindblad equation presented in Sec. 2. We start from the form given in Eq. (44), and use ωt + ω τ = ω(t − τ ) + (ω + ω )τ and a change of variables to t = τ − t to write it aṡ Next we apply the RWA, in which one considers the term e −i(ω+ω )(t+t ) to be rapidly oscillating and hence self-cancelling, so the non-negligible contribution is only due to the terms with ω = −ω. This allows us to write:ρ where we replaced ρ BM,I by ρ D,I and ω by −ω. The error E ∼ O(1/τ SB ) between the right-hand sides of Eqs. (52) and (53) is large but rapidly oscillating, so the solutions ρ BM,I (t) and ρ D,I (t) remain close (see Sec. 3.5). We now transform back to the Schrödinger picture (recall that this requires multiplying each A ω by e iωt , but these cancel now due to the corresponding A −ω ): It is convenient to separate the real and imaginary parts, using C * (t) = C(−t): Using the decomposition given by Eq. (55) in Eq. (54) directly yields the form of the Davies-Lindblad master equation presented in Eq. (18). We note that versions of the Davies-Lindblad master equation that allow a time-dependent drive have been derived before (see, e.g., Refs. [31,43]), but such derivations must always assume that the driving is adiabatic.

Coarse-grained master equation
Let us now return to our main goal in this section, the derivation of the CGME. At this point we deviate from the standard derivations and instead follow the coarse-graining approach [20,22,40]. There are two main steps: (i) Time-averaging of the state, which is done in lieu of the RWA (and reduces to the RWA in the limit of large time-averaging scale; see Appendix C), (ii) removal of a small part of the integration domain, which restores complete positivity (new in this work). We describe each in turn, along with the associated error.

Time-averaging of the state
Before we leave the interaction picture, we coarse-grain, or time-average over T a such that τ B T a τ SB . Specifically, we consider another equation satisfied by a new state ρ BM T,I (t), where the time-averaging operation 1 Ta t+Ta/2 t−Ta/2 dt is applied to the r.h.s. of Eq. (44) taken at time t , except that the state is still at time t on the l.h.s.: Alas, the associated error E T has E T 1 = O(1/τ SB ), which is not small. The reason is that the fast-rotating terms may have a large derivative. What can be proven is that the solutions of Eqs. (44) and (56) remain close: where t ≤ cτ SB , and the r.h.s. O(T a /τ SB ) does not depend on t, only on c, which is considered a constant for the purposes of big-O notation. The proof is given in Sec. 6.4, in Lemma 2 (this analysis first appeared in Ref. [32]). The error we track is now the error of the solution, not its derivative. We use the following fact about time-local (Markovian) and time-nonlocal (non-Markovian) differential equations: where L is a linear superoperator and Λ is a positive constant such that sup τ,x: where K t−τ (x) is a linear superoperator and Λ is a positive constant such that sup t,x(τ ): For the proof see Sec. 6.1. We can take Λ = 4/τ SB because of Eq. (41, 42c). Using this, we rewrite the result of the Lemma as follows, for brevity

Neglecting part of the integration domain to regain complete positivity
Upon changing variables to s = t − t, and renaming s as t , Eq. (56) becomes: We rotate out of the system interaction picture into the system Schrödinger picture by defining the coarsegrained state ρ BM T = U (t)ρ BM T,I U † (t) = e −iHt ρ BM T,I e iHt , leaving only the bath interaction picture, by multiplying each summand by a e i(ω+ω )t factor: 9 (63) Next, we change variables to τ = τ − t, so thaṫ We define L BM T t (ρ BM T ) to be the superoperator on the r.h.s. The key trick now is to replace −t by −T a /2, 9 Note that the transformation back from the interaction picture is UρI U † .
Thus, e.g., Using Eqs. (4) and (5)  which lets us write (note that Lemma 1 will work for E p either in the initial or in the resulting equation, like we do here):ρ This replacement cuts a corner of area ∼ τ 2 B out of the integration domain with non-vanishing C(t), itself of area ∼ T a τ B , as illustrated in Fig. 1(a) for t > T a /2 (times t < T a /2 introduce a transient, as discussed in more detail in Sec. 6.4). Thus, the corner being cut for t > T a /2 is just a τ B /T a fraction of the whole integral in Eq. (65b) (ignoring factors of √ 2), which [using Eq. (11a)] is itself upper bounded by 1/τ SB in absolute value. Thus, the error introduced by the corner removal is [for t < T a /2 it can be O(1/τ SB ) for a short transient]. The constant in big-O notation here is independent of τ SB , τ B , T a . As we show below, E p is the cost of recovering complete positivity, in the sense that the master equation after subtraction of E p is in canonical Lindblad form. Eq. (65a) is the coarse-grained master equation from Ref. [40]. To see this we need some properties of the coefficient x ωω . In particular, we need the properties with the first following from C * (t) = C(−t), and the second from interchanging integration limits after a reflection w.r.t. the τ = −t axis, as illustrated in Fig. 1(b). This allows us to reshuffle the h.c. part of Eq. (65a), taking the −ω , −ω term in the sum for the ω, ω term in the original part. The resulting equation is:ρ The Imx ωω part cancels for A ω ρA ω and sends A ω A ω into the Lamb shift: where to get the second form we used Im(x ωω ) = 1 2i (x ωω − x * ωω ), combined Eqs. (65b), (67a) into a single integral using the sgn(t 1 − t 2 ) function, and used Eq. (5). The Lamb shift can be further simplified as shown in Appendix B. The simplified form is the one we presented as a part of our main result [Eq. (21)] in Sec. 2.
We define γ ωω ≡ x * ωω + x ωω = 2Rex ωω and obtain: Thereforeρ which is Eq. (50) from [40] up to a shift in the center of averaging and changing variables

Complete positivity
Complete positivity is not immediately apparent from Eq. (71). Let us demonstrate it next. Substituting where is a filter function whose integrated form is given in Eq. (20). By using the above decomposition for γ ωω in Eq. (71), we obtain the manifestly CP Lindblad form given in Eq. (19). Note further that it was shown in Ref. [40] that the Davies-Lindblad equation [Eq. (18)] arises as the T a → ∞ limit of the CGME. Similar ideas have appeared in [37,38]. We provide this proof for completeness in Appendix C. This derivation has the advantage that it arrives at the Davies-Lindblad equation without invoking the (uncontrolled) RWA, and instead shows that the Davies-Lindblad equation is the limit of infinite coarse graining time of the CGME. One of our new results is to show how the error of the Davies-Lindblad equation can be controlled for a sufficiently large (but not infinite) coarse graining time; see Sec. 6.5.

Ranges of applicability of the three master equations
We now discuss the ranges of applicability of the master equations derived above in more rigor than in Sec. 2.6, while postponing the derivations to Sec. 6. Recall that the ranges are dependent on the timescales τ SB and τ B defined in Eq. (11).
Errors are incurred from different approximations made along the way. The very first approximation made in the derivation of all three master equations is the Born approximation (see Sec. 3.1). Unlike the other approximations, we do not prove a rigorous error bound for the Born approximation error; we just provide a bound on the first order contribution to this error. However, under the assumption that the error converges in the first place, the Born error will turn out to be subleading. Therefore we settle for an estimate of this error for the sake of simplicity, but we note that a rigorous bound can be obtained [4].
We first collect all the errors introduced in the derivation of the CGME: the difference in solutions ρ true,I (t) − ρ BM T,I (t) 1 [Eq. (61b), which includes the error due to time-averaging], and the error due to enforcing complete positivity, The difference between the solution of the CGME ρ C (t) and the true time evolved state ρ true (t) thus satisfies (note that the norm is unitarily invariant and hence unaffected by transformation to or out of the interaction picture): Here we used Lemma 1 to multiply E p 1 by τ SB . Optimizing T a to minimize this error, we obtain T a = √ τ SB τ B , and: Note that if we define the coupling g strength via 1/τ SB = g 2 τ B (recall the discussion in Sec. 2.2), then the error bound of Eq.
We can in fact improve on the result presented in Eq. (75). A careful derivation presented in Sec. 6 generalizes the above result from the t > T a /2 case discussed here [recall Eq. (66)] to t > 0. The big-O notation in Eq. (75) means that there exist numbers (C, δ, c) such that for all 0 < t < cτ SB We do not know the function C(c, δ) explicitly, because we do not keep track of it in our analysis of the Born error [the details of which are given in Sec. 6.2]. The contributions from all the other errors are known explicitly. Our derivation also allows us to state a stronger result exhibiting the coefficients and the t-dependence of the first few leading terms of the error as a series in τ B /τ SB , since the unknown Born contributions start with O(τ 2 B /τ 2 SB ). The improved bound is: The time t can now be arbitrarily large, as long as the combination e 4t τ SB τ B τ SB is small. Specifically, the big-O notation in Eq. (76) means that there exist constants C, such that for all e The time-averaging window leading to Eq. (75) was chosen sub-optimally, as the more careful analysis yielding Eq. (76) uses T a = τ B τ SB /5. Including higher order corrections in τ B /τ SB leads to a minor improvement in the subleading terms in the bound, but does not affect the leading term (see Section 6.4.4).
Let us now discuss the time-dependence of the error. From the above expression it follows that for any t, ρ true (t) − ρ C (t) 1 = O( τ B /τ SB e 6t/τ SB ), which is Eq. (28). For the sake of completeness, we present the errors of the Redfield equation (for T = 0 [recall Eq. (48)]; for the general case, see Sec. 6.6): We note that for Eq. (46) there is no transient before the introduction of E l : thus the error grows from zero linearly at small times, and the slope of the upper bound is O(τ B /τ 2 SB ). In contrast, for the Redfield, CGME and Davies-Lindblad equations, there is a nonzero transient error bound at t → 0. The error itself starts at zero (our bounds are not tight), but the slope is It is important to emphasize that the solutions of open system master equations do not actually grow exponentially. In fact, for time-independent system Hamiltonians all of the equations presented have steady states to which they converge in the operator and trace norm at some rate. If that rate is sufficiently fast, one can prove a much stronger result [41] than our error bounds: a stability of the open system dynamics to small perturbations. The stability can be expressed in terms of a time-independent error bound on the difference in solutions.
We remark that the coefficients we presented and the time-dependence of the error are explicit, while other work hides them in big-O notation. Our results allow one to put error bars on the numerical solution of the above equations.

Discretization, spatial locality, and the Lieb-Robinson bound
Different forms of the CGME are preferred depending on the application. The form given in Eq. (71) with a discrete sum ω,ω is ready for numerical implementation but at exponential cost, since for a Hilbert space of dimension 2 n the number of terms in the sum is 2 4n . Numerical solution of the equation already requires at least 2 2n numbers just to store the density matrix. It is therefore desirable to reduce the number of terms on the r.h.s. to a constant in n (or polynomial in n for the general case of multiple interaction terms; see Sec. 5). We first present a discretization that achieves this goal. It is also desirable to have each term locally supported, instead of acting on the whole system. This speeds up the numerics, and also allows one to meaningfully use the equation with methods that use resources that are polynomial in n to store the density matrix, e.g., matrix product states (MPS) [50,51]. For a recent implementation of these methods see [46,47]. We present a way to write down a local equation at the end of this subsection.
In Eq. (19), the number of terms is infinite because of the integration over . In Appendix D we explain how a discrete approximation can be derived. The result is: where A is given by Eq. (20) and the values of ∆ , k * and E k 1 are given in Appendix D, and are systemsize-independent as long as [H, A] = O(1). We do not present a similar discrete approximation for the Lamb shift, leaving it to future work. We now proceed to show that storing the Lindblad operators A does not require resources exponential in the system size n.
]. An operator A(t) at those times is local (with exponentially decaying tails) with a locality radius vT a /2, where v is the Lieb-Robinson velocity (v ∼ H local , the coupling strength in the Hamiltonian) [52]. More rigorously, we consider a system defined on a graph. Each vertex of the graph supports a finite-dimensional Hilbert space, and the system Hilbert space is a tensor product of vertex Hilbert spaces. The edges of the graph are present if there are nontrivial interactions between the corresponding vertices in the Hamiltonian. That is, for vertices i, j we can define a trace over the degrees of freedom at other vertices, denoted Tr i,j H − Tr i H − Tr j H. If this operator is nonzero (for traceless H), then there is a nontrivial interaction and the edge (i, j) is present in the graph. The Lieb-Robinson bound can be used (see, e.g., Lemma 5 in Ref. [53]) to derive the following decomposition of the operator A into its local and small nonlocal part: where c is a universal (system-independent and -independent) constant, and is an operator strictly local within the graph distance x from the original location of A. We define the graph distance as the length (number of edges) of the smallest connected path of edges between two vertices. Here H (x) = Tr x H is composed of those Hamiltonian terms which involve vertices within graph distance x from the original location of A. If we drop δA from Eq. (79), we can control the resulting error similarly to what is described in Sec. 6 below: This master equation has local generators A (x) with x = vT a /2 + δr. We also assumed that some truncation method is applied to the Lamb shift LS , although we do not present it in this work. One can now use standard methods [54] to recast Eq. (81)) as a stochastic Schrödinger equation, with those operators corresponding to jumps: here r represents a random number used to generate trajectories. We will not present the explicit form of G, but note that: where the sum is over qubits and each G i is a local operator of radius x = vT a /2 + δr and can be computed in O(1) time in the system size n. The time evolution is then given by a trotterization U Trotter (r) of where each gate takes O(1) time to compute. Contraction of such a circuit |ψ(t, r) = U Trotter (r)|ψ(0) does not necessarily have a local structure, even if the initial condition |ψ(0) is a product state. However, note that in 1d |ψ(t, r) has the structure of a MPS [50]: Where M s i i are χ × χ matrices for each i, s i , and χ is called a bond dimension. A portion of the time evolution of a MPS is illustrated in Fig. 2

Scaling with size
Here we discuss the system-size dependence. So far we assumed that there is only one term V = A ⊗ B describing the interaction with the bath. In reality, there are n terms like this, one for each qubit. If qubits are coupled to the same bath V = n i A i ⊗ B, it will lead to correlated noise (collective decoherence [55]). If the qubits are coupled to different baths We will consider the latter case since it contains the former case if one sets B i = B (though distinctly different phenomena such as decoherence-free subspaces appear in this special case [56,57]). The form of the Davies-Lindblad and Redfield equations can be found elsewhere; here we present only the form of the CGME. The sum is carried through to the frequency form of the equation -Eq. (71): The theoretically optimal T a = τ SB τ B /5 is given by the same expression in terms of time scales τ B and τ SB , which are now defined using |C| → max ij |C ij |. Such a definition keeps τ B and τ SB consistent with the single qubit quantities. The locality of the equation is now also dependent on the decay of C ij with the distance between i and j. If it can be approximated by zero outside some radius ("strong locality"), the equation remains locally generated in the sense that every term on the r.h.s. contains local terms around some qubit i conjugating the density matrix, and there are polynomially many of them. If we use a weaker sense of locality, when the operators on the right and left of the density matrix are allowed to be local around different i, j, and neglect the Lamb shift, then no assumption on C ij is needed. Let us present an explicitly Lindblad form. Let µ index the positive (see Appendix A) eigenvalues of This allows one to write: Next, note that if we letÃ = j U µj ( )A j , the previous derivation goes through.
where the Lindblad operators are These results generalize Eqs. (19)- (20) to the n-qubit setting. Now the locality is more directly defined: if the operators A ,µ can be approximately truncated to a ball around some point for each µ, then the CGME for n qubits is local in the strong sense described above; otherwise it is local in a weak sense. In any case, it has n times more generator terms than the single-qubit CGME. The latter has a constant number of terms after the discretization described in Appendix D.
Let us now discuss the range of applicability of the n-qubit CGME. In the case of correlated noise, the norm of each A effectively grows by a factor of n. Thus the bound on the relaxation time becomes Λ ∼ n 2 /τ SB with τ SB taken from the single qubit case. For uncorrelated noise, the bound is Λ ∼ n/τ SB . In both cases, the range of applicability can be derived by directly repeating the derivation given in Sec. 6: where τ B is system-independent, and thus is the same as the single qubit quantity. The apparently shrinking range with n should not discourage us, since it can be mitigated under the assumption of locality. Namely, one can prove that the error in local density matrices obeys a stronger bound consistent with the isolated qubit result. Let us note that in an n-qubit system there are in fact nonlocal modes that relax with the rate n/τ SB , or n 2 /τ SB for correlated noise (e.g., superradiance), as well as modes whose relaxation is completely suppressed (e.g., subradiance, or decoherence-free subspaces, as mentioned above). These phenomena are well known [58] and experimentally documented [59][60][61][62]. The benefit expressed by Eq. (91) is that the requirement on the single qubit τ B /τ SB value switches from being exponential in the system size for the Davies-Lindblad case to polynomial for the CGME and the Redfield master equation. In terms of the coupling strength, we found these ranges of applicability at the relevant times of Λ −1 to be between √ ngτ B 1 and ngτ B 1 depending on the correlations in the noise. For local observables the earlier range gτ B 1 for times ∼ τ SB is expected to hold. Here the inequality notation ( ) guarantees that the error δρ 1 or δρ loc 1 is small. 4 The CGME with a time-dependent system Hamiltonian We start again from the total Hamiltonian (3), but this time we let the system Hamiltonian be timedependent: H(t). We denote the interaction term A ⊗ B by V . To go to the interaction picture, we now need to specify both the start time t i and the final time t ≤ t f . The unitary propagator U tt i satisfies The formal solution is where T represents forward time-ordering. Some basic additional facts are: The relation between the Schrödinger picture and the interaction picture is: Here B(t) is given by the bath Hamiltonian in the same way as in the previous derivation. We again assume the bath state to be stationary for simplicity, although the derivation will go through without it. At this point we repeat the steps involved in Eqs. (29)-(42b), with the only change being that the A(t) operators now acquire a second time variable. Namely, Eq. (42b) -the Redfield equation in the interaction picture -is replaced bẏ where we again introduced the Markov approximation ρ B,I (τ ) → ρ B,I (t).
Let us digress briefly to derive the time-dependent Redfield equation. To do so, we transform Eq. (96) out of the interaction picture: Changing variables t − τ = t and switching the dt integration limit to t → ∞ we obtain: which is the time-dependent Redfield equation. We now proceed with essentially the same series of transformations we used in the derivation for the timeindependent Hamiltonian in Sec. 3 and as long as T a is small compared to the fastest timescale over which ρ I (t) changes, the associated error ρ BM (t) − ρ BM T (t) 1 is small (see Sec. 6.4 for a detailed analysis of the time-independent case). We now rotate out of the interaction picture using Eq. (95): Next, we change variables to t 2 = τ − t: The transformations we performed after coarse graining of the Redfield equation (96) were exact. We know what to do to recover complete positivity: as in the transition to Eq. (65a) in the time-independent case, we need to neglect a part of the integral by changing the lower limit from −t to −T a /2: where we defined The same estimates on the error incurred by doing this apply, i.e., this introduces an error of order E p (const· Complete positivity yet remains to be demonstrated. To do so, we first note that we may interchange the order of integration since We then swap the integration variables t 1 and t 2 and obtain: so that: and note that X and Y are both Hermitian. Also, Q 1 = 1 2 (X + iY ) and Q 2 = 1 2 (X − iY ), so that Combining Eq. (102) with the expressions in Eqs. (105)-(106), we thus finḋ (108) Finally, we establish complete positivity by again introducing the Fourier transform In analogy with Eq. (20) for the time-independent case, let us also define We then obtain from Eq. (107) a master equation in exactly the same form as the time-independent CGME [Eq. (19)], except that all the operators now depend on time: This result, which is in a manifestly completely positive form, establishes that the CGME is valid also for arbitrary time-dependent system Hamiltonians. The time-dependent CGME, Eq. (110) [also stated earlier as Eq. (22)], is one of the main new results of this work.

Application: dynamical decoupling
One interesting application of our time-dependent CGME is to study methods to reduce decoherence. One such method is dynamical decoupling (DD) [63,64] -the use of pulse sequences to cancel out the systembath interaction (for reviews see [65,66]). Even though the master equation has a Markovian appearance, the underlying bath can have a nonzero correlation time, and can therefore describe the effects of DD. At one level this might appear to be a counterintuitive result since it is widely accepted that in the limit C(t) = δ(t) DD is useless, and hence one might naively expect that one needs to use non-Markovian methods (e.g., the Magnus expansion to second order or higher [67]) to describe the benefits of DD. However, it has recently been recognized that DD can in fact work in the Markovian setting as well, specifically the Davies-Lindblad master equation [68], and a more abstract semigroup framework [69] (see also Refs. [70,71]). Our contribution here is to establish this in the framework of the Redfield master equation and, more importantly, the CGME. This ensures a wider range of applicability than the Davies-Lindblad master equation result. Since our result is obtained in a strictly Markovian setting, we differ with the conclusion reported in Ref. [72], that "success, however limited, of DD is a meaningful concept of non-Markovianity". We consider two examples, both for a qubit with H = 0 coupled to a purely dephasing environment: where Z ≡ σ z is the Pauli z-matrix. The noise model (111) can be decoupled with a sequence of X pulses spaced by ∆t. Here by a pulse we mean an instantaneous unitary being applied to the qubit, through the action of an externally controlled, time-dependent qubit Hamiltonian: instead of H = 0 we have a timedependent system Hamiltonian H(t) = π 2 j δ(t − j∆t)X, where the prefactor of π/2 is chosen so that X-pulses are generated.
where we have explicitly introduced the coupling strength g. To analyze this problem it will suffice to use the time-dependent version of the Redfield equation, Eq. (98). We thus need to compute and note that the time-evolution of the operator A = Z under X pulses results in A(t − t , t) = ±Z with the sign alternating every ∆t: Taking the integral, we find: where c(t) is the remainder after the cancellation of different signs. To show why |c(t)| ≤ ∆t, note that there is no way to accumulate > ∆t by integrating any interval of the function To see this, we note that a translation a, b → a + ∆t, b + ∆t changes the sign of the integral. We then split the integration interval [a, b] into three subsets: {[a + 2n∆t, a + (2n + 1)∆t]}, {[a + (2n + 1)∆t, a + 2(n + 1)∆t]}, [a + 2∆t(n max + 1), b] where n max has been chosen closest to b: The integrals over the first two subsets cancel due to the translation property, and the remaining subset [a + 2∆t(n max + 1), b] has length L < 2∆t. Note that for L = 0 and L = 2∆t the integral vanishes. Also note that the derivative of the integral with respect to b is (−1) b/∆t , and its absolute value is 1. Any function with such a derivative, up to two inflection points and zeros at the end of the interval [0, 2L] stays within [−∆t, +∆t], and the bound is saturated when b = m∆t. We compare this with the case without pulses: Here τ c enters the correlation function [see Eq. (112)]. Thus the decoherence rate is reduced by a factor of at least ∆t/τ c . For (gτ c ) 2 1 our analysis is accurate with the error bounds discussed above. However, we note that the bath correlation function C(t) = g 2 θ(τ c − |t|) used here for simplicity is not physically permissible since its Fourier transform γ(ω) < 0 for some ω. This leads to possibly nonpositive c(t) for some t, and then the equation does not describe a CP map. To address this we next perform a more careful calculation with a realistic bath.

Example 2: time-dependent CGME with an Ohmic spectral density
Now consider a physically permissible environment with a spectral density that satisfies the KMS condition (10). We specify γ(ω) below. We wish to use the time-dependent CGME [Eq. (22)] to study the same dynamical decoupling protocol as in the previous example. We first need to compute . This unitary is a product of as many X-pulses as fit in the interval [t, t + t 1 ], which we can express as where m i and m f − 1 respectively count the number of pulses in the intervals [0, t] and [0, t + t 1 ]. Conjugating Z by these pulses results in alternating signs, depending on the parity of m f − m i : This yields the time-dependent Lindblad operators A (t) via Eq. (23): Note that the Lamb shift [Eq. (24)] is proportional to Z 2 = 1, so it drops out. The Lindblad operators without DD are simply We may thus write the time-dependent CGME as: where with x = DD or x = noDD. The decoherence rate is thus suppressed by the factor The inner integral can be evaluated under certain simplifying assumptions. For example, let us assume that T a is an even integer multiple of ∆t: T a = 2k∆t, and let us consider only times t which are integer multiples of ∆t: t = ∆t. Then (t + ζT a )/∆t − t/∆t = 2kζ , and the dependence on t cancels out, i.e., the suppression factor ξ(t) is time-independent. We can then rewrite the inner integral as: where in the last line we assumed for further simplicity assume that k is even (k = 2k ), so that sin kπ 2 + Ta 2 = ± sin Ta 2 . Writing t = ∆t and T a = 4k ∆t, we thus have: To guarantee that DD will cause suppression [ξ( ∆t) < 1] it is sufficient for the spectral density to have a high-frequency cutoff ω c such that | tan (ω∆t) | < 1, i.e., in agreement with well established results [63]. An important physical example is a bath with an Ohmic spectral density where ω c is a high-frequency cutoff and κ is a positive dimensionless constant. This spectral density satisfies the KMS condition. The associated bath correlation function can be expressed in terms of the Polygamma function (see Appendix I of Ref. [31]), but unfortunately evaluating τ SB and τ B analytically using Eq. (11) is not possible in this case, so we simply pick a convenient value of T a (= 4k ∆t) rather than its optimal value τ B τ SB /5. The suppression factor is plotted in Fig. 3 for a variety of parameter settings, including for ∆t > π/(4ω c ). It can be seen that the CGME correctly and consistently predicts that DD will result in the suppression of dephasing when Eq. (127) is satisfied. Thus, the CGME can be used to study DD protocols despite its Markovian appearance.

Lambless master equations
It turns out that the Lamb shift terms containing sgn(t), such as Eq. (18b), are more demanding to compute numerically, but at the same time the interesting dynamics is often given by the other, relaxation terms. Therefore it is convenient to have a version of the equations in the "Lambless" regime. Even though these equations do not have any correctness guarantees, one can still use them as toy models, and their numerical solution is often significantly faster than their complete counterparts. Let us list the resulting equations: • Lambless Davies-Lindblad [replacing Eq. (18)]: • Lambless Redfield [replacing Eq. (16)]: where This simplified form of A f follows from Eqs. (7) and (17) where and we choose T a,opt = τ B τ SB /5, ∆ , and k * as prescribed in Appendix D. We study this case numerically in Sec. 5.4.
The importance of the Lamb shift in open system dynamics has been analyzed before, e.g., in Refs. [31,73] 5.3 Toy example of a slow bath at the boundary of the range of applicability, with explicit correlation function and spectral density Another way to speed up numerical simulations is to have a spectral density that leads to an explicit, analytically computable form of the bath correlation function C(t). Note that in the "Lambless" CGME case discussed in Sec. 5.2 the only direct role played by C(t) is in the determination of τ B and τ SB [via Eq. (11)], and apart from this it suffices to specify only γ(ω). The complete equations are more complicated: the Lamb terms contain C(t), or a Cauchy principal value integral of γ(ω) [Eq. (8)].
We present such a toy example with the property of having a bath almost at the boundary of the slowest correlation functions allowed within the range of applicability of the CGME. Baths with the same τ B can have a different time decay of |C(t)| at large times t τ B . A bath with |C(t)| ∼ 1/t 2 will have a logarithmically divergent τ B , which is undesirable for a toy example. 10 Consider a bath with the following spectral density, which satisfies the KMS condition, such that |C(t)| ∼ 1/t 4 -almost as slow as we are allowed: where a > 1, b > 1/2.
, the normalization factor is The difference between the two exponentials in Eq. (134) is such that for small ω the term linear in |ω| cancels, and there is no inflection in γ(ω). Note that for a single e −β|ω| we would have |C(t)| ∼ 1/t 2 , but after this cancellation we get |C(t)| ∼ 1/t 4 . Our goal is now to use this example to compare the actual numerical errors to the theoretical bounds derived in this work. These bounds involve many relaxations and inequalities, so we do not expect them to be particularly tight. Also of interest is to compare the predicted optimal averaging time T a,theory opt to the numerically optimal T a . To be specific we set a = 1.01, b = 0.6, β = 4, and find the normalization factor to be N ≈ 21.0. This choice of parameters gives rise to a maximum of γ(ω) at ω * ≈ 2.0, and the peak is wide: for 0.15 ≤ ω ≤ 6.08, γ(ω) ≥ 0.5γ(ω * ). This frequency range is where we will choose system transitions to lie; see Fig. 4

(a).
For this choice of parameters we obtain: so that indeed C(t) ∼ 1/t 4 . Integrals of C(t)e iωt over various intervals can be expressed via the Meijer Gfunction. Its evaluation is a part of the numerical simulation of master equations discussed in this paper, so their computational cost is sensitive to any shortcuts we can find, and the analytic form above is helpful. We will comment on the specific runtimes below. The bath parameter τ SB can be chosen freely, while τ B ≈ 0.69 is determined by the choice of a, b, β. Note that it has dimensions of β.
We choose τ SB = 10 so that τ B /τ SB = 0.1 1, a necessary condition for our error bounds to be small. We find T a,theory opt = τ B τ SB /5 = 0.97. To compare different equations, we pick an arbitrary two-qubit Hamiltonian: and choose |11 as the initial state. We let the coupling to the bath be given by V = σ z 1 ⊗ B. For all of our results, there will be no way to know what the true state ρ true (t) is. The differences found will be within the error bounds (growing at least linearly with time) of all equations. However we can simulate Eq. (46), which is presumably closest to the true solution since only the Born and Markov approximations were made:ρ We call this the "Original Redfield" equation (ORE). It is in fact possible that the CGME returns solutions closer to the true solution than this non-CP equation, but we note that in our derivation all the equations appeared as subsequent approximations to the ORE. Therefore we may characterize how good those approximations are by studying the difference ρ C − ρ OR . We first investigate the solution ρ OR (t), and find that it becomes negative (and hence unphysical) at t ≈ 2.57τ SB . Thus, we choose to compare the solutions of the CGME and ORE in the interval 0 ≤ t ≤ 2.56τ SB , where ρ OR ≥ 0 [see Fig. 4(b), and hence we can assume that c BM = 1 [recall that this is always true for a CP master equation; see the discussion following Eq. (47b)]. We note that the computational cost of the ORE is the largest (by at least on order of magnitude) among our equations. 11 The second observation we make is about the norm of the r.h.s. of Eq. (138). In Fig. 5(a) we present a probability distribution of the norms of the right hand side L BM,I t (ρ test ) 1 , where ρ test is taken from the Gaussian unitary ensemble (Hermitian matrices X sampled from a probability distribution ∼ e −2 n−1 TrX 2 , where n = 2 is the number of qubits), and subsequently normalized such that ρ test 1 = 1. We also combine the data for different times, as if the time was sampled uniformly in [0, 2.56τ SB ]. We find numerically that the maximum value of the norm that can be achieved is 0.44 ± 0.01. It would suggest a higher effective τ SB than our definition: Such an adjusted τ eff SB ≈ 9.14 = 1.33τ SB can be used to choose an adjusted T a,adj = τ eff SB /τ SB T a,theory opt = 1.12 = 1.15T a,theory opt . We could non-rigorously use the typical value of the norm instead, leading to T a,typ. ≈ 1.7T a,theory opt . To see if this adjustment is justified, we vary T a in Fig. 5(b) and plot the average of the trace norm of the difference in the solutions over t ∈ [0, 2.56τ SB ], i.e., 1 We see that the true optimum is at even higher T a,num. opt ≈ 2.87 ≈ 3T a,theory opt , and the equation matches Davies in the limit T a → ∞ [ Fig. 5(b)], as formally expected (see Appendix C). Even though our adjustments of T a are not very large, the error is very sensitive to them and improves significantly. We illustrate the error in more detail in Fig. 6(a) by plotting the differences as a function of t, where the CGME is taken for T a,adj and T a,num. opt . Also in Fig. 6(a) we plot our strongest upper bound on ρ C,adj (t)−ρ OR (t) 1 [Eq. (240), derived in Sec. 6 below]. We use T a → T a,adj and Λ → 4/τ eff

SB
Comparing this bound to the observed error in Fig. 6(a), we see that even after this adjustment, the bound is still not tight. Nonetheless, the adjustment helps to match the optimum in Fig. 5(b) better, and we believe the bounds can be improved by future work in this direction. In Fig. 6(b) we vary τ SB , and evaluate for T = 2.56τ SB . To find T a,num. opt , we vary T a for each value of τ SB and choose the one that gives the smallest values for the corresponding expression in Eq. (141). We again add the similar average error of Davies to the plot. Since our family of CGMEs with different T a includes Davies as a T a → ∞ limit, numerical optimization will always give an improvement over Davies. A simpler adjusted T a that does not require optimization still outperforms Davies at moderate τ B /τ SB . We also note that the τ B /τ SB dependence of its error at moderate τ B /τ SB is consistent with the intuition from our bounds, while the linear portion suggests that our bounds are not tight in some parameter regime.

Role of the Lamb shift in the CGME
We perform another test, where we drop the Lamb shift H LS of the CGME and obtain a corresponding solution ρ CL (t), as prescribed by Eqs. (132) and (133). We then plot ρ C,adj (t) − ρ CL,adj (t) 1 as a function of time, as shown in Fig. 7. We again pick T a,adj = 1.15T a,opt . We observe in Fig. 7 that the Lamb shift has the same role as in the Davies equation: it affects the phases of the off-diagonal matrix elements of ρ C (t) in the eigenbasis. Since off-diagonal elements decay to zero for the Davies case, the effect of their phase on the norm difference first grows proportional to the phase, then disappears with the magnitude of those elements.

Error bounds and estimates
In this section we give the details of the various error bounds and estimates mentioned without proof in our derivation of the CGME in Sec. 3. Our strategy is to derive the error terms successively, and then add them up using the triangle inequality. We work our way up through the various approximations, starting from Born in Sec. 6.2, followed by Markov in Sec. 6.3, then time-averaging (or coarse-graining) in Sec. 6.4. In the course of the latter, we bound the error due to dropping part of the integration domain to achieve complete positivity, and analyze the optimization of T a . But we start with a proof of Lemma 1, which plays a central role in our analysis.

Bound on the difference of solutions of differential equations differing by a bounded operator
We first present a proof of Lemma 1.
Proof. The first part of the Lemma is concerned with the pair of differential equationsẋ = L t x + E anḋ y = L t y. Their formal solution is: Let Λ > 0 be a constant defined as follows: sup τ,x L τ (x) 1 ≤ Λ for all x such that x 1 = 1. Since L is linear, and writing x = δ/ δ 1 , it follows that ∀δ: L τ (δ) 1 = δ 1 L τ (x) 1 ≤ δ 1 Λ. Then, assuming x(0) = y(0), and taking the operator norm of the difference yields, for δ = x(t) − y(t): Many different functions f (t) ≡ x(t) − y(t) 1 satisfy this inequality for all t, but they are all upper-bounded by the function b 1 (t) = max x(t) − y(t) 1 that saturates the inequality: The solution is This proves the desired bound on The second part of the Lemma is concerned with the more general, non-Markovian pair of differential equationsẋ(t) = t 0 K t−τ (x(τ ))dτ + E andẏ(t) = t 0 K t−τ (y(τ ))dτ . The first part of the Lemma in fact follows from this case as a corollary, but we presented it for clarity. We again subtract the formal solutions: Define Λ t = sup x K t (x) 1 for all x such that x 1 = 1. By linearity of K t it follows as above that ∀δ: K t (δ) 1 ≤ Λ t δ 1 . Therefore: The upper bound b K (t) on x(t) − y(t) 1 satisfies the equation: Taking the derivative once, we obtain: Since the r.h.s. is positive, b K (t) is a monotonic function. So b K (τ ) ≤ b K (t), and it follows that: In other words, we can again upper Now let Λ be a positive constant such that t 0 Λ τ dτ ≤ Λ for all t. We thus arrive aṫ b K (t) = Λb K (t) + E 1 , for a new upper-bound b K (t) ≥ b K (t). This is exactly the same as Eq. (144), and hence the Lemma still holds for non-Markovian equations.
Note that for our purposes Λ = 4/τ SB is usually taken, thanks to Eq. (41, 42c), and that the non-Markovian bound will be generalized in Sec. 6.2. The exponential on the r.h.s. of Eq. (145b) may be troublesome. Under additional assumptions we can prove a much tighter linear in t bound presented in Appendix E, yet we did not find a way to recast all of our results in that tighter form.

Born approximation error
We start with an estimate of the error associated with making the Born approximation, which we presented in Eq. (33). I.e., we would like to bound the error E B =ρ true,I (t) − t 0 K 2,B t−τ (ρ true,I (τ ))dτ . It is difficult to do so directly since ρ true,I (t) is unknown, so instead we will first use a proxy for ρ true,I (t), which we call ρ B4,I (t). The latter is the solution of the master equation obtained by iterating the substitution of ] to 4th order, and only then applying the Born approximation. After developing an understanding of the 4th order we proceed to the infinite series. We make certain assumptions about its convergence, and comment below on their compatibility with the known convergence radius of the Dyson series. Let us first define the type of bath for which we can carry out this procedure in order to arrive at a bound.
We refer to a bath as exponential if its correlation function C(t) decays exponentially. This type of assumption is both common and convenient. For example, as we will see in more detail below, for a Gaussian bath (one which satisfies Wick's theorem) the times t 1 < t 2 < t 3 < t 4 appear in the estimate of the Born error [they enter terms such as C(t 1 − t 3 )C(t 2 − t 4 )]. If C(t) is exponentially decaying with a characteristic time τ B , that immediately lets us conclude that only t 1 , t 2 , t 3 , t 4 that are all within ∼ τ B of each other contribute to the estimate, and the bound on the Born error acquires a small factor of τ B /τ SB . However, an exponentially decaying C(t) may be an unrealistically strong assumption (e.g., it is hard to satisfy at low temperatures). Therefore it is desirable to introduce a condition weaker than exponential decay, which we refer to as a nonexponential bath. Specifically, we consider the convergence of integrals such as ∞ 0 |C(t)|t n dt for some integer n ≥ 0. Such a condition was used in Ref. [31] to control the error of the subsequent Markov approximation. Here we show how these integrals for n = 0, 1 control our estimate of the Born error for a Gaussian bath. The physical meaning of these integrals was defined in Eq. (11). A more general requirement on a non-Gaussian bath can be derived in the same way. However, that requirement will involve a higher-order correlation function that does not have a straightforward and concise interpretation.
Recall the steps of the derivation where we make the Born approximation, leading to Eq. (39). For brevity, we drop the interaction picture subscript, replace the time argument by a subscript, and place the approximation level B in the superscript: ρ B,I (t) = ρ B t . Written out explicitly, Eq. (39) in terms of ρ B t is: The formal solution is: We substitute this solution back into Eq. (153), a necessary step because our estimate of the Born error will come from the 4th order terms, so we need to subtract the original solution. The full expression to be subtracted is: (155g) Now, these terms constitute only a part of the expression for the derivative of the true density matriẋ ρ true t to the 4th order in the system-bath interaction. The full 4th order expression can be obtained, as mentioned above, by substituting the solution of the total evolution, three consecutive times (to generate a 4th order commutator), and only then applying the Born approximation. We call this ρ B4 t since it will differ from ρ B t in the 4th order in the interaction V (t). Doing so, we obtain: Defined in this way, ρ B4 t is close to the 4th order of the true state ρ true t up to terms of 6th order and higher, so we use ρ B4 t − ρ B t to estimate the actual leading order error ρ true t − ρ B t . We proceed to expand all the commutators: There are 16 terms total in the last line, and the order of B t , B τ , B θ , B m and ρ b is exactly the same as the order of A t , A τ , A θ , A m and ρ B m . Let us now assume that the bath is Gaussian. By definition, a Gaussian bath obeys Wick's theorem (or Isserlis' theorem [75]), which states that at all orders the higher order correlation functions decouple into products of two-point correlation functions. For example, for the 4-point correlation function: We see that in Eq. (155) only the first term was present. One can check that the order of A is exactly the same, so upon subtracting Eq.
for instance: The quantity that appeared in the derivation is E B . We will now bound E B4 (ρ any ) 1 and discuss its generalization E Bk (ρ any ) 1 . We postpone the estimate for E B 1 till we develop more advanced tools.
is given by the two second order pairings in Fig. 8, times the 16 possible orders of A t , A τ , A θ , A m and ρ m : We take the trace norm of both sides: where we used the triangle inequality A + B 1 ≤ A 1 + B 1 . We now use submultiplicativity [Eq. (38)].
Noting that the first norm in the submultiplicativity inequality is the operator norm, we obtain: The operator norm A = 1 and we will set c a = max t ρ any t 1 such that ρ any 1 ≤ c a : In particular, E B4 (ρ B ) is bounded with c B and E B4 (ρ B4 ) with c B4 . There are 16 terms after the expansion of commutators: where we have also used that |C(t − m)| = |C(m − t) * | = |C(m − t)|. What is left is to bound the integrals in Eq. (164). It turns out that the following condition suffices: which is automatically satisfied for τ SB and τ B as defined in Eq. (11). We also change the order of integration variables using the condition 0 ≤ m ≤ θ ≤ τ ≤ t, e.g.: The first term in Eq. (164) is bounded as: while the second term in Eq. (164) is bounded as: Together, this yields: which is the first hint for the result given in Eq. (33). The actual error term appearing in Eq. (32) is E B as defined in Eq. (163). We can consider repeating the construction of ρ B4 presented here for ρ B6 , ρ B8 . . . as successive approximations to ρ true . The corresponding errors can be defined: By employing the diagrammatic technique as in Fig. 8, the higher orders of perturbation theory in the system-bath coupling can be shown to give higher orders in τ B /τ SB . There are also extra factors of 4t/τ SB that appear in the higher orders. For instance, E B6 has the form: and the diagrams for the second term are shown in Fig. 9(a). We do not prove this form of E B6 here. We will bound all t-dependent terms of the first order in τ B /τ SB , by summing the diagrams in Fig. 9(b): for all k. Here we fix time to be a constant: . This is a weak statement. A stronger statement would include the time-dependence inside big-O, and have timeindependent constants , C: We do not know how to prove such a statement as of yet. The proof would rely on the diagrammatic calculation of subleading terms. It is straightforward, but cumbersome, and we do not attempt it here. Instead we make two assumptions: 1. In the k → ∞ limit, there is a finite radius of convergence in e 4t/τ SB τ B /τ SB : 2. The true solution is the limit of the perturbative series: To prove convergence, one needs to control the factorial number of terms appearing in Wick's theorem. Such a proof was already presented by Davies [4]. The slight adjustments needed to include an integral condition such as Eq. (169) are a somewhat tedious problem left for a future study.
Our definition of E B under this assumption contains E B∞ discussed above, as well as an extra term: where c a = 1 since the true evolution is CP. The second term will turn out to be time-dependent, and quite tricky to estimate. We will return to this problem after we develop some extra machinery. Let us first note the form of K k,B , starting with k = 4: The solution ofρ is equivalent to solving a system of 4th order equations that are our proxy for the true solution (which is ∞ order): We will prove that the solution of the above system remains close to ρ B , the solution of the equation after the Born approximation:ρ We will also present a straightforward generalization to all k which will allow one to bound E B 1 . First write the equation in the compact form: Define a custom norm that is an infinity norm on the vector of operators, but for each operator the trace norm is taken: The triangle inequality is obeyed as required: The maximum of the custom norm of L over inputs of norm 1 is the same as before: so all the properties needed to prove Lemma 1 hold. We establish: in the original variables: Note that the error we are trying to bound is Our approximation to it is bounded as: where we have used the triangle inequality: ρ 1 . Now we can repeat the above proof for arbitrary k: For appropriately defined L, · c the r.h.s. is still bounded by the same constant: which leads to max( δρ and the error in the r.h.s. is bounded without change: Taking the k → ∞ limit, we obtain: and, finally: where we have used that c a = 1 for ρ true . This result is the sought-after justification of the estimate given in Eq. (33).
An immediate consequence of Eq. (197) is that we can use it to obtain a bound on c B , which we defined after Eq. (40) as an upper bound on ρ B,I 1 . Since we obtain:

Markov approximation error
This subsection follows Ref. [76] initially. Before the Markov approximation but after the Born approximation, the master equation had the form given in Eq. (39). The error due the Markov approximation ρ B,I (τ ) → ρ B,I (t), in transitioning to Eq. (42b), is: Since ρ B,I (t) − ρ B,I (τ ) = t τρ B,I (t )dt , we have where we used Eq. (40) in the second inequality. Now we can estimate the norm of the error: We found c B and saw that it is O(1) in Eq. (200).
Let us now use the Markovian Lemma 1 with Eq. (203): A total expression for the Born and Markov error is [adding Eq. (197)]: which simplifies to: or substituting in c B : The extra factor from c B can be absorbed into the big-O notation: A loose bound follows from the above: Sometimes we wish to report the bound briefly as: Proof. The original big-O notation states that for e 4t τ SB τ B τ SB ≤ the following inequality holds: We first note that e

General analysis of time-averaging
We consider the time-averaging operation, which leads to a more complicated bound on the difference of the solutions. We first prove a general result:

Lemma 2. For any first order linear differential equationρ(t) = L t ρ(t) there is a time-averaged versioṅ
Note that we use a different symbol π(t) for the solution of the time-averaged equation. Assume the same initial condition: ρ(0) = π(0). Then the deviation between the two, δρ(t) ≡ π(t) − ρ(t), is bounded as: where Λ, c ρ are constants such that ∀t, ρ 0 , ρ 0 1 ≤ 1 : L t (ρ 0 ) 1 ≤ Λ and the solution ρ(t) with the initial condition ρ(0) = ρ 0 is bounded as An immediate corollary is: The proof can be found in Appendix F. The O(ΛT a ) corollary enters the estimate for ρ BM,I (t) − ρ BM T,I (t) 1 we presented in Eq. (61b) in the derivation (using Λ = 4/τ SB ). We will also need a compact bound on: One can prove that the expression in the brackets is upper-bounded by This allows us to bound Note that the function b 2 (t) is monotonic: b 2 (t) ≤ b 2 (T a /2). One can then loosen the bound in Lemma 2:

Time averaging of the Redfield ME
We now focus on the specific equations of interest to us. We already established in Eq. (42c) that we can choose Λ = 4/τ SB (recall that Λ needs to upper bound the r.h.s.: max t,ρtest, ρtest 1 =1 L BM,I t (ρ test ) 1 ≤ Λ). The total time-averaging error (219) is now bounded as: We will use both the compact bound of Eq. (220), and the tightest bound available which is a repetition of Lemma 2:

Bound on the error due to enforcing complete positivity
Recall that after the time-averaged equation is obtained, we need to drop an extra portion of the integral to obtain complete positivity [the transition to Eq. (65a)]. Before that, Eq. (64) was: which changes into Eq. (65a) (same terms, but the portion of the integral is subtracted): Collecting ω into A(t) we obtain: Figure 10: Times contributing to E p for (a) t > T a /2 (b) t < T a /2 so that: Since the resulting equation is CP, we used ρ C 1 = 1. We would like to bound this norm by splitting the integration domain into different times. The corresponding domains are illustrated in Fig. 10. For t < T a /2 we note that the argument of C(τ − t ) can be both positive and negative. Thus a factor of 2 arises when we bound dt |C(τ − t )| ≤ 2/τ SB : For t > T a /2, we perform a change of variables: τ − t = −τ, t + T a /2 = θ: We now change the order of integration, noting that 0 < θ < τ , thus obtaining the following upper bound: Recall that the total evolution time T entered the definition . We can usually set T = ∞, except for an Ohmic bath [see Eq. (128)], which is a borderline applicability case, with a logarithmic in T divergence of the integral. We define an evolution time with a collar of T a /2: T = max t (t + T a /2): Collecting everything, we obtain: where θ(x) = 1, x > 0 and zero otherwise.
Recall that E p is defined in Eq. (65a) as the extra term appearing if the CGME is written with the same expression as Eq. (64) in the r.h.s. We can now use the same idea as in the proof of Lemma 1 (Sec. 6.1). Let us introduce δρ 2 = ρ BM T − ρ C . A function b p that upper-bounds δρ 2 1 is the solution of the differential equationḃ where we have used Λ ≥ max t,ρtest, ρtest 1 =1 L BM,I t (ρ test ) 1 from Eq. (42c) as the upper bound on the norm of the superoperator on the r.h.s. of Eq. (64). Indeed, by applying the triangle inequality to the definition of the r.h.s. of Eq. (64) we get: The solution to Eq. (232) is: Substituting Eq. (231), we obtain two cases: which we can summarize as For a concise form we change the first term using Let us now focus on the difference with ρ BM,I (t) which is the solution of Eq. (42b). We will keep Λ ≥ max t,ρtest, ρtest 1 =1 L BM,I t (ρ test ) 1 in the bound in case it is < 4/τ SB . Using Eqs. (220) and (238), we have: The tightest bound available that starts at zero at t = 0 is the combination of Eqs. (221) and (237): We may optimize T a to minimize the bound Eq. (239), which we proceed to do next.

Optimization of T a
We have used Λ ≤ 4/τ SB to obtain the form of the bound in Eq. (239), but we kept both Λ and τ SB to demonstrate the possibility of making the bound tighter by using different values for Λ and 4/τ SB evaluated independently. To that end, we denote c Λ = 4/Λτ SB ≥ 1 and treat it as a constant below. At large t Λ −1 , t > T a /2 the leading terms of Eq. (239) are: We can loosen the bound again via e −ΛTa/2 ≤ 1: Minimizing the expression in the brackets, we find that T a = c Λ τ SB τ B /(3c BM + 2) [= τ SB τ B /5 if c BM = c Λ = 1, which is Eq. (25)] for any τ B /τ SB leads to an optimal bound at large enough times. The asymptotic behavior of the bound is: One may be concerned that the relaxation e −ΛTa/2 ≤ 1 reduced the quality of our bound. We checked this for c BM = c Λ = 1, though we do not present that calculation here. The result is that after the optimization of the original Eq. (240), which is a more complicated function of T a , the bound is unchanged to the leading order, and in fact acquires a multiplicative correction of the form 1 − 17 . We do not pursue this route since the effect is small, and the calculation is unreasonably long. Instead we use T a = c Λ τ SB τ B /(3c BM + 2) obtained above and find that the full expression for the error from Eq. (239) can be bounded as and it holds for all positive τ B /τ SB , t/τ SB and c BM , c Λ ≥ 1. The derivation can be found in Appendix G. This simple form allows us to finally bound c BM . Since for a CP coarse-grained equation ρ C 1 = 1: (246) This is a quadratic equation on c BM . Its ≥ 1 solution is: And here the big-O notation means that there exist constants We note that the choice of T a = c Λ τ SB τ B /(3c BM + 2) depends on the total evolution time, if we use the above bound on c BM . We would like to approximate it by a time-independent T a . Note that for can approximate c BM ≈ 1 and consequently T a = c Λ τ SB τ B /5. Note also that our construction was optimal for asymptotic e Λt 1 (for the discussion of small times, see Appendix H). We combine the two conditions as 1 e Λt τ SB τ B . In units of actual time, this corresponds to This is a fairly narrow range for any realistic parameters, but it still becomes [1, ∞] in the weak coupling limit. We choose to work with T a = c Λ τ SB τ B /5 that is approximately optimal within that range. From a purely mathematical point of view, there was no particular reason to choose it this way. From a physical point of view, we would like to work with errors of ≤ 10%, which would correspond to a range like this. We have used T a,adj = c Λ τ SB τ B /5 and T a,theory = τ SB τ B /5 for the numerical simulations in Section 5.3. For theoretical purposes of the remainder of this Section, we can always use c Λ = 1 which is proven. We will keep the notation e Λt = e 4t/τ SB for brevity. The error bound for T a = τ SB τ B /5 is derived as Eq. (367): The constant c BM can be obtained numerically independently, and then one just needs to substitute it. For the theoretical use of the CGME, that route is not available, and instead one needs to substitute its upper bound Eq. (247). For the rest of this section, we will loosen the resulting bound to make the expression more compact. Since we optimized for e Λt 1, dropping constants will not be significant in the parameter regime of interest. We will also update the expression for c BM using 247): Now we simplify Eq. (249) by relaxing the constant terms: With the relaxed form of c BM above this becomes: The error near t = 0 is doubled as compared to the longer formula (249). Moreover, at each of decreasing timescales t ∼ Λ −1 , t ∼ T a , t = 0 the error gets progressively worse in our approximations, as compared to the tightest bound possible: the error at t = 0 is supposed to be 0. Nevertheless, we proceed, as this route allows us to obtain a concise form and the very small t region is less important for our purposes. The bound can be further relaxed with rounding, using where we plugged in Λ = 4/τ SB . We will use this form while computing the total error. We still need to include the Markov and Born errors. Adding the bound in Eqs. (253) and (211), and using the triangle inequality, we finally obtain: Recall that this bound is applicable within the region e 4t τ SB τ B τ SB ≤ C for some constant C (from big-O), but within that region any triple {t, τ B , τ SB } ≥ 0 is allowed. In particular, for sufficiently small τ B /τ SB , the error at any value of t/τ SB can be shown to be small. As a corollary, we proved the validity in the weak coupling limit, but the above inequality is more general than that. In particular, this proves Eq. (76), which uses T a = τ B τ SB /5.
We will finally show how to simplify Eq. (254) to the form O e 6t τ SB τ B τ SB presented in Eq. (28). Denoting τ SB , we can relax the bound as follows: We then use the property of Big O notation: for any function . We obtain: From this, the result of Eq. (28) immediately follows:

The Davies-Lindblad error
We write the CGME with an explicit dependence on T a : The error bound is known for arbitrary T a : see Eq. (242). We now wish to compare the CGME with finite T a to the limit T a → ∞ of the same equation: In Appendix C, we show that this limit is just the Davies-Lindblad equation: We also show in Appendix C that the difference between the right-hand sides is bounded as: Here the system Hilbert space dimension 2 n appeared, and we note that 1/δE could contain an additional exponential dependence on n. The accumulated error in the solution is bounded as: In the long time limit the leading terms are: Assuming that 4 n δE τ B , we find the optimal T a = 2 n O( τ SB /δE). Using that together with a bound for t ≥ T a /2 we get:

Redfield limits of integration error
There is one more error left to analyze: the error due to changing t → ∞ in the Redfield equation. We already had the bound given in Eq. (47b): (48)]. We augment Eq. (265) by a trivial bound: Since the bound on E l 1 is time dependent, we cannot directly use Lemma 1 for Eq. (47a). Instead, we repeat its proof and integrate the corresponding differential equations as was done in the proof of Lemma 2. We define a function b R (t) ≥ ρ BM (t) − ρ R (t) 1 (recall that ρ BM l = ρ R ) that satisfies the following differential equation, analogous to Eq. (144):ḃ Integrating it, we obtain: As shown in Appendix I, this results in the error bound: In other words, the O(τ B /τ SB ) error scaling of the master equation just after Born-Markov approximation, noted in Eq. (209) acquires a logarithmic correction.
We will now show how to simplify the total error of Redfield to obtain Eq. (26). We add the error of ρ BM from Eq. (211): We will set T = 0 in this estimate and use the following bound on c BM from Eq. (250): where we denoted x = e 12t τ SB τ B τ SB . After a series of simplifications similar to the ones done after Eq. (255) we arrive at: Since big O notation is defined for x ≤ for arbitrary small , it follows that τ B /τ SB ≤ is also small, so the logarithm is the leading term: This is Eq. (26).

Summary and Conclusions
Our primary goal in this work was to derive a Markovian master equation with a complete positivity guarantee that is in addition capable of incorporating arbitrary time-dependent driving, and that has a larger range of applicability than the Davies-Lindblad Markovian master equation. The master equation that achieves these desiderata is based on the coarse-graining approach introduced in Ref. [40], which only considered the time-independent (no driving) case. We rederived this result by showing that it results from the non-CP Redfield master equation after neglecting part of the time-integration domain, which restored complete positivity. We then included arbitrary time-dependent driving and obtained a new CGME that is still CP, and retains essentially the same form as its time-independent counterpart. This is our central new result, given in Eq. (22). This time-dependent CGME depends on one free parameter, the coarse graining time T a . We showed that it is optimal to choose it as proportional to the geometric mean of two key timescales, the bath correlation time τ B and the fastest system decoherence timescale τ SB , given in Eq. (11). These timescales are related to the bath spectral density γ(ω) via the inequalities 2/τ SB ≥ γ(ω) and 2τ B /τ SB ≥ |γ (ω)|. The 1-parameter family of CGME equations involves a continuous integral, or equivalently, a sum over exponentially many terms in the frequency domain. Alongside this 1-parameter family, we also derived an approximation in terms of 3-parameter family (T a , ∆ , k * ), given in Eq. (78). We showed that if [H, A] = O (1), where H is the system Hamiltonian and A ⊗ B is the interaction with the bath [Eq. (3)], then there is no system-size dependence in ∆ , k * , where k * is the number of terms replacing the continuous integral.
Along the way we provided rigorous error bounds on three different master equations: Redfield, Davies-Lindblad, and the CGME. These bounds [Eqs. (26)- (28)] are expressed in terms of the dimensionless ratio τ B /τ SB , and in the Davies-Lindblad case also in terms of the quantity 1/ √ τ SB δE, where δE is the minimum level spacing. These results are valid even when B diverges, so they apply in particular to, e.g., oscillator baths. When the system-bath coupling strength g is finite we can write τ B /τ SB = (gτ B ) 2 and 1/ √ τ SB δE = g τ B /δE. These bounds provide a new perspective on the range of applicability of Markovian master equations: the Redfield and CG master equations apply in the regime where gτ B 1, but the Davies-Lindblad master equation applies when in addition the minimum level spacing is large relative to g 2 τ B . While these are all sufficient and not necessary conditions, if we informally view a large level spacing as a requirement, then it is a very onerous one indeed, since in many cases of interest the spacing shrinks rapidly (polynomially or even exponentially) with problem size, e.g., in adiabatic quantum computing [77]. Thus the guaranteed range of applicability of the Davies-Lindblad master equation is severely limited, while the CGME achieves complete positivity without imposing this cost.
To summarize the latter in the simplest possible terms, what we have shown is that the CGME and Redfield master equations are valid for fast baths, in the sense of a very simple integral condition on the bath correlation function. Ohmic and super-Ohmic baths satisfy this condition, provided the system-bath coupling strength is weak but constant in system size (for a local system). For the Davies-Lindblad master equation the coupling strength needs to be exponentially small in the system size. However, the Redfield equation and the CGME are not on equal footing: the Redfield equation provides no guarantee of complete positivity, while the CGME does.
We list a few potential applications of the CGME: • The CGME opens the door to studies of open system dynamics with arbitrary time-dependent drives H(t). In particular, the drive need not be adiabatic. In fact, the time-dependent CGME even correctly describes a system driven by δ-function pulses, as demonstrated in Sec. 5.1 for dynamical decoupling. Moreover, the time-dependent CGME overcomes an inherent problem in applying the Davies-Lindblad ME to circuit model quantum computing, in particular in the context of fault-tolerant quantum error correction. The latter ME is incompatible with the assumption of arbitrarily fast gates needed there [43], but the time-dependent CGME can be consistently applied in this context. This opens the door to a rigorous analysis of fault-tolerance in a first-principles Markovian setting.
• Earlier studies of the lifetime of the toric code at finite temperature took advantage of the fact that the Davies generators are local for commuting models [78]. The CGME provides local generators of open system finite temperature dynamics for non-commuting models (see Sec. 3.6). This opens the door to studying the finite-temperature lifetime of, e.g., topological subsystem codes [79] in the thermodynamic limit.
• Many-body localization effects in quantum annealing -previously studied only in the closed system setting [80] -can now be extended to finite temperature open system quantum annealing.
We hope that this work, including the applications above, will stimulate further research into the uses of the CGME, the only master equation we know of that provides a complete positivity guarantee, is locally generated, and applies for arbitrarily driven open quantum systems.
implied, of the ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon.
A Proof that γ(ω) > 0 Trivial case. First consider V = A ⊗ B. The function γ(ω) is the Fourier transform of the correlation function: Our derivations in this paper are for a stationary bath ρ Inserting the sum over bath eigenstates: Integration results in delta-functions: This is enough for all the results in this paper. A more complicated interaction with environment, however, requires a different proof.
General case. We consider the case V = i A i ⊗ B i , so that γ(ω) becomes a matrix. ρ B will still be assumed stationary: [ρ B , H B ] = 0. Repeating the same steps, we arrive at Thus we need to prove that the matrix For positivity, we need to prove that for any vector w with elements w i it holds that ij w i M ij w * j ≥ 0. Indeed: Thus γ(ω) ≥ 0 (283) as a matrix.
Bochner's theorem Our proof above used the eigendecomposition of the bath, and γ(ω) was a sum of Dirac δ functions. In practice, a smooth γ(ω) is used, corresponding to, e.g., a bath with a continuous spectrum. In this sense it is desirable to avoid using bath eigenstates and δ-functions altogether. Here we give another proof that uses Bochner's theorem, as suggested, e.g., in the textbook [2], and which avoids the issue mentioned above.

Lemma 3 (Bochner). If a function φ(t) is of positive type
and also φ(0) is finite and φ(t) is continuous at t = 0, then its Fourier transform (if it exists) is non-negative: We again consider many interaction terms V = i A i ⊗ B i (as in Sec. 3.7) and a stationary ρ B s.t. [ρ B , H B ] = 0. Since γ(ω) is Hermitian we can diagonalize it using a unitary transformation: D is diagonal so we only need to consider the diagonal elements (i.e., the eigenvalues of γ). Substituting We wish to show that D α is non-negative for each α. To do this we must consider the function in parenthesis. D α is the Fourier transform of this function so if we can show that it is of positive type then D α must be positive by Bochner's theorem [81]. Define the following function with {t i } an arbitrary time partition: Note that We need to show that f α is a positive matrix. For arbitrary |v we have We have established that v| f α |v ≥ 0 for any time partition {t i }. Therefore D α is non-negative by Bochner's theorem. Consequently, γ ≥ 0 as a matrix since all its eigenvalues are non-negative.

B Lamb shift simplification
The Lamb shift was given in Eq.
Recall also that A(t) = ω A ω e −iωt [Eq. (5)], so we can write: where where ω ± = 1 2 (ω 1 ± ω 2 ) and θ ± = t 1 ± t 2 . This change of variables rotates the square by π/4 into a rhombus, and the integration limits correspondingly change to: The Jacobian is 1/2. We can now perform the integral over θ + : where we used the identity C(θ) = C * (−θ) and a change of variables θ → −θ to make all the integration domains positive. When ω + = 0 the expression above should be understood as a lim ω + →0 . Thus: which is Eq. (21b) in the main text.

Recall that
This is indeed satisfied by Eq. (296), thus ensuring the Hermiticity.
C The Davies-Lindblad equation is the infinite coarse-graining time limit of the CGME The RWA used to derive the Davies-Lindblad equation leaves something to be desired. We simply dropped terms with different Bohr frequencies, without a rigorous mathematical justification. Here we repeat, with some extra clarifications, the derivation given in Ref. [40] which shows that the Davies-Lindblad equation is the infinite coarse-graining timescale limit of the CGME.

Lemma 4.
The following equivalent form holds for γ ωω (T a ): Proof. Let us rewrite ω s − ωs in terms of a sum and difference of Bohr frequencies: where u = s − s and v = s + s . After this change of variables C(s − s ) = C(u), and since s = (v + u)/2 and s = (v − u)/2, the Jacobian of the transformation is 1/2. In terms of the new variables the integration domain is a rhombus, bounded between the lines u = v and u = −v for v ∈ [0, T a ] and the lines u = 2T a − v and v − 2T a for v ∈ [T a , 2T a ]. Thus: To get the integration limits to be the same we make a change of variables from v to 2T a − v in the second double integral: which is Eq. (298).

C.1 The ω = ω case
For ω = ω we now have: Let U = v −v du e iωu C(u). Then dU = e iωv C(v) + e −iωv C(−v) dv, and integrating by parts gives: Consider the second integral: where in the last step we used Eq. (11b). Since C(v) = C * (−v), the third integral in Eq. (304) satisfies the same bound and limit. We are thus left with with the last equality being due to Eq. (6b).

C.2 The ω = ω case
For ω = ω we also perform integration by parts of Eq.
which applied to the interval [ , + ∆ ] reads: Substituting this yields: which concludes the proof.
If we use the proven Eq. (315) for it will express the error E k as the sum of: Let us start with the E k2 term corresponding to truncating the integral at k * . As becomes far removed from all the frequencies ω in the system, this integral becomes small as 1/ . To prove this, we integrate by parts: (320) Taking the norm and recalling that A = 1, we get: We enforce that the error is τ B /τ SB Let us now focus on the term with the derivatives E k1 : The necessary norm bounds are: Using Eqs. (12) and (13) we have the bound Substituting T a = τ B τ SB /5, we get: and the error bound is then: This leads to the step-size choice: 2(k * − 0.5) (10 2/5 + 1)τ B 10π Combining this with Eq. (323), the solution is: 5π 2 2(10 2/5 + 1) , k * = ceil τ SB τ B
We remark that the bounds we used to derive Eq. (330) can be significantly tightened; our goal here was to show that they are O(1). We do not actually recommend to use Eq. (330) for numerical calculations: one can obtain accurate results with much larger ∆ and much smaller k * . E An error bound that is linear in t Lemma 5. Let L be a linear superoperator and consider the pair of equationṡ x(t) = Lx(t) + E,ẏ(t) = Ly(t) . (331) If any solution y(t) possesses the property that ∀t, y(0) such that y(0) p ≤ 1 : y(t) p ≤ c y , then for any finite t: The result holds in the same form for the operator (p = ∞, omitted in our notation) and trace (p = 1) norms.
Proof. The linear differential equation for y has a unique solution in a neighborhood of any initial condition. A trivial corollary is that the evolution operator is reversible for any finite t: e Lt e −Lt = 1 .
This is an equality between superoperators. Now we can express the difference as: x(t) − y(t) = e Lt (e −Lt x(t) − y(0)) .
The explicit form of the solution x(t) is: which yields, using Eq. (334): We now take the norm of both sides: By linearity of the time evolution and the norm: Note that y p = 1. Since we can take y as the initial condition of the equationẏ(t) = Ly(t), and since e L(t−τ ) y will then be the solution at time t − τ , we have, by assumption of the lemma: Note that we had to make these assumptions for any y of bounded norm, not just density operators. It now follows from Eq. (337) that: In particular, if L is a positive trace-preserving map then c y = 1.
The only error for which we can apply Lemma 5 in this work is the Markov error, which we present here: where c y = c BM and we used Eq. (203), which contains c B . We instead used a loose bound from Eq. (204) since it results in a more compact expression. Apart from this we have no occasion to use Lemma 5 in this work, since not all the equations appearing in our derivation are invertible. This is why we instead use Lemma 1 or prove the necessary results independently.

F Proof of Lemma 2
Proof. The formal solutions allow us to write: Substituting π(t) = ρ(t) + δρ(t) gives: Making the time-averaging explicit: We would like to change the integration variables of the first term L θ+τ ρ(θ) in such a way that it becomes L θ ρ(θ − τ ). The change of variables is θ + τ = θ , τ = τ . In the second term −L θ ρ(θ) the change is trivial θ = θ , τ = τ . This introduces transient effects at the beginning and the end of the evolution, as we want to revert the integration region of the first term L θ ρ(θ − τ ) to be the same as the second term. This is illustrated in Fig. 11 and the corresponding integrals are: (346) We call the middle term transient because its contribution does not grow with t. One can interpret it as two instantaneous kicks to the solution at time 0 and t. For t ≤ T a /2 the integrals in the second term cancel over the area (T a /2 − t) 2 , as indicated by the yellow triangles in Fig. 11. In fact by splitting the integral above differently we could get a slightly tighter (parametrically better for the transient) bound, but working with rectangular regions is easier. Now we can take the norm: The difference between ρ's at nearby time points is bounded trivially as: which can be used to simplify: We analyzed a similar inequality in the proof of Lemma 1, and as we saw there this amounts to solving for b 2 (t) that saturates the inequality and upper bounds δρ(t). Note that despite the min function there In principle we could consider a family of equations with different T a (t) and solve each one of them just to obtain ρ(t) at one point. This is not a significant overhead. We proceed with the goal of obtaining a single equation since it is conceptually simpler. To this end we now define the bound relevance time t * , which is the largest time for which our bound is still better than the trivial bound ρ BM,I (t) − ρ C,I (t) ≤ 1 + c BM : 1 + c BM (t * ) = ((3c BM (t * ) + 2)e Λt * − c BM (t * )) T a τ SB + (e Λt * − 1) We would like to optimize T a at t = t * , which would mean that t * is maximized. The corresponding equation for t * is: and solving the resulting quadratic equation yields: e Λt * = 4c BM (t * ) + 2 + Y 2(3c BM (t * ) + 2) , Y = 4(c BM (t * ) + 1) 2 + 2(1 + c BM (t * )) 2 (3c BM (t * ) + 2)(τ SB /τ B c Λ ) . (371) Thus T a is: And the error is: We should only use these expressions if t * > T a /2. For τ SB τ B (when t * is not likely to be > T a /2), this changes the asymptotic form of T a to T a ∼ τ SB . In the regime τ SB τ B that we normally address with the CGME, we expect these formulas to be a minor improvement on the loose bounds presented in the main text. Their main advantage is a tighter bound on the error for t > T a /2, t ∼ τ SB .

I Proof of the bound (269b) for the Redfield limits of integration error
Starting from Eq. (268), we first send the integration limit to infinity: The min function evaluates to 1 − T when x ≤ x * and to 4τ B xτ SB when x > x * , where Therefore: where E 1 (x) denotes the exponential integral function: E 1 (x) ≡ ∞ x t −1 e −t dt. A tight bound in terms of elementary functions is given by [82][Thm. 2]: Thus where in the second line we used that ∀x: 1 − e −x < x.
Alternatively, and using more elementary methods, assuming x * < 1, we obtain: while when x * ≥ 1 the term with the logarithm is absent: Combining these two cases directly yields Eq. (269b), which is an upper bound on the tighter bound presented in Eq. (378b).