1 Introduction

The entropy production is a key quantity in the study of open quantum systems (quantum systems in interaction with the external environment). On the one hand, it identifies the amount of energy that is irreversibly lost in terms of heat during the interaction process, and, on the other hand, it quantifies the degree of irreversibility of the resulting dynamics [1,2,3,4,5,6]. In this paper, we adopt the point of view of stochastic quantum thermodynamics, so that the entropy production is defined as a stochastic variable, whose probability distribution and statistical moments can be computed by resorting to the Tasaki-Crooks formalism [7,8,9,10]. According to such a formalism, the stochastic entropy production quantifies how much the joint probability distribution of two measurement outcomes at different times along a quantum evolution differs from the corresponding distribution in the time-reversed dynamics.

Since we are dealing with open quantum systems, the dynamics is not unitary and the definition of a time-reversed path is not straightforward. If the system and its environment are uncorrelated at time \(t=0\), the evolution at later times is described in general by a one-parameter family of Completely Positive and Trace Preserving (CPTP) maps [11]. Many results in quantum thermodynamics deal with the so-called unital maps, namely with the special class of time evolutions that preserve the maximally-mixed state (multiple of the identity). In fact, for unital maps there is a natural notion of inverse dynamics given by the dual quantum map. Moreover, in this case the entropy production is known to depend only on the initial and final quantum states of the nonequilibrium process under scrutiny, not on the full history. As a result, on average the entropy production is provided by the difference of the von Neumann entropies in the final and initial states. In this regard, fluctuation relations and the statistics of thermodynamic quantities in unital quantum maps have been studied for instance in [12,13,14]. It is worth mentioning in particular the case of unitary dynamics interspersed by projective measurements that also belong to this class [15,16,17,18,19,20].

However, a lot of physically interesting phenomena are described by non-unital maps, like thermalization, dissipation to a non-thermal state, and even feedback-controlled mechanisms as e.g., those of Maxwell demons. In this setting, the definition of a time-reversed protocol is less straightforward; however, a few proposals appeared in the literature [10, 21,22,23] so that the Tasaki-Crooks formalism equally applies to the thermodynamics of non-unital quantum maps. It turns out that, in general, for non-unital dynamics the entropy production has a more complicated structure than for the unital ones, both on average and at the stochastic level, where fluctuations are involved. Therefore, it is important to investigate whether simpler and physically informative results can still be proved for particular classes of non-unital maps (maybe with some restrictions on the initial state and/or on the measured observables). On top of this, since the formalism of quantum dynamical maps allows to consider both Markovian and non-Markovian dynamics (in the sense of [24]), one could also ask whether the degree of non-Markovianity plays a relevant role. In fact, despite the interest in non-Markovian effects related to quantum thermodynamics has increased in the last decade, and a few results have been established for average thermodynamic quantities, much less is known at the level of fluctuations. A non-exhaustive list of references about quantum thermodynamics in these contexts is [4, 14, 19, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39].

Motivated by the previous discussion, in this paper we study the stochastic entropy production in a class of non-unital quantum dynamics that describes, for instance, thermalization with a non-Markovian transient. In Sect. 2, we describe the Tasaki-Crooks formalism by giving the definition of stochastic entropy production. In Sect. 3, we present two main results. In particular, we show that, for the considered class of dynamics and for the set of observables commuting with the invariant state of the map, (i) the stochastic entropy production obeys a fluctuation relation and (ii) the average entropy production can always be written solely in terms of quantum relative entropies. We then comment on the difference between our results and the related work done in Ref. [40, 41]. In Sect. 4, we briefly introduce the concept of quantum non-Markovianity and then we discuss a thermalizing qubit dynamics with non-Markovian transient, computing explicitly the stochastic entropy production and its first two moments. We also compute the rate of variation of the average and of the variance of the stochastic entropy production. This allows us to find our third main result. Indeed, in Sect. 5, as in the unital setting, (iii) we find a parameter range such that, due to non-Markovianity, the average entropy production and its variance are simultaneously decreasing in the transient. This is the phenomenon we called irreversibility mitigation [37]. Finally, in Sect. 6, we present conclusions and perspectives for future investigations.

2 Stochastic Entropy Production

Let us consider a d-level open quantum system whose evolution up to time t is described by a CPTP map \(\Lambda _t\). We consider the latter having a unique positive-definite invariant state \(\pi =\sum _{i}\pi _i |\pi _i\rangle \!\langle \pi _i|>0\), with probabilities \(\pi _i\in [0,1]\) and \(\sum _{i}\pi _{i}=1\), such that the map is in general non-unital. We require the uniqueness of \(\pi \) because, in the following, we use a notion of time-reversed dynamics that is based on the invariant state.

In order to define the stochastic entropy production, which is the quantity of interest in this paper, we need to consider two distinct procedures, namely a forward and backward protocol, in accordance with the Tasaki-Crooks formalism [7,8,9,10]. In particular, we resort to the two-point measurement scheme (TPM) [42,43,44]; this choice stems also from our intention to compare the results we are going to present with the ones determined in [37, 40]. In the time interval \([0,\tau ]\), the TPM consists in applying two projective measurements, at the initial and at the final time instants, of the two observables \({\mathcal {O}}_{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}\) (Hermitian operators) [41, 45]. The spectral decomposition of the observables is \({\mathcal {O}}_{\textrm{in}} = \sum _m a_m^{\textrm{in}}\Pi _m^{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}=\sum _k a_k^{\textrm{fin}}\Pi _k^{\textrm{fin}}\), where each \(\lbrace \Pi \rbrace \) identifies the set of projectors associated to each set of eigenvalues/measurement outcomes \(\lbrace a \rbrace \). The forward process is defined by the following sequence of operations:

$$\begin{aligned} \rho _0 \underbrace{\longrightarrow }_{\Pi _m^{\textrm{in}}} \rho _{\textrm{in}} \underbrace{\longrightarrow }_{\Lambda _\tau } \rho _{\tau } \underbrace{\longrightarrow }_{\Pi _k^{\textrm{fin}}} \rho _{\textrm{fin}} \end{aligned}$$
(1)

where, after the first projective measurement, the state of the system is on average \(\rho _{\textrm{in}}=\sum _{m}p(a_{m}^{\textrm{in}})\Pi _{m}^{\textrm{in}}\) with \(p(a_m^{\textrm{in}})= \textrm{Tr}[\Pi _{m}^{\textrm{in}}\rho _0 \Pi _{m}^{\textrm{in}}]=\textrm{Tr}[\rho _0\Pi _{m}^{\textrm{in}}]\). Applying the second projective measurement to the state \(\rho _{\tau }\equiv \Lambda _{\tau }[\rho _{\textrm{in}}]\) after the open quantum dynamics, one gets \(\rho _{\tau }=\sum _{k}p(a_{k}^{\textrm{fin}})\Pi _{k}^{\textrm{fin}}\) with \(p(a_{k}^{\textrm{fin}})= \textrm{Tr}[\Pi _{k}^{\textrm{fin}}\Lambda _{\tau } (\rho _\textrm{in}) \Pi _{k}^{\textrm{fin}} ] = \textrm{Tr}[\Lambda _{\tau }(\rho _{\textrm{in}})\Pi _{k}^{\textrm{fin}}]\). Hence, the joint probability that the measurement outcome \(a_{m}^{\textrm{in}}\) is followed by the measurement outcome \(a_{k}^{\textrm{fin}}\) in the forward process is

$$\begin{aligned} p_{\textrm{F}}(a_k^{\textrm{fin}}, a_m^{\textrm{in}})= \textrm{Tr}[\Pi _{k}^{\textrm{fin}}\Lambda _{\tau } ( \Pi _{m}^{\textrm{in}}\rho _\textrm{0} \Pi _{m}^{\textrm{in}}) ] = \textrm{Tr}[\Pi _{k}^{\textrm{fin}}\Lambda _{\tau } ( \Pi _{m}^{\textrm{in}}) ]p(a_{m}^{\textrm{in}})\,. \end{aligned}$$
(2)

Conversely, the backward process consists in the following set of operations:

$$\begin{aligned} {\tilde{\rho }}_{\textrm{fin}} \underbrace{\longrightarrow }_{{\tilde{\Pi }}_k^{\textrm{fin}}} {\tilde{\rho }}_{\tau } \underbrace{\longrightarrow }_{{\tilde{\Lambda }}_{\tau }} {\tilde{\rho }}_{\textrm{in}} \underbrace{\longrightarrow }_{{\tilde{\Pi }}_m^{\textrm{in}}} {\tilde{\rho }}_{\textrm{0}}. \end{aligned}$$
(3)

More explicitly, following [40], the main ingredient of the backward process is the dual map \({\tilde{\Lambda }}_t\). Given the invariant state \(\pi \) and the Kraus representation of \(\Lambda _t\), i.e., \(\Lambda _t(\cdot )=\sum _{\ell }E_{\ell }(t)(\cdot )E_{\ell }^{\dagger }(t)\) where \(\{E_\ell \}_{\ell =1}^{d^2}\) is the set of Kraus operators and d is the dimension of the system’s Hilbert space, the dual map is defined as \({\tilde{\Lambda }}_t(\cdot ) = \sum _{\ell }{\tilde{E}}_{\ell }(t)(\cdot ){\tilde{E}}_{\ell }^{\dagger }(t)\), where \({\tilde{E}}_{\ell }(t) \equiv \Theta \pi ^{\frac{1}{2}}E_{\ell }^{\dagger }(t)\pi ^{-\frac{1}{2}}\Theta ^{\dagger }\). Here \(\Theta \) is the antiunitary time-reversal operator obeying the relations \(\Theta ^\dag \Theta =\Theta \Theta ^\dag = {\mathbb {I}}\). By construction, \({\tilde{\Lambda }}_t\) is CPTP and its invariant state is \({\tilde{\pi }}=\Theta \pi \Theta ^{\dagger }\), namely the time-reversed version of \(\pi \). Additionally, in order to fully specify the operations in Eq. (3), we also set the first [second] measurement of the backward process to be the time-reversal of the second [first] measurement of the forward process, i.e., \({\tilde{\Pi }}_{k}^{\textrm{fin}} \equiv \Theta \Pi _{k}^{\textrm{fin}} \Theta ^\dag \) and \({\tilde{\Pi }}_{m}^{\textrm{in}} \equiv \Theta \Pi _{m}^{\textrm{in}} \Theta ^\dag \). With this assumption, the joint probability that in the backward process the measurement outcome \(a_{k}^{\textrm{fin}}\) is followed by the measurement outcome \(a_{m}^{\textrm{in}}\) is

$$\begin{aligned} p_{\textrm{B}}(a_m^{\textrm{in}}, a_k^{\textrm{fin}})= \textrm{Tr}[{\tilde{\Pi }}_{m}^{\textrm{in}} {\tilde{\Lambda }}_t( {\tilde{\Pi }}_{k}^{\textrm{fin}}{\tilde{\rho }}_\textrm{fin} {\tilde{\Pi }}_{k}^{\textrm{fin}}) ] = \textrm{Tr}[{\tilde{\Pi }}_{m}^{\textrm{in}}{\tilde{\Lambda }}_t( {\tilde{\Pi }}_{k}^{\textrm{fin}}) ]p(a_{k}^{\textrm{fin}}). \end{aligned}$$
(4)

The stochastic quantum entropy production is then defined as [37, 41, 45]

$$\begin{aligned} \Delta \sigma (a_k^{\textrm{fin}}, a_m^{\textrm{in}}) \equiv \ln {\left[ \frac{p_{\textrm{F}}(a_k^{\textrm{fin}}, a_m^{\textrm{in}})}{p_{\textrm{B}}( a_m^{\textrm{in}},a_k^{\textrm{fin}})} \right] } = \ln [p(a_m^{\textrm{in}})]-\ln [p(a_k^{\textrm{fin}})]+\ln {\left[ \frac{p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})}{p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})} \right] }. \end{aligned}$$
(5)

If the quantum map \(\Lambda _t\) is unital, then \(p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})=p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})\), such that \(\ln {\left[ p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})/p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})\right] }=0\) and thus \(\Delta \sigma (a_k^{\textrm{fin}}, a_m^{\textrm{in}})=\ln [p(a_m^{\textrm{in}})]-\ln [p(a_k^{\textrm{fin}})]\). In the non-unital case, instead, the forward and backward conditional probabilities are not equal to each other, and in general their expression depends on the details of the quantum map \(\Lambda _t\).

3 Fluctuation Relation

Even in the non-unital case, one would like to determine if under some assumptions the ratio of conditional probabilities \(p_{\textrm{F}}(a_k^{\textrm{fin}}|a_m^{\textrm{in}})/p_{\textrm{B}}(a_m^{\textrm{in}}|a_k^{\textrm{fin}})\) can be expressed in terms of quantities that do not depend on time. As we will show below, this is indeed possible in case the proposal of Ref. [10] is used to define the time-reversal protocol, and such a key aspect allows to derive a fluctuation relation for the stochastic entropy production in non-unital dynamics, like the ones describing thermalization. It is worth noting that other choices of the backward dynamics, as in Refs. [22, 23], do not necessarily guarantee that the ratio of conditional probabilities \(p_{\textrm{F}}(a_k^{\textrm{fin}}|a_m^{\textrm{in}})/p_{\textrm{B}}(a_m^{\textrm{in}}|a_k^{\textrm{fin}})\), although defined starting from the quantum map \(\Lambda _t\), does not depend on time.

To get the fluctuation relation, we make use of the concept of nonequilibrium potential – originally introduced in [40] – that is defined in terms of the invariant state \(\pi \) of the quantum map \(\Lambda _t\). Given the spectral decomposition \(\pi = \sum _i \pi _i |\pi _i\rangle \!\langle \pi _i|\), we assign to each projector \(|\pi _i\rangle \!\langle \pi _i|\) the nonequilibrium potential term

$$\begin{aligned} \Phi _\pi (i) \equiv -\ln [\pi _i]. \end{aligned}$$
(6)

Then, we focus on a class of quantum maps in Kraus representation where each Kraus operator \(E_\ell \) is a linear combination of “jump” operators \(|\pi _j\rangle \!\langle \pi _i|\) associated with the same change \(\Delta \Phi _{\pi }(\ell )\) of the nonequilibrium potential. As we are going to show below, this assumption is the first of a pair of conditions that are required to express \(\ln {\left[ p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})/p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})\right] }\) as a function of the \(\Phi _{\pi }(i)\)’s, provided the TPM scheme is applied. Following the previous discussion, the single Kraus operator \(E_{\ell }(t)\) can be written as

$$\begin{aligned} E_{\ell }(t) = \sum _{ij}m_{ji}^{(\ell )}(t) |\pi _j\rangle \!\langle \pi _i|, \end{aligned}$$
(7)

with the constraint that the coefficients

$$\begin{aligned} m_{ji}^{(\ell )}(t)=0 \,\,\,\forall t \quad \text {if} \quad \Phi _{\pi }(j)-\Phi _{\pi }(i) \ne \Delta \Phi _{\pi }(\ell ) . \end{aligned}$$
(8)

Hence, all the transitions (ij) that are contained in the same Kraus operator \(E_{\ell }(t)\) are characterized by the same potential \(\Delta \Phi _{\pi }(\ell )\); of course, there may be different Kraus operators that are associated to the same value of \(\Delta \Phi _{\pi }\). With these assumption, the following relations hold true at any time t:

$$\begin{aligned}{} & {} \pi ^{-1/2} E_{\ell }(t) = e^{\Delta \Phi _{\pi }(\ell )/2}E_{\ell }(t) \pi ^{-1/2} \end{aligned}$$
(9)
$$\begin{aligned}{} & {} E_{\ell }^\dag (t) \pi ^{-1/2}= e^{\Delta \Phi _{\pi }(\ell )/2} \pi ^{-1/2} E_{\ell }^\dag (t) \end{aligned}$$
(10)

since

$$\begin{aligned}{} & {} [E_{\ell }(t),\pi ^{-1/2}] = \sum _{ij}(\pi _i^{-1/2} - \pi _j^{-1/2}) \, m_{ji}^{(\ell )}(t)|\pi _j\rangle \!\langle \pi _i|\nonumber \\{} & {} = \sum _{ij} \left( 1-\left( \frac{\pi _j}{\pi _i}\right) ^{-\frac{1}{2}}\right) \pi _i^{-1/2} m_{ji}^{(\ell )}(t)|\pi _j\rangle \!\langle \pi _i| \nonumber \\{} & {} = \left( 1-e^{\Delta \Phi _{\pi }(\ell )/2}\right) E_{\ell }(t)\pi ^{-1/2} , \end{aligned}$$
(11)

where the last equality in Eq. (11) comes from using Eq. (8). One can use the relations (9) and (10) to compare the forward conditional probability

$$\begin{aligned} p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}}) = \sum _{\ell } \textrm{Tr}\left[ \Pi _k^{\textrm{fin}} E_{\ell }(t) \Pi _m^{\textrm{in}} E_{\ell }^{\dagger }(t)\right] \end{aligned}$$
(12)

with the backward one

$$\begin{aligned} p_{\textrm{B}}(a_m^{\textrm{in}}|a_k^{\textrm{fin}})= & {} \sum _{\ell } \textrm{Tr}\left[ {\tilde{\Pi }}_{m}^{\textrm{in}} {\tilde{E}}_{\ell }(t){\tilde{\Pi }}_{k}^{\textrm{fin}}{\tilde{E}}_{\ell }^{\dagger }(t)\right] \nonumber \\{} & {} = \sum _{\ell } \textrm{Tr}\left[ \Theta \Pi _{m}^{\textrm{in}} \Theta ^\dag \Theta \pi ^{1/2} {E}_{\ell }^{\dagger }(t) \pi ^{-1/2} \Theta ^\dag \Theta {\Pi }_{k}^{\textrm{fin}} \Theta ^\dag \Theta \pi ^{-1/2} {E}_{\ell }(t) \pi ^{1/2} \Theta ^\dag \right] \nonumber \\= & {} \sum _{\ell } \textrm{Tr}\left[ \Theta \Pi _m^{\textrm{in}} e^{\Delta \Phi _{\pi }(\ell )/2} E_{\ell }^{\dagger }(t) \Pi _k^{\textrm{fin}} e^{\Delta \Phi _{\pi }(\ell )/2} E_{\ell }(t) \Theta ^\dag \right] \nonumber \\{} & {} = \sum _{\ell } e^{\Delta \Phi _{\pi }(\ell )}\textrm{Tr}\left[ E_{\ell }^{\dagger }(t) \Pi _k^{\textrm{fin}} E_{\ell }(t) \Pi _m^{\textrm{in}} \right] \nonumber \\= & {} \sum _{\ell } e^{\Delta \Phi _{\pi }(\ell )}\textrm{Tr}\left[ \Pi _k^{\textrm{fin}} E_{\ell }(t) \Pi _m^{\textrm{in}} E_{\ell }^{\dagger }(t) \right] . \end{aligned}$$
(13)

Note that in the second step of the second line we used the property \(\textrm{Tr}\left[ \Theta A \Theta ^\dag \right] = \textrm{Tr}\left[ A^\dag \right] \) valid for antiunitary operators (the usual ciclicity of the trace does not hold). This property can be proved from the characterization of antiunitary operators (\(\Theta \) antilinear such that \(\left\langle \Theta \psi , \Theta \varphi \right\rangle = \overline{\langle \psi , \varphi \rangle } \)) and their adjoint (\(\Theta ^\dag \) antilinear such that \(\left\langle \Theta \psi , \varphi \right\rangle = \overline{\langle \psi , \Theta ^\dag \varphi \rangle }\)).

When taking the ratio \(p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})/p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})\), one can see from Eqs. (12) and (13) that the summation over \(\ell \) (different Kraus operators) does not allow simplifications in general. A special case is constituted by unital maps, where all \(\Delta \Phi \)s are vanishing, so that the ratio of conditional probabilities equals one. Dealing with non-unital maps, one needs a further assumption to express \(\ln {\left[ p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})/p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})\right] }\) only in terms of \(\Delta \Phi _{\pi }\). In particular, the second assumption we make is that both observables \({\mathcal {O}}_{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}\) commute with the invariant state \(\pi \) of the forward process. In other terms, one needs that \([{\mathcal {O}}_{\textrm{in}},\pi ]=[{\mathcal {O}}_{\textrm{fin}},\pi ]=0\), such that the measurements applied at the initial and final times of the quantum process are described by the following projectors

$$\begin{aligned} \Pi _m^{\textrm{in}} = |\pi _m\rangle \!\langle \pi _m|, \quad \text {and} \quad \Pi _{k}^{\textrm{fin}} = |\pi _k\rangle \!\langle \pi _k| \,. \end{aligned}$$
(14)

In this way, a specific transition between \(|\pi _m\rangle \) and \(|\pi _k\rangle \) is selected by the measurement, and this transition is in turn associated to a single value of the nonequilibrium potential, which can be then extracted from the summation. More explicitly, one can write

$$\begin{aligned} \ln {\left[ \frac{p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})}{p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})} \right] } = \ln {\left[ \frac{\displaystyle {\widetilde{\sum _{\ell }}\left| m_{km}^{(\ell )}(t)\right| ^2}}{e^{\Delta \Phi _{\pi }(k,m)} \displaystyle {\widetilde{\sum _{\ell }}\left| m_{km}^{(\ell )}(t)\right| ^2}} \right] } = - \Delta \Phi _{\pi }(k,m), \end{aligned}$$
(15)

where one has defined \(\Delta \Phi (k,m) \equiv \Phi _{\pi }(k) - \Phi _{\pi }(m)\) and the summation with the tilde runs only over the Kraus operators (labelled by \(\ell \)) that include this transition. Therefore, under the validity of the aforementioned assumptions (i.e., (i) \(E_{\ell }(t) = \sum _{ij}m_{ji}^{(\ell )}(t)|\pi _j\rangle \!\langle \pi _i|\) with \(m_{ji}^{(\ell )}(t)=0\,\,\,\forall t\) if \(\Phi _{\pi }(j)-\Phi _{\pi }(i) \ne \Delta \Phi _{\pi }(\ell )\), and (ii) \([{\mathcal {O}}_{\textrm{in}},\pi ]=[{\mathcal {O}}_{\textrm{fin}},\pi ]=0\)), the stochastic quantum entropy production \(\Delta \sigma (a_k^{\textrm{fin}}, a_m^{\textrm{in}})\) does not depend on the details of the evolution, but it just depends on measurement probabilities evaluated at the initial and final times of the process and on the eigenvalues \(\pi _i\), with \(i\in \{1,\ldots ,d\}\), of the invariant state \(\pi \). In particular, one has

$$\begin{aligned} \Delta \sigma (a_k^{\textrm{fin}}, a_m^{\textrm{in}}) = - \ln \left[ \frac{p(a_k^{\textrm{fin}})}{p(a_m^{\textrm{in}})}\right] - \Delta \Phi _{\pi }(k,m) = \Delta s(k,m) - \Delta \Phi _{\pi }(k,m), \end{aligned}$$
(16)

where \(\Delta s(k,m) \equiv s(a_k^{\textrm{fin}}) - s(a_m^{\textrm{in}})\), with \(s(a_m^{\textrm{in}}) \equiv - \ln p(a_m^{\textrm{in}})\) and \(s(a_k^{\textrm{fin}}) \equiv - \ln p(a_k^{\textrm{fin}})\). Thus, \(\Delta s(k,m)\) denotes the difference of self-information of measuring the initial and final quantum observables, \({\mathcal {O}}_{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}\) respectively, by recording the corresponding outcomes \(a_k^{\textrm{fin}}\) and \(a_m^{\textrm{in}}\). Let us observe that \(\Delta s\) and \(\Delta \Phi _{\pi }\) have opposite sign; this indicates that, unlike the unital case, in non-unital quantum maps the total amount of entropy production in a single trajectory can be decreased during the process, e.g., by a mechanism with feedback aka a Maxwell demon with efficacy greater than unity.

It is worth stressing the role played by the assumptions (i) and (ii) in achieving Eq. (15). Assumption (i) is responsible for having a single value \(\Delta \Phi _{\pi }(\ell )\) for the change of nonequilibrium potential in correspondence of the \(\ell ^{\textrm{th}}\) Kraus operator \(E_{\ell }\); it leads to the validity of the commutation relations (9)–(11). Instead, assumption (ii) allows to express the ratio \(\ln {\left[ \frac{p_{\textrm{F}}(a_k^{\textrm{fin}}| a_m^{\textrm{in}})}{p_{\textrm{B}}( a_m^{\textrm{in}}|a_k^{\textrm{fin}})} \right] }\) in terms of the value of \(\Delta \Phi _{\pi }\) that corresponds to the transition (km), with k and m labelling the measurement outcomes of \({\mathcal {O}}_{\textrm{fin}}\) and \({\mathcal {O}}_{\textrm{in}}\) respectively.

Equation (16) straightforwardly implies the first main result of this paper, which is the fluctuation relation

$$\begin{aligned} \frac{ p_{\textrm{F}}(a_k^{\textrm{fin}}, a_m^{\textrm{in}}) }{ p_{\textrm{B}}(a_m^{\textrm{in}},a_k^{\textrm{fin}}) } = e^{\Delta \sigma (a_k^{\textrm{fin}},a_m^{\textrm{in}})} = e^{\Delta s(k,m)-\Delta \Phi _{\pi }(k,m)} \end{aligned}$$
(17)

describing a symmetry for the ratio of the forward and backward probability distributions of measuring the \((k,m)^{\textrm{th}}\) pair of outcomes from \({\mathcal {O}}_{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}\). Specifically, the right-hand-side of Eq. (17) depends on the measured outcomes at the initial and final times of the process, and on the invariant state \(\pi \) of the non-unital quantum map. Other details of the map are completely absent in Eqs. (16) and (17), albeit we have previously determined that assumptions (i)–(ii) have to be satisfied in order to get such equations. Moreover, another consequence of Eq. (17) is that the identity \(p_{\textrm{F}}(a_k^{\textrm{fin}},a_m^{\textrm{in}})=p_{\textrm{B}}(a_m^{\textrm{in}},a_k^{\textrm{fin}})\), which entails vanishing entropy production at the single trajectory level, meaning (strict) reversibility, is valid if and only if

$$\begin{aligned} \Delta s(k,m)=\Delta \Phi _{\pi }(k,m)\,\,\,\,\forall \,(k,m). \end{aligned}$$
(18)

This is a very strong constraint which holds true when the initial state is the invariant state of the dynamics, so that there is no real evolution (the two measurements have no effect either, because we are assuming that the measured observables commute with the invariant state).

Before concluding this discussion, we comment on a result in Ref. [41] that looks analogous to Eq. (16), and we explain why it is in fact a different result. In Ref. [41], the authors assume that they can access and measure both the system (with two observables identified by the projectors \(\lbrace {\mathcal {P}}_n \rbrace , \, \lbrace {\mathcal {P}}_m^{*} \rbrace \), in the notation of the cited reference) and the reservoir (with two observables having projectors \( \lbrace {\mathcal {Q}}_{\nu }\rbrace , \, \lbrace {\mathcal {Q}}_{\mu }^{*} \rbrace \)). Each trajectory in their framework is thus specified by both the initial and final outcomes for the system and the initial and final outcomes for the reservoir. There, through the measurements performed on the reservoir, a unique Kraus operator, say \(M_{\mu \nu }\), is selected for each trajectory of the system conditioned evolution. The latter is indeed described by a quantum operation reading \({\mathcal {E}}_{\mu \nu }(\cdot ) = M_{\mu \nu } (\cdot ) M_{\mu \nu }^{\dagger }\). As a consequence, when computing the forward and backward joint probabilities, a single Kraus operator is involved, and thus a single value of the nonequilibrium potential is selected. Hence, without considering any further assumption, one can derive an expression for the entropy production that formally reads as our Eq. (16), although each single trajectory carries also the information on the reservoir outcomes. At variance with the setting of Ref. [41], we consider the case where only the system can be accessed, and, consistently with such a description, each trajectory is determined by the initial and final outcomes for the system only. We are thus grouping together different reservoir trajectories of Ref. [41], so that many Kraus operators are involved in the computation of the joint probabilities Eqs. (2) and (4). Therefore, in general it is not possible to extract a single value of the nonequilibrium potential for each trajectory, this preventing one to derive Eq. (16). The novelty of our result is that, even in the case where one cannot associate a single Kraus operator to a trajectory (e.g., by only knowing the reduced dynamics instead that the conditioned evolution), the fluctuation relation can be restored by choosing a specific set of observables. It is indeed the measurement that in our case selects a single transition for any trajectory and allows the derivation of our result.

3.1 Average Entropy Production in Terms of Quantum Relative Entropies

Now, we are going to provide the expression of the average entropy production solely in terms of quantum relative entropies. This is a consequence of the simple expression we found for the stochastic quantum entropy production \(\Delta \sigma \) (Eq. 16).

To this end, let us consider the probability distribution of \(\Delta \sigma \),

$$\begin{aligned} \textrm{Prob}(\Delta \sigma ) = \sum _{k, m}\delta [\Delta \sigma - \Delta \sigma (a_k^{\textrm{fin}},a_{m}^{\textrm{in}}) ]p_F(a_k^\mathrm{{fin}}, a_m^\mathrm{{in}}), \end{aligned}$$
(19)

where \(\delta [\cdot ]\) denotes the Dirac delta. Hence, the average of \(\Delta \sigma \) reads as \(\left\langle \Delta \sigma \right\rangle = \sum _{m,k}\Delta \sigma (a_{k}^{\textrm{fin}},a_{m}^{\textrm{in}})p_{\textrm{F}}(a_k^{\textrm{fin}},a_m^{\textrm{in}})\), whereby – after some calculations – it can be also written as

$$\begin{aligned} \left\langle \Delta \sigma \right\rangle = S(\rho _{\tau }||\rho _{\textrm{fin}}) + S(\rho _{\textrm{in}}||\pi ) - S(\rho _{\tau }||\pi ) \ge 0, \end{aligned}$$
(20)

where \(S(\rho ||\rho ') \equiv \textrm{Tr}[\rho \ln (\rho ) - \rho \ln (\rho ')]\) denotes the quantum relative entropy, and the density operators \(\rho _{\textrm{in}}\), \(\rho _{\textrm{fin}}\) and \(\rho _{\tau }\) are defined above in Eq. (1). This is the second main result of the present paper. A similar expression, i.e., \(\left\langle \Delta \sigma \right\rangle = S(\rho _{\textrm{in}}||\pi ) - S(\rho _{\tau }||\pi ) \), was found in Ref. [41], thus without the explicit contribution of the second measurement that is the first term in Eq. (20). The full derivation of Eq. (20) is in Appendix A. Note that, as stated in Eq. (20), \(\left\langle \Delta \sigma \right\rangle \) is always non-negative, because the relative entropy is always non-negative and it is decreasing under the action of CPTP maps on both arguments (therefore the difference of the second and third term is non-negative).

It is worth observing that, if the invariant state of the non-unital quantum map \(\Lambda _t\) is the thermal state

$$\begin{aligned} \rho _{\beta } \equiv \frac{e^{-\beta H}}{\textrm{Tr}[e^{-\beta H}]} \end{aligned}$$
(21)

with H the system Hamiltonian, then the difference of the nonequilibrium potential is \(\Delta \Phi _{\pi }(k,m) = \beta ({\mathcal {E}}_k^{(\pi )}-{\mathcal {E}}_m^{(\pi )})\), where the \({\mathcal {E}}_i\)’s (\(i\in \{1,\ldots ,d\}\)) denote the possible energy values of the quantum system. i.e. \(H|\pi _i\rangle ={\mathcal {E}}_{i}^{(\pi )}|\pi _i\rangle \). Also, for a thermal invariant state (this is the case we are going to study in Sect. 4), Eq. (20) becomes

$$\begin{aligned} \left\langle \Delta \sigma \right\rangle= & {} S(\rho _{\tau }||\rho _{\textrm{fin}})+ S(\rho _{\textrm{in}}||\rho _{\beta })-S( \rho _{\tau } ||\rho _{\beta }) \nonumber \\= & {} S(\rho _{\tau }||\rho _{\textrm{fin}})+ S(\rho _\tau ) - S(\rho _{\textrm{in}}) - \beta \textrm{Tr}[H (\rho _\tau - \rho _{\textrm{in}})], \end{aligned}$$
(22)

where \(S(\rho ) \equiv -\textrm{Tr}[\rho \ln (\rho )]\) is the von Neumann entropy. Therefore, one recovers a clear thermodynamic interpretation, with the (average) entropy production corresponding to the (average) entropy variation in the system plus the (average) entropy flux in the thermal bath (that is minus the inverse temperature times the (average) heat exchanged, i.e. \(- \beta \Delta Q =: \textrm{Tr}[H (\rho _\tau - \rho _{\textrm{in}})]\)). In this setting, all the variation of energy is usually attributed to a heat exchange because the Hamiltonian of the system is taken time-independent. It would be interesting to generalize the theory so as to include the case of a non-unital evolution with time-dependent Hamiltonian. In order to do this, one would need to modify the definition of the backward protocol including a dual map that depends on a instantaneous invariant state, i.e. \(\pi _t\) such that \(\Lambda _t(\pi _t)=\pi _t\). This is matter for future investigation.

4 Case-Study: Qubit Thermalization with non-Markovian Transient

In this Section we consider an example to illustrate our previous findings, that is a non-Markovian thermalizing dynamics for a two-level system (qubit).

The study of non-Markovian quantum dynamics became an active area of research in the last decade [46,47,48,49]. In the following, we adopt the nomenclature and definitions proposed in [24]. In particular, we consider the intermediate propagators \(V_{t,s}\), implicitly defined by \(\Lambda _t = V_{t,s} \Lambda _s\), and distinguish different degrees of non-Markovianity based on its properties. If \(V_{t,s}\) is completely positive (CP) for any pair \(t\ge s\ge 0\) the dynamics is called CP-divisible or Markovian. If instead the propagators are just positive (P) the dynamics is called P-divisible and a dynamics which is P-divisible but not CP-divisible is classified as weakly non-Markovian. We will be more interested in dynamics such that the propagator \(V_{t,s}\) is not even positive for some pair ts. In this case the dynamics is not P-divisible and it is called essentially non-Markovian.

The divisibility properties of the dynamics (and therefore its degree of non-Markovianity) are better studied by looking at the time-dependent generator \({\mathcal {L}}_t= (\partial _t \Lambda _t ) \Lambda _t^{-1}\), which exists provided the dynamical map \(\Lambda _t\) is invertible and its time-derivative is well-defined.

In the following, we consider the prototypical example of a thermalizing dynamics for a qubit, which is described by the time-dependent generator \({\mathcal {L}}_t\) explicitly written as

$$\begin{aligned}{} & {} {\mathcal {L}}_t (\cdot ) = -i \left[ \frac{\omega }{2} {\hat{\sigma }}^z,\, \cdot \, \right] +\gamma _\beta (t) \textrm{e}^{\beta \omega } \left( {\hat{\sigma }}^- (\cdot ) {\hat{\sigma }}^+ - \frac{1}{2}\Big \{ {\hat{\sigma }}^+ {\hat{\sigma }}^-, \, \cdot \, \Big \} \right) \nonumber \\{} & {} \qquad \qquad + \gamma _\beta (t) \left( {\hat{\sigma }}^+ (\cdot ) {\hat{\sigma }}^- - \frac{1}{2}\Big \{ {\hat{\sigma }}^- {\hat{\sigma }}^+, \, \cdot \, \Big \} \right) . \end{aligned}$$
(23)

Here \({\hat{\sigma }}^h\) with \(h \in \{ x,y,z \}\) are the usual Pauli matrices, \({\hat{\sigma }}^\pm = ({\hat{\sigma }}^x \pm {\hat{\sigma }}^y)/2\), \(\beta \) is the inverse temperature, \(\omega \) is the qubit energy gap and \(\gamma _\beta (t)\) is a time-dependent decay rate. Using the Bloch vector representation of the qubit density matrix, i.e. \(\rho (t)=\frac{1}{2}({\mathbb {I}}+\vec {r}(t) \cdot \vec {{\hat{\sigma }}})\), with \(\vec {{\hat{\sigma }}}\equiv \left\{ {\hat{\sigma }}^x, {\hat{\sigma }}^y,{\hat{\sigma }}^z\right\} \) and \(\vec {r}(t)\equiv (x(t),y(t),z(t))\), one can rewrite the differential equation \(\partial _t \rho (t)= {\mathcal {L}}_t \rho (t)\) as a system of differential equations for the Bloch vector components

$$\begin{aligned}{} & {} \partial _t \big (x(t) + i y(t)\big )= \Big (+ i \omega - \frac{(1+\textrm{e}^{\beta \omega })}{2}\gamma _\beta (t)\Big ) \big ( x(t) + i y(t)\big ), \end{aligned}$$
(24)
$$\begin{aligned}{} & {} \partial _t \big (x(t) - i y(t)\big )= \Big (-i \omega - \frac{(1+\textrm{e}^{\beta \omega })}{2}\gamma _\beta (t)\Big ) \big ( x(t) - i y(t)\big ), \end{aligned}$$
(25)
$$\begin{aligned}{} & {} \partial _t z(t)=- \gamma _\beta (t) (1+\textrm{e}^{\beta \omega }) z(t) + \gamma _\beta (t) (1-\textrm{e}^{\beta \omega }). \end{aligned}$$
(26)

The equations above, complemented with the initial conditions \(\vec {r}(0)\equiv (x_0,y_0,z_0)\), can be readily solved, so that one can write the Bloch vector components at arbitrary time \(t\ge 0\) as follows,

$$\begin{aligned}{} & {} x(t) + i y(t)= e^{-\Gamma _\beta (t) + i \omega t} \big ( x_0 + i y_0 \big ), \end{aligned}$$
(27)
$$\begin{aligned}{} & {} x(t) - i y(t)= e^{-\Gamma _\beta (t) - i \omega t} \big ( x_0 - i y_0 \big ), \end{aligned}$$
(28)
$$\begin{aligned}{} & {} z(t)=e^{-2\Gamma _\beta (t)}z_0 - (e^{-2\Gamma _\beta (t)}-1)z_{\infty } = e^{-2\Gamma _\beta (t)}(z_0-z_{\infty })+z_{\infty }, \end{aligned}$$
(29)

where we conveniently defined the integrated decay rate \(\Gamma _\beta (t) \equiv \frac{1}{2}(1+ \textrm{e}^{\beta \omega })\int _{0}^{t} \gamma _\beta (\tau ) d\tau \) and the parameter \(z_{\infty } \equiv - \tanh (\frac{\beta \omega }{2})\). From Eqs. (27)–(29) one can verify that the unique invariant state for this dynamics is given by the Bloch vector \( \vec {r}_\beta \equiv (0,0,z_\infty ) \), representing the Gibbs state \(\rho _\beta \) (see Eq. (21)) with Hamiltonian \(H= \omega /2\, {\hat{\sigma }}^z\). We assume in the following that the time-dependent rate converges to a positive constant for long times, \(\gamma _\beta (t) \overset{t \rightarrow \infty }{\longrightarrow } \gamma _\beta >0\), such that the Gibbs state \(\rho _\beta \) is also the unique asymptotic state for any initial density matrix. In this sense, the dynamics really describes the thermalization of a qubit to a thermal state, and the parameter \(z_\infty \) represents the asymptotic value of z(t), as the notation suggests. Note that with the special choice \(\gamma _\beta (t)= \lambda (t) n_\beta = \lambda (t) \frac{1}{\textrm{e}^{\beta \omega }-1}\) one recovers a time-dependent generalization of the usual quantum optical master equation. However, we prefer to leave \(\gamma _\beta (t)\) unspecified, since the following discussion does not depend qualitatively on this choice. In particular, at the end we may want to compare our findings with the results obtained in Ref. [37] for the unital case (infinite temperature, \(\beta =0\)), but the quantum optical master equation is not well-defined in this limit, so that another choice of \(\gamma _\beta (t)\) will be used.

4.1 Kraus Representation of the Quantum Map

In order to show that the dynamics described by Eq. (23) does satisfy assumption (i), one has to find a Kraus representation corresponding to that evolution. This can be done considering the general expression \(\rho (t)\equiv \Lambda _t[\rho (0)]=\sum _{j,k=0}^{3}\lambda _{jk}(t){\hat{\sigma }}_j \rho (0){\hat{\sigma }}_k\), where \({\hat{\sigma }}_{\ell }\in \vec {{\hat{\sigma }}}\) for \(\ell \in \{0,\ldots ,3\}\), and \(\lambda _{ij}(t)\) are 16 complex parameters, substituting the Bloch vector decomposition of \(\rho (0)\) and \(\rho (t)\), and using the algebraic properties of Pauli matrices to rewrite triples of sigmas into a single sigma. This allows to find a relation between the \(\lambda _{ij}(t)\) and the Bloch vector components x(t), y(t), z(t). The functions of time x(t), y(t) and z(t) are closely related to the parameters \(\lambda _{ij}(t)\) and they can be written as a function of them, as shown in Appendix B. As provided in Appendix C, the Kraus representation of the quantum map \(\Lambda _t\) governing the thermalization of the qubit (with non-Markovian transient) can be achieved by expressing coefficients \(\lambda _{ij}(t)\) as a function of the model parameters, i.e., \(\Gamma _\beta (t)\), \(\omega \) and \(\beta \). In this way, one can get the Kraus operators \(E_{\ell }\) describing the quantum map in diagonal form \(\Lambda _t=\sum _{\ell =1}^{4}E_{\ell }(t)(\cdot )E_{\ell }^{\dagger }(t)\). Specifically, we obtain (see Appendix C for the complete derivation)

$$\begin{aligned} E_{1}= & {} \sqrt{\frac{1}{2}(1-e^{-2\Gamma _\beta (t)})(1+z_{\infty })} {\hat{\sigma }}^{+} \end{aligned}$$
(30)
$$\begin{aligned} E_{2}= & {} \sqrt{\frac{1}{2}(1-e^{-2\Gamma _\beta (t)})(1-z_{\infty })} {\hat{\sigma }}^{-} \end{aligned}$$
(31)
$$\begin{aligned} E_{3}= & {} \sqrt{D_1} \left( u_{1}^{(1)}|0\rangle \!\langle 0|+u_{1}^{(2)}|1\rangle \!\langle 1|\right) \end{aligned}$$
(32)
$$\begin{aligned} E_{4}= & {} \sqrt{D_2} \left( u_{2}^{(1)}|0\rangle \!\langle 0|+u_{2}^{(2)}|1\rangle \!\langle 1|\right) , \end{aligned}$$
(33)

where \({\hat{\sigma }}^{+} \equiv |0\rangle \!\langle 1|\), \({\hat{\sigma }}^{-}\equiv ({\hat{\sigma }}^{+})^{\dagger }=|1\rangle \!\langle 0|\) and

$$\begin{aligned} D_{1,2}=\frac{1}{2}\left( 1+e^{-2\Gamma _\beta (t)}\right) \pm \sqrt{z_{\infty }^2\left( \frac{1-e^{-2\Gamma _\beta (t)}}{2}\right) ^2+e^{-2\Gamma _\beta (t)}}. \end{aligned}$$

Moreover, \(u_{i}^{(j)}\) denotes the \(j^{\textrm{th}}\) element of the vector \(\vec {u}_{i}\), with \(i,j=1,2\), where \(\vec {u}_{1}\equiv \frac{1}{\sqrt{2b}}\left( -e^{i\omega t}\sqrt{a+b}, \sqrt{b - a}\right) ^{T}\) and \(\vec {u}_{2}\equiv \frac{1}{\sqrt{2b}} \left( e^{i\omega t}\sqrt{b-a}, \sqrt{a + b}\right) ^{T}\), with \(a \equiv z_{\infty }(1-e^{-2\Gamma _\beta (t)})/2\) and \(b \equiv \sqrt{z_{\infty }^{2}(1-e^{-2\Gamma _\beta (t)})^2+4e^{-2\Gamma _\beta (t)}}/2\).

4.2 Stochastic Entropy Production

In this subsection we evaluate the expressions of the stochastic entropy production and the corresponding statistics for a qubit interacting with a thermal bath in accordance with Eqs. (27)–(29) entering in \(\rho (t)=({\mathbb {I}}+\vec {r}(t) \cdot \vec {{\hat{\sigma }}})/2\). The invariant state of the corresponding map is \(\pi =e^{-\beta H}/ \textrm{Tr}[e^{-\beta H}]\) with \(H=\omega {\hat{\sigma }}^{z}/2\).

Our starting point is the derivation of the stochastic quantum entropy production as defined by Eqs. (5) and (15). The set of projectors \(\left\{ \Pi _{m}^{\textrm{in}} \right\} \) and \(\left\{ \Pi _{k}^{\textrm{fin}} \right\} \), associated to the observables \({\mathcal {O}}_{\textrm{in}}\) and \({\mathcal {O}}_{\textrm{fin}}\) respectively, reads as \(\Pi ^{\textrm{in}}_{0}=\Pi ^{\textrm{fin}}_{0}= |0\rangle \!\langle 0|\), with outcomes \(a_0^{\textrm{in}}, a_0^{\textrm{fin}}\), and \(\Pi ^{\textrm{in}}_{1}=\Pi ^{\textrm{fin}}_{1}=|1\rangle \!\langle 1|\), with outcomes \(a_1^{\textrm{in}}, a_1^{\textrm{fin}}\). Thus, the changes of the nonequilibrium potential, \(\Delta \Phi _{\pi }(k,m) = -\ln {\pi _k}+\ln {\pi _m}\), are equal to

$$\begin{aligned}{} & {} \Delta \Phi _{\pi }(0,0)=\Delta \Phi _{\pi }(1,1)=0 \end{aligned}$$
(34)
$$\begin{aligned}{} & {} \Delta \Phi _{\pi }(0,1)=-\Delta \Phi _{\pi }(1,0)=\beta \omega , \end{aligned}$$
(35)

where we have substituted the expressions of \(\pi _0 = e^{-\beta \omega /2}/[2 \cosh {(\beta \omega /2)}]\) and \(\pi _1 = e^{\beta \omega / 2}/[2 \cosh {(\beta \omega /2)}]\).

Since for the chosen CPTP maps the equations of motion of \(x(t)\pm i y(t)\) decouple from the one of z(t), when fixing \(x_{0}=y_{0}=0\) the dynamical evolution (after the \(1^{\textrm{st}}\) measurement of the TPM scheme) remains diagonal with respect to the \({\hat{\sigma }}^{z}\) basis. Hence, the state \(\rho _{\textrm{in}}\) is evolved at time \(\tau \) as \(\rho _{\tau }=\Lambda _{\tau }(\Pi _m^{\textrm{in}})= \frac{1}{2}[{\mathbb {I}}+z_m(\tau ){\hat{\sigma }}^{z}]\), with \(z_{m}(\tau ) \equiv e^{-2\Gamma _\beta (\tau )}[z_m(0)-z_{\infty }]+z_{\infty }\) where \(z_{m}(0) = \pm 1\) for \(m = 0,1\) (we recall that m is the label of the initial measurement outcomes). Let us note that the outcome of the second projective measurement is \(a_0^{\textrm{fin}}\), with probability \(p(a_0^{\textrm{fin}})=[1+z_m(\tau )]/2\), and \(a_1^{\textrm{fin}}\), with \(p(a_1^{\textrm{fin}})=[1-z_m(\tau )]/2\). As a result, the values of the stochastic entropy production \(\Delta \sigma (k,m)\), labelled by the index over the measurement outcomes, are provided by the following quantities:

$$\begin{aligned} \begin{aligned}&\Delta \sigma (0,0) = \ln \left[ \frac{p(a_0^{\textrm{in}})}{[1+z_0(\tau )]/2} \right] , \quad \Delta \sigma (0,1) = \ln \left[ \frac{1-p(a_0^{\textrm{in}})}{[1+z_1(\tau )]/2} \right] -\beta \omega ,\\&\Delta \sigma (1,0) = \ln \left[ \frac{p(a_0^{\textrm{in}})}{[1-z_0(\tau )]/2} \right] + \beta \omega , \quad \Delta \sigma (1,1) = \ln \left[ \frac{1-p(a_0^{\textrm{in}})}{[1-z_1(\tau )]/2} \right] . \end{aligned} \end{aligned}$$
(36)

In order to derive the probability distribution of the stochastic entropy production, as well as the corresponding statistical moments, we need to evaluate for the forward process the conditional probability that the outcome \(a_k^{\textrm{fin}}\) occurs after the outcome \(a_m^{\textrm{in}}\) from the first measurement, i.e., \(p_{\textrm{F}}(a_k^{\textrm{fin}}|a_{m}^{\textrm{in}})=\textrm{Tr}[\Pi _k^{\textrm{fin}} \Lambda _{\tau } (\Pi _{m}^{\textrm{in}})]\). Considering the four possible combinations of outcomes, the conditional probabilities are

$$\begin{aligned} \begin{aligned}&p_{\textrm{F}}(a_0^{\textrm{fin}}|a_{0}^{\textrm{in}})=\textrm{Tr}[\Pi _0^{\textrm{fin}} \Lambda _{\tau } (\Pi _{0}^{\textrm{in}})]= \frac{1}{2}[1+z_0(\tau )], \qquad \\&p_{\textrm{F}}(a_0^{\textrm{fin}}|a_{1}^{\textrm{in}})=\textrm{Tr}[\Pi _0^{\textrm{fin}} \Lambda _{\tau } (\Pi _{1}^{\textrm{in}})]= \frac{1}{2}[1+z_1(\tau )], \\&p_{\textrm{F}}(a_1^{\textrm{fin}}|a_{0}^{\textrm{in}})=\textrm{Tr}[\Pi _1^{\textrm{fin}} \Lambda _{\tau } (\Pi _{0}^{\textrm{in}})]= \frac{1}{2}[1-z_0(\tau )], \qquad \\&p_{\textrm{F}}(a_1^{\textrm{fin}}|a_{1}^{\textrm{in}})=\textrm{Tr}[\Pi _1^{\textrm{fin}} \Lambda _{\tau } (\Pi _{1}^{\textrm{in}})]= \frac{1}{2}[1-z_1(\tau )]. \end{aligned} \end{aligned}$$
(37)

Now we can provide the expression of the average entropy production. In doing this, for the sake of an easier presentation, we assume that the initial state of the forward process at time \(t=0\) is one of the eigenstates of \({\hat{\sigma }}^{z}\), i.e., \(\rho (0)=\frac{1}{2}[{\mathbb {I}} + z_m(0) {\hat{\sigma }}^{z}]\). Hence, the state after the first measurement prescribed by the TPM scheme remains unchanged: \(\rho _{\textrm{in}} = \rho (0)= \frac{1}{2}[{\mathbb {I}} + z_m(0) {\hat{\sigma }}^{z}] = \Pi _m^{\textrm{in}}\) such that \(p(a_0^{\textrm{in}})=1\). As a result, one gets:

$$\begin{aligned} \left\langle \Delta \sigma \right\rangle= & {} -\left\{ \frac{1+z_0(\tau )}{2}\ln \left[ \frac{1+z_0(\tau )}{2} \right] + \frac{1-z_0(\tau )}{2} \ln \left[ \frac{1-z_0(\tau )}{2} \right] \right\} \nonumber \\{} & {} + \beta \omega \left[ \frac{1-z_0(\tau )}{2} \right] , \end{aligned}$$
(38)

which allows us to derive a relatively simple expression for its time-derivative:

$$\begin{aligned} \partial _t \left\langle \Delta \sigma \right\rangle = - \frac{1}{2}\partial _t z_0 (t) \left\{ \ln \left[ \frac{1+z_0(t)}{1-z_0(t)}\right] + \beta \omega \right\} . \end{aligned}$$
(39)

The full derivation of \(\left\langle \Delta \sigma \right\rangle \) by initializing the system in a generic density operator \(\rho _0\) is in Appendix D.

Always under the assumption of \(p(a_0^{\textrm{in}})=1\), we can also derive the second statistical moment of the stochastic entropy production, i.e.,

$$\begin{aligned} \left\langle \Delta \sigma ^2\right\rangle= & {} \frac{1+z_0(\tau )}{2}\ln ^2 \left[ \frac{1+z_0(\tau )}{2} \right] + \frac{1-z_0(\tau )}{2} \ln ^2 \left[ \frac{1-z_0(\tau )}{2} \right] \nonumber \\+ & {} \beta ^2\omega ^2 \frac{(1-z_0(\tau ))}{2} -2\beta \omega \frac{(1-z_0(\tau ))}{2}\ln \left[ \frac{1-z_0(\tau )}{2}\right] , \end{aligned}$$
(40)

and the corresponding variance:

$$\begin{aligned} \textrm{Var}(\Delta \sigma )=\left\langle \Delta \sigma ^2\right\rangle -\left\langle \Delta \sigma \right\rangle ^2 = \frac{1}{4}[1-z_0^2(t)]\left\{ \ln \left[ \frac{1+z_0(t)}{1-z_0(t)}\right] +\beta \omega \right\} ^{2}. \end{aligned}$$
(41)

In Appendix D the reader can also find the analytical expression of the time-derivative of \(\textrm{Var}(\Delta \sigma )\) that will be employed in the next Section about irreversibility mitigation.

5 Irreversibility Mitigation

As already discussed in the unital case, we want to find a connection between the non-Markovianity of the dynamics and the phenomenon we called irreversibility mitigation [37]. More explicitly, we look for time intervals in which both the average entropy production and the variance are decreasing. In the perfectly reversible case, which is zero entropy production in a single trajectory, the distribution \(\textrm{Prob}(\Delta \sigma )\) is a Dirac delta in zero. Since the dynamics we consider are irreversible, the average of the distribution typically shifts towards positive values as time passes and the variance broadens (one no-longer has a delta distribution). Therefore, irreversibility mitigation stems for the fact that, due to non-Markovianity, in a certain time-interval the distribution \(\textrm{Prob}(\Delta \sigma )\) tends to get closer to a delta in zero.

We consider the dynamics studied in the previous Section and we choose the initial state to be \(|0\rangle \!\langle 0|\) as before, so that the dynamics is completely described by the z component of the Bloch vector. From Eqs. (27)–(29), using \(z_0=1\) one can compute

$$\begin{aligned} \partial _t z(t)= -2 \,\partial _t \Gamma _\beta (t) \, \textrm{e}^{-2 \Gamma _\beta (t)} (1-z_{\infty }), \end{aligned}$$
(42)

so that the sign of \(\partial _t z(t)\) is opposite to the sign of \(\partial _t \Gamma _\beta (t)= \frac{1}{2}(1+e^{\beta \omega }) \gamma _\beta (t)\). It is known that the sign of \(\gamma _\beta (t)\) is related to the divisibility property of the dynamics and therefore to its degree of non-Markovianity (see the discussion at the beginning of the previous Section). In particular, the dynamics is CP-divisible and P-divisible (in this particular example the two notions coincide) if and only if \(\gamma _\beta (t) \ge 0\) for any time t. This can be seen for instance from Example 3 in [24].

In order to determine the sign of \(\partial _t \left\langle \Delta \sigma \right\rangle \), one has to study the sign of the quantity in brackets in (39), that we call I(t) in the following. It is possible to show that it is always non-negative in a few steps

$$\begin{aligned} I(t)=&\ln \left[ \frac{1+z(t)}{1-z(t)}\right] + \beta \omega \nonumber \\ =&\ln \left[ \frac{1+z(t)}{1-z(t)}\right] - \ln \left[ \frac{1+z_\infty }{1-z_\infty }\right] \nonumber \\ =&\ln \left[ \frac{1+z(t)}{1+z_\infty }\right] - \ln \left[ \frac{1-z(t)}{1-z_\infty }\right] \nonumber \\ =&\ln \left[ \frac{1+z_\infty + \textrm{e}^{-2 \Gamma _\beta (t)}(1-z_\infty ) }{1+z_\infty }\right] - \ln \left[ \frac{1-z_\infty - \textrm{e}^{-2 \Gamma _\beta (t)}(1-z_\infty )}{1-z_\infty }\right] \nonumber \\ =&\ln \left( 1 + \textrm{e}^{-2 \Gamma _\beta (t)} \textrm{e}^{\beta \omega } \right) - \ln \left( 1 - \textrm{e}^{-2 \Gamma _\beta (t)} \right) \nonumber \\ =&\ln \left( \frac{1 + \textrm{e}^{-2 \Gamma _\beta (t)} \textrm{e}^{\beta \omega } }{1 - \textrm{e}^{-2 \Gamma _\beta (t)}}\right) \ge 0 . \end{aligned}$$
(43)

Therefore, for \(\beta \) positive, the sign of \(\partial _t \left\langle \Delta \sigma \right\rangle \) corresponds to the sign of \(\gamma _\beta (t)\) and, as a consequence, the average entropy production is decreasing whenever the dynamics is not P-divisible (essentially non-Markovian). This is consistent with the general result obtained in [4], valid for arbitrary initial state.

Let us now focus on the derivative of the variance. We rewrite the last line of equation (67) for convenience

$$\begin{aligned} \partial _t \textrm{Var}(\Delta \sigma ) = 2 \partial _t \left\langle \Delta \sigma \right\rangle \left( \frac{z(t)}{2} I(t) -1 \right) . \end{aligned}$$
(44)

The interest is in time intervals such that both the variance and the average are decreasing. Therefore, in particular, their derivatives have to share the same sign. This means the term in parenthesis has to be positive. A necessary but not sufficient condition is \(z(t)\ge 0\). Indeed, if this is not true the term is evidently negative. More explicitly, the condition reads

$$\begin{aligned} \Gamma _\beta (t) \le -\frac{1}{2}\ln \left( \frac{1- \textrm{e}^{-\beta \omega }}{2}\right) . \end{aligned}$$
(45)

By means of a somewhat lengthy calculation that we present in Appendix E, one can also find a sufficient condition to produce irreversibility mitigation:

$$\begin{aligned} \Gamma _\beta (t) \le -\frac{1}{2}\ln (x_+), \quad \quad x_+ = \frac{2}{5}\left( 1- \textrm{e}^{-\beta \omega } + \sqrt{\textrm{e}^{-2\beta \omega } + 3 \textrm{e}^{-\beta \omega } +1 }\right) \end{aligned}$$
(46)

In order to make the comparison with the unital case we can consider a \(\gamma _\beta (t)\) that admits a finite limit for \(\beta =0\). In particular, one can take \(\gamma _\beta (t) \equiv \gamma (t)\), independent from \(\beta \). In this case one has for infinite temperature

$$\begin{aligned} \Gamma _0(t)\le -\frac{1}{2}\log \left( \sqrt{\frac{4}{5}}\right) \sim 0.056. \end{aligned}$$

In Ref. [37] we found \(\Gamma _0(t) \le 0.091\) for unital maps (note the different notation: \(\Gamma _0(t)\) in this paper corresponds to \(\Phi (t)\) in Ref. [37]). One could still refine this bound using the theory of Padé approximants [50] (see also Appendix E), however, our aim was to show that a parameter range in which irreversibility mitigation happens does exist.

6 Conclusions

In this paper we studied the stochastic quantum entropy production in non-unital quantum dynamics (e.g., thermalization). We started recalling the Tasaki-Crooks formalism to introduce the stochastic entropy production, and then, as a first result, we studied the conditions whereby the latter obeys a fluctuation relation based on the so-called nonequilibrium potential, as in Refs. [40, 41]. The nonequilibrium potential brings information on the invariant state of the open dynamics under scrutiny, and, as we have shown, it is responsible for the unbalance of the corresponding forward and backward processes. In the case of a thermal invariant state, it has a clear interpretation in terms of energy fluxes. Then, the conditions such that the stochastic entropy production obeys a fluctuation theorem can be summarised as follows: (i) the Kraus operators induce jumps with determined energy gaps, and (ii) the measured observables commute with the invariant state of the map. In fact, with respect to Refs. [40, 41] and in line with Refs. [37, 45], we also clarified the role of the chosen measurement scheme (TPM) both in the definition of the stochastic entropy production and in the derivation of its statistics. This led us to write the average entropy production in terms of quantum relative entropies, with a contribution that explicitly depends on the second measurement. This is the second main result.

Subsequently, we recalled the concept of quantum non-Markovianity, by using a thermalizing qubit dynamics with non-Markovian transient as a case-study. Then, as a third novel result, we determined a parameter range (depending on the temperature of the invariant state of the map) allowing for the average entropy production and its variance to be decreasing at the same time in a transient, a phenomenon that we called irreversibility mitigation in [37].

Let us now discuss some possible outlook of our findings. First of all, our results are based on a construction of the backward protocol starting from the invariant state of the forward dynamics, which is assumed to be unique and strictly positive. It would be interesting to extend the framework in order to include cases with multiple and/or non-invertible invariant states. For instance, in the case of (infinitely) many invariant states one could construct a backward protocol for each of them and then ask if any of those protocols satisfies the condition on the Kraus operators that we used to prove the fluctuation theorem. Also, it would be worth understanding what is the relation between different choices of the reference invariant state. Even more strikingly, when the invariant state is not invertible one has to resort to a different method for building the reversed protocol, like for instance the one proposed in [21]. The existence of fluctuation relations in this framework needs to be investigated further. Moreover, even in the setting of this paper, as already argued above, our derivations hold true for non-unital quantum dynamics satisfying certain constraints on the Kraus operators. For the moment, they have been tested on a single case-study provided by qubit thermalization maps with non-Markovian transient. This allowed us to observe how irreversibility mitigation modifies as a function of the temperature of an external bath. However, it would be interesting to study in detail different examples. In particular, it might be worth investigating whether our results apply to quantum maps (with a microscopic derivation) that are customarily considered in the scenario of open quantum systems (i.e. whether they admit the specific Kraus form we considered). Among them, we mention quantum collision models [51] and quantum Maxwell’s demons [31, 39, 52,53,54] as both deal with repeated interactions with external agents (or just laser pulses) over time, making non-unital the dynamics of the quantum system. Furthermore, one might consider how the nonequilibrium potential changes by employing measurement schemes beyond TPM [55,56,57,58,59], so as to understand the role played by quantum coherence/correlation terms in the initial state. Finally, as a long-term project, one might study if the irreversibility mitigation is favoured or hindered by increasing the size of the open quantum system under scrutiny. In this respect, spin-boson models like the multimode Dicke model could be a viable platform of investigation.