1 Introduction

In the last decade, tremendous progress in experimental techniques resulting in the miniaturization of devices for energy storage and conversion has created the possibility of utilizing quantum effects on a practical level. One such experimental development has been the nanoscale thermoelectric effect at single atom and single molecule junctions [1,2,3,4,5]. Such quantum devices are characterized by efficiency of their performance [6,7,8], and traditional characteristics (e.g., figure of merit) taken from studies on the macroscopic equilibrium thermoelectric systems are often utilized. Clearly, macroscopic thermodynamics underlying such characteristics is not applicable at the nanoscale level. Meaningful description of efficiency in nanoscale junctions requires corresponding development of quantum nonequilibrium thermodynamic theory. Moreover, in junctions with molecules chemisorbed on (at least one of the) macroscopic contacts, thermodynamic theory should account for non-negligible (strong) system-bath couplings.

Significant theoretical effort was undertaken to formulate nanoscale thermodynamics at strong system-bath couplings for both classical [9, 10] and quantum [11,12,13] systems. Arguably, there are two main approaches to the problem: the first complements a physical system strongly coupled to its baths with a set of additional superbaths and implements standard methods in consideration of the supersystem (system plus baths) weakly coupled to its superbaths. A system thermodynamics is defined as the difference between thermodynamic characterization of the supersystem and that of the set of free baths weakly coupled to the corresponding superbaths. The second approach builds a thermodynamic description for the physical system, that is, system strongly coupled to its baths. In addition to developments of thermodynamic formulations, an interesting, widely debated question is the possibility of thermodynamics being consistent with underlying system dynamics [14, 15].

Here, we consider a generic model of a molecular junction with non-negligible (strong) molecule–contact couplings. We utilize the nonequilibrium Green’s function (NEGF) to describe dynamics of the system and discuss compatibility of the dynamic consideration with several suggestions for the thermodynamic characterization of such systems available in the literature. We present general NEGF formulations (beyond the usually assumed slow driving) for thermodynamic characteristics of the system. We argue that difficulties of Green’s function-based analysis of supersystem–superbath thermodynamic treatments are caused by incompatibility of basic assumptions in the two theories: The thermodynamic system is associated with the physical system in the former and with the supersystem (physical system plus baths) in the latter. System-bath thermodynamic formulations are found to be compatible with NEGF dynamics. The structure of the paper is as follows: Sect. 2 introduces the model and presents the basics of the dynamical NEGF treatment. Thermodynamic NEGF-based formulations are presented in Sect. 3 for supersystem–superbath and in Sect. 4 for system-bath considerations. Section 5 summarizes our findings.

2 Dynamical consideration

We consider an open noninteracting nonequilibrium quantum system S (e.g., molecule with its electronic structure calculated using density functional theory) strongly coupled to its baths \(\{B\}\) (e.g., metallic contacts in the junction). The system is subjected to an arbitrary external driving. The Hamiltonian of the model is:

$$\begin{aligned} {\hat{H}}(t) = {\hat{H}}_S(t) + \sum _{B}\bigg ({\hat{H}}_B + {\hat{V}}_{SB}(t)\bigg ), \end{aligned}$$
(1)

where \({\hat{H}}_S(t)\) and \({\hat{H}}_B\) are Hamiltonians of the system S and bath B, respectively, and \({\hat{V}}_{SB}(t)\) describes coupling (electron transfer) between system S and bath B. Explicit expressions are:

$$\begin{aligned} {\hat{H}}_S(t)&= \sum _{m_1,m_2\in S} H_{m_1m_2}^{(S)}(t) {\hat{d}}_{m_1}^\dagger {\hat{d}}_{m_2}, \nonumber \\ {\hat{H}}_B&= \sum _{k\in B} \varepsilon _k{\hat{c}}_k^\dagger {\hat{c}}_k, \end{aligned}$$
(2)
$$\begin{aligned} {\hat{V}}_{SB}(t)&= \sum _{m\in S}\sum _{k\in B}\bigg ( V_{mk}(t) {\hat{d}}_m^\dagger {\hat{c}}_k + H.c.\bigg ), \end{aligned}$$
(3)

where \({\hat{d}}_m^\dagger \) (\({\hat{d}}_m\)) and \({\hat{c}}_k^\dagger \) (\({\hat{c}}_k\)) create (annihilate) an electron in orbital m of the molecule (system) and single-particle state k of a contact (bath), respectively.

For such a noninteracting model, one can easily simulate exact projections of the single-electron Green’s function [16,17,18]:

$$\begin{aligned} G_{n_1n_2}(\tau _1,\tau _2) \equiv -i \langle T_c\, {\hat{a}}_{n_1}(\tau _1)\,{\hat{a}}_{n_2}^\dagger (\tau _2)\rangle . \end{aligned}$$
(4)

Here, \(T_c\) is the Keldysh contour ordering operator, \(\tau _i\) are the contour variables, and \(n_i\) are indices for single-particle state either in the system or in the baths, that is, \({\hat{a}}_n\) is either \({\hat{d}}_m\) or \({\hat{c}}_k\).

Dynamical (quantum transport) consideration defines particle, \(I_B\), and energy, \(J_B\), fluxes at the \(S-B\) interface as escape rates of particles and energy, respectively, from bath B. Exact expressions for the fluxes in terms of single particle Green’s functions are obtained following Jauho–Wingreen–Meir [19] and similar [20] derivations:

$$\begin{aligned} I_B(t)&\equiv -\sum _{k\in B} \frac{\mathrm{d}}{\mathrm{d}t}\big \langle {\hat{c}}_k^\dagger (t){\hat{c}}_k(t)\big \rangle \nonumber \\&= -\text{ Tr }\bigg [ {\hat{N}}_B\, \frac{\mathrm{d}}{\mathrm{d}t}\hat{\rho }(t) \bigg ] =\sum _{k\in B}\text{ Tr}_S\Big [ {\mathbf {I}}_k^{(+)}(t) - {\mathbf {I}}_k^{(-)}(t) \Big ] \end{aligned}$$
(5)
$$\begin{aligned} J_B(t)&\equiv -\sum _{k\in B} \varepsilon _k \frac{\mathrm{d}}{\mathrm{d}t}\big \langle {\hat{c}}_k^\dagger (t){\hat{c}}_k(t)\big \rangle \nonumber \\&= - \text{ Tr }\bigg [ {\hat{H}}_B\,\frac{\text {d}}{\text {d}t} \hat{\rho }(t) \bigg ] = \sum _{k\in B}\varepsilon _k\,\text{ Tr}_S\Big [ {\mathbf {I}}_k^{(+)}(t) - {\mathbf {I}}_k^{(-)}(t) \Big ]. \end{aligned}$$
(6)

Here, \({\hat{N}}_B\equiv \sum _{k\in B}{\hat{c}}_k^\dagger {\hat{c}}_k\) is the operator of particle number in bath B, \(\hat{\rho }(t)\) is the total (system plus baths) density operator, \(\text{ Tr }[\ldots ]\) and \(\text{ Tr}_S[\ldots ]\) are traces over total (system plus baths) and system (molecular) degrees of freedom, and \({\mathbf {I}}_k^{(+)/(-)}\) are matrices in subspace S representing k-resolved in-/out-scattering particle fluxes at the \(S-B\) interface. These matrices can be expressed as:

$$\begin{aligned} \big [{\mathbf {I}}_k^{(+)}\big ]_{m_1m_2}&= \sum _{m'\in M}\int _{-\infty }^{t} \mathrm{d}t' \big ( V_{m_1k}(t)\, g_k^{<}(t-t')\,\nonumber \\&\qquad V_{km'}(t')\, G_{m'm_2}^{>}(t',t) \nonumber \\&\quad + G_{m_1m'}^{>}(t,t') \, V_{m'k}(t')\, g_k^{<}(t'-t)\, V_{km_2}(t) \big ) \end{aligned}$$
(7)
$$\begin{aligned} \big [{\mathbf {I}}_k^{(-)}\big ]_{m_1m_2}&= \sum _{m'\in M}\int _{-\infty }^{t} \mathrm{d}t' \big ( V_{m_1k}(t)\, g_k^{>}(t-t')\,\nonumber \\&\qquad V_{km'}(t')\, G_{m'm_2}^{<}(t',t) \nonumber \\&\quad + G_{m_1m'}^{<}(t,t') \, V_{m'k}(t')\, g_k^{>}(t'-t)\, V_{km_2}(t) \big ). \end{aligned}$$
(8)

\(G_{m_2m_1}^{\lessgtr }\) are lesser/greater projections of the molecular-space single-particle Green’s function (4), while \(g_{k}^{\lessgtr }\) are lesser/greater projections of the Green’s function of free electron in state k of bath B:

$$\begin{aligned} g_k(\tau _1,\tau _2)\equiv -i\langle T_c\,{\hat{c}}_k(\tau _1)\,{\hat{c}}_k^\dagger (\tau _2)\rangle . \end{aligned}$$
(9)

It should be noted that definition (6) assumes \(\langle {\hat{H}}_B \rangle \) to be the energy of bath B, so that dynamical approach sets:

$$\begin{aligned} E_S(t) = \bigg \langle {\hat{H}}_S(t) + \sum _B {\hat{V}}_{SB}(t) \bigg \rangle \end{aligned}$$
(10)

as energy of the system S.

3 Supersystem weakly coupled to superbaths

At equilibrium, the thermodynamics of a system S that is strongly coupled to its bath B (one bath is enough at equilibrium) is modeled as the difference in the thermodynamic description (difference of grand potentials) of the supersystem (system S plus bath B) weakly coupled to the superbath (additional external bath) and bath B weakly coupled to the superbath. The approach was pioneered in Refs. [21, 22]. This allows the utilization of standard (weakly coupled) thermodynamic description to derive grand potential \(\varOmega _S^{eq}\), entropy \(S^{eq}\), and energy \(E_S^{eq}\) of the system S as [23]:

$$\begin{aligned} \varOmega _{S}^{eq}&= \frac{1}{\beta _B}\int \frac{\mathrm{d}E}{2\pi }\,{\mathcal {A}}_B(E)\ln [1-f_B(E)] \end{aligned}$$
(11)
$$\begin{aligned} S^{eq}&\equiv -\frac{\partial \varOmega _S^{eq}}{\partial T_B} \nonumber \\&= \int \frac{\mathrm{d}E}{2\pi }\, {\mathcal {A}}_B(E)\,\sigma _B(E) \end{aligned}$$
(12)
$$\begin{aligned} E_S^{eq}&\equiv \varOmega _S^{eq} +\mu _B N_B^{eq} +\frac{1}{\beta _B} S^{eq} \nonumber \\&= \varOmega _S^{eq} -\mu _B\frac{\partial \varOmega _S^{eq}}{\partial \mu _B} +\frac{1}{\beta _B} S^{eq} \nonumber \\&= \int \frac{\mathrm{d}E}{2\pi }\, E\,{\mathcal {A}}_B(E)\, f_B(E). \end{aligned}$$
(13)

Here, \(\beta _B=1/k_B T_B\), \(\sigma _B(E)\) is the energy-resolved Shannon entropy, where:

$$\begin{aligned} \sigma _B(E)= & {} -k_B\big (f_B(E)\ln f_B(E)\nonumber \\&+ [1-f_B(E)]\ln [1-f_B(E)]\big ), \end{aligned}$$
(14)

and \({\mathcal {A}}_B(E)\) is the renormalized spectral function:

$$\begin{aligned} {\mathcal {A}}_B(E) = A(E) -2\,\text{ Im }\sum _{k\in B}\bigg [ G^r_{kk}(E) - g^r_k(E) \bigg ] \end{aligned}$$
(15)

with

$$\begin{aligned} A(E) = -2\,\text{ Im }\sum _{m\in S}\, G_{mm}^r(E) \end{aligned}$$
(16)

representing the usual spectral function of the system. We note that these expressions were first introduced in Ref. [23] and that the \(g_k^r\) contribution on the right side of (15) stands to subtract the evolution of free bath B from the total suspersystem dynamics.

At nonequilibrium, expressions (12) and (13) are used as templates for ad hoc formulations of energy and entropy. This is done by substituting spectral functions and/or Fermi distributions with their nonequilibrium analogs at slow driving [23,24,25]. Expressions for system characteristics at slow driving are obtained by employing gradient expansion [16, 26]. More consistent approaches to nonequilibrium reformulate the equilibrium considerations of Refs. [21, 22] using scattering states [27]. In this formulation, superbaths provide thermal distributions of the scattering states. Parametric dependence of the scattering matrix on time developed for adiabatic quantum pumps in Ref. [28] was utilized to obtain nonequilibrium system behavior at slow driving. It was shown within these thermodynamic considerations [23, 29,30,31] that a consistent (dynamic-to-thermodynamic) description can be obtained within the wide-band approximation (WBA) and for driving confined to the system Hamiltonian \({\hat{H}}_S(t)\) if energy of the system is taken as:

$$\begin{aligned} E_S(t) = \bigg \langle {\hat{H}}_S(t) + \frac{1}{2}\sum _B {\hat{V}}_{SB}(t) \bigg \rangle . \end{aligned}$$
(17)

Similar separation of the total Hamiltonian is assumed in recent density matrix-based approaches [32,33,34,35]. Extension of the formulation to account for driving in the system-bath coupling was claimedFootnote 1 in Ref. [25]. Note that definition (17) deviates from the dynamical definition (10).

Before proceeding to Green’s function-based analysis, we want to stress several points. First, definition (17) modifies the energies of the baths, adding half of the system-bath coupling into the bath’s energy. This addition makes it impossible to count at a particular system-bath interface, because \({\hat{V}}_{SB}\) inter-couples all baths via the system. In addition, adding system degrees of freedom into the expression for the bath energy destroys the possibility of counting in the bath only. This makes the formulation of the full counting statistics impossible, and thus, it is natural that definition (17) fails to describe energy fluctuations [36]. Second, a simple single-particle scattering formulation is only possible for noninteracting systems and adiabatically slow driving when scattering channels are independent of each other. Indeed, scattering theory yields the famous Landauer–Büttiker formalism applicable in the description of steady states in noninteracting systems. Finite driving and/or presence of interactions requires more elaborated description. Third, a consistent thermodynamic description employing definition (17) was only possible in the WBA where renormalization of the spectral function is dropped, that is, \({\mathcal {A}}(E)=A(E)\). As we show below, extension of the formulation beyond the WBA is impossible when (17) is taken as the energy of the system.

We now turn to NEGF analysis of the two definitions for system energy, Eqs. (10) and (17), with the goal of establishing their consistency with the expected limiting (equilibrium) expression, Eq. (13), as obtained from general results for the noninteracting system (1)-(3) under arbitrary driving and beyond the WBA. To do so, we are going to express contributions to the total energy, that is, averages of terms in the total Hamiltonian (1), in terms of Green’s functions utilizing Wigner representation in time variables:

$$\begin{aligned} f(t;s)=F(t_1,t_2) \quad \text{ and }\quad f(t;E) = \int ds\, e^{-iEs} f(t;s),\nonumber \\ \end{aligned}$$
(18)

where \(t=(t_1+t_2)/2\) and \(s=t_1-t_2\).

First, it is straightforward to see that:

$$\begin{aligned} \big \langle {\hat{H}}_S(t) \big \rangle&= -i \sum _{m_1,m_2\in S} H^{(S)}_{m_1m_2}(t)\, G^{<}_{m_2m_1}(t,t) \nonumber \\&= -i\int \frac{\mathrm{d}E}{2\pi }\text{ Tr}_S\big [ {\mathbf {H}}^{(S)}(t)\, {\mathbf {G}}^{<}(t;E)\big ]. \end{aligned}$$
(19)

Here, \(G^{<}_{m_2m_1}(t,t)\) is the lesser projection of the Green’s function (4) taken at equal times.

Second, for system-baths coupling, we obtain:

$$\begin{aligned} \sum _B \big \langle {\hat{V}}_{SB}(t) \big \rangle&= 2\,\text{ Im }\sum _B\sum _{m\in S}\sum _{k\in B} V_{mk}(t)\, G_{km}^{<}(t,t)\nonumber \\&= 2\,\text{ Im }\int _{-\infty }^{+\infty } \mathrm{d}t'\, \text{ Tr}_S\big [ \varSigma ^{<}(t,t')\, {\mathbf {G}}^a(t',t) \nonumber \\&\quad +\varSigma ^r(t,t')\, {\mathbf {G}}^{<}(t',t)\big ] \nonumber \\&= 2\,\text{ Im }\,\text{ Tr}_S\bigg [\bigg (i\frac{\partial {\mathbf {G}}^{<}(t,t')}{\partial t}\bigg )_{t=t'}\nonumber \\&\quad - {\mathbf {H}}^{(S)}(t)\,{\mathbf {G}}^{<}(t,t) \bigg ] \nonumber \\&\equiv -2\,i\int \frac{\mathrm{d}E}{2\pi }\, E\,\text{ Tr}_S\big [{\mathbf {G}}^{<}(t;E)\big ] \nonumber \\&\quad - 2\big \langle {\hat{H}}_S(t)\big \rangle . \end{aligned}$$
(20)

Here:

$$\begin{aligned} \varSigma _{mm'}(\tau ,\tau ')= & {} \sum _B \varSigma ^B_{mm'}(\tau ,\tau ') \nonumber \\\equiv & {} \sum _B \sum _{k\in B} V_{mk}(t)\, g_k(\tau ,\tau ')\, V_{km'}(t')\nonumber \\ \end{aligned}$$
(21)

is the system self-energy due to coupling to baths, where \(g_k(\tau ,\tau ')\) is defined in (9). The transition from the first to second expression in the right side uses an integral form of the Dyson equation for \(G_{km}^{<}(t,t)\):

$$\begin{aligned} G_{km}^{<}(t,t)= & {} \sum _{m'\in S} \int _{-\infty }^{+\infty } \mathrm{d}t'\, \bigg [ g_{k}^{<}(t,t')\, V_{km'}(t')\, G_{m'm}^{a}(t',t) \nonumber \\&+ g_{k}^{r}(t,t')\, V_{km'}(t')\, G_{m'm}^{<}(t',t) \bigg ]. \end{aligned}$$
(22)

The third expression in the right side is obtained by employing the differential from of the left-side Dyson equation for \(G^{<}_{m_1m_2}(t,t)\):

$$\begin{aligned} \bigg (i\frac{\partial {\mathbf {G}}_{m_1m_2}^{<}(t,t')}{\partial t}\bigg )_{t=t'}&= \sum _{m'\in S} H^{(S)}_{m_1m'}(t)\, G^{<}_{m'm_2}(t,t)\nonumber \\&\quad + \sum _{m'\in S}\int _{-\infty }^{+\infty } \mathrm{d}t'\!\bigg [ \varSigma _{m_1m'}^{<}(t,t')\, G_{m'm_2}^{a}(t',t) \nonumber \\&\quad + \varSigma _{m_1m'}^{r}(t,t')\, G_{m'm_2}^{<}(t',t) \bigg ]. \end{aligned}$$
(23)

The last expression in the right side is obtained using the Wigner representation (18) for the first term and using Eq. (19) for the second term.

Third, for baths’ contributions to the total energy, one has:

$$\begin{aligned} \sum _B \big \langle {\hat{H}}_B\big \rangle&= -i\sum _B\sum _{k\in B} \varepsilon _k G^{<}_{kk}(t,t)\nonumber \\&=\sum _B\sum _{k\in B}\text{ Im }\bigg [\bigg (i\frac{\partial G_{kk}^{<}(t,t')}{\partial t}\bigg )_{t=t'} \nonumber \\&\quad -\sum _{m\in S} V_{km}(t)\, G^{<}_{mk}(t,t) \bigg ] \nonumber \\&= \text{ Im }\Bigg [ \sum _B\sum _{k\in B}\bigg (i\frac{\partial G_{kk}^{<}(t,t')}{\partial t}\bigg )_{t=t'} \nonumber \\&\quad -\sum _{m\in S}\bigg (i\frac{\partial G_{mm}^{<}(t,t')}{\partial t}\bigg )_{t=t'}\nonumber \\&\quad +\sum _{m_1,m_2\in S} H^{(S)}_{m_1m_2}(t)\, G^{<}_{m_2m_1}(t,t) \Bigg ] \nonumber \\&=-i \int \frac{\mathrm{d}E}{2\pi }\, E\bigg ( \text{ Tr}_B\big [{\mathbf {G}}^{<}(t;E)\big ]\nonumber \\&\quad - \text{ Tr}_S\big [{\mathbf {G}}^{<}(t; E)\big ] \bigg ) +\big \langle {\hat{H}}_S(t) \big \rangle . \end{aligned}$$
(24)

Here, transitions from the first to second and from the second to third and fourth expression in the right side utilize differential forms of left-side Dyson equations for \(G_{kk}^{<}(t,t)\) and \(G_{mm}^{<}(t,t)\), respectively. As previously shown, the last expression is obtained using the Wigner representation (18) for the first and second terms and by using Eq. (19) for the last term. Similarly, for free baths evolution, one has:

$$\begin{aligned} \sum _B \big \langle {\hat{H}}_B\big \rangle _0&= -i\sum _B\sum _{k\in B} \varepsilon _k\, g^{<}_{k}(t,t)\nonumber \\&=\sum _B\sum _{k\in B}\text{ Im }\left[ \bigg (i\frac{\partial g_{k}^{<}(t,t')}{\partial t}\bigg )_{t=t'}\right] \nonumber \\&= -i\int \frac{\mathrm{d}E}{2\pi }\, E\, \text{ Tr}_B\, {\mathbf {g}}^{<}(E), \end{aligned}$$
(25)

where \({\mathbf {g}}^{<}(E)\) does not contain dependence on t due to the absence of driving in baths.

We note that, contrary to previous considerations, expressions (19)–(25) are not limited to slow driving; for the noninteracting model (1)–(3), they are exact. Equations (19) and (20) show that the dynamical definition (10) does not yield the equilibrium result (13) expected within the approach. Meanwhile, scattering theory-based suggestion, Eq. (17), leads to:

$$\begin{aligned} \bigg \langle {\hat{H}}_S(t) + \frac{1}{2}\sum _B {\hat{V}}_{SB}(t)\bigg \rangle = -i\int \frac{\mathrm{d}E}{2\pi }\, E\, \text{ Tr}_S\big [G^{<}(t;E)\big ].\nonumber \\ \end{aligned}$$
(26)

At equilibrium, this expression yields results similar to (13), but with \({\mathcal {A}}(E)\) substituted by A(E); that is, one obtains the form of correct limiting expression in the WBA. It is clear from the derivation above that generalization beyond WBA is not possible when using (17) as the definition for system energy.

To obtain the expected equilibrium behavior, Eq. (13), one has to assume:

$$\begin{aligned} E_S(t)= & {} \bigg \langle {\hat{H}}_S(t) + \sum _B\bigg ( {\hat{H}}_B + {\hat{V}}_{SB}(t) \bigg )\bigg \rangle \nonumber \\&- \bigg \langle \sum _B {\hat{H}}_B \bigg \rangle _0 \end{aligned}$$
(27)

as an expression for system energy. Here, \(\langle \ldots \rangle = \text{ Tr }[\ldots \hat{\rho }(t)]\) and \(\langle \ldots \rangle _0 = \text{ Tr }[\ldots \hat{\rho }_0]\), where \(\hat{\rho }_0\) is the density operator of the free decoupled system and baths evolution. Indeed, substituting (19)–(25) into (27) leads to:

$$\begin{aligned} E_S(t)= & {} -i\int \frac{\mathrm{d}E}{2\pi }\, E \bigg ( \text{ Tr }\big [{\mathbf {G}}^{<}(t;E)\big ] \nonumber \\&-\text{ Tr}_B\big [{\mathbf {g}}^{<}(E) \big ]\bigg ), \end{aligned}$$
(28)

which yields the expected equilibrium behavior.

We note that expression (27) is highly logical in the sense that it follows the philosophy of defining system characteristics as the difference between those of the supersystem and free baths. At the same time, it reveals a basic incompatibility between the “supersystem weakly coupled to superbaths” thermodynamic approach and standard NEGF dynamical formulation. The lack of a superbath concept in the latter does not allow heat to be meaningfully introduced in any attempt to combine the two descriptions.

4 System strongly coupled to baths

A variant of the thermodynamic formulation for the system strongly coupled to its baths was proposed in Refs. [37, 38]. As expected, in the absence of the superbaths, the definition of the system S energy

$$\begin{aligned} E_S(t)= & {} \bigg \langle {\hat{H}}_S(t) + \sum _B {\hat{V}}_{SB}(t) \bigg \rangle - \bigg \langle {\hat{H}}_S(0) + \sum _B {\hat{V}}_{SB}(0) \bigg \rangle _0\nonumber \\ \end{aligned}$$
(29)

and the expression for energy flux are consistent with dynamical NEGF results from Eqs. (10) and (6), respectively. Similar to the supersystem–superbath thermodynamics, the system-bath formulation is also based on a set of ad hoc assumptions. In particular, Ref. [37] assumes that entropy of the system strongly coupled to its baths is given by the von Neumann entropy :

$$\begin{aligned} S(t) \equiv -\text{ Tr}_S\big [ \hat{\rho }_S(t)\,\ln \hat{\rho }_S(t)\big ], \end{aligned}$$
(30)

where \(\hat{\rho }_S(t) = \text{ Tr}_{B}[\hat{\rho }(t)]\) is the many-body density operator of the system. Below, we show how entropy, Eq. (30), and the second law of themodynamics can be expressed in terms of Green’s functions.

First, we note that, for quadratic Hamiltonian (1)–(3), Wick’s theorem holds for the whole universe (system plus baths) or any of its parts. This means that the corresponding many-body density operator \(\hat{\rho }_S(t)\) should have a Gaussian form. That is, system density operator has the form:

$$\begin{aligned} \hat{\rho }_S(t)= & {} \frac{1}{Z_S(t)}\nonumber \\&\times \exp \left( -\sum _{m_1,m_2\in S}A^{(S)}_{m_1m_2}(t)\,{\hat{d}}_{m_1}^\dagger \,{\hat{d}}_{m_2}\right) ,\nonumber \\ \end{aligned}$$
(31)

where \(Z_S(t)\) is a normalization constant. The form (31) is mathematically similar to the equilibrium case, so that for fixed t standard tools of equilibrium, path integral consideration can be applied. In particular, we can consider form (31) as an equilibrium density matrix with an “effective Hamiltonian” \(\sum _{m_1,m_2\in S}A^{(S)}_{m_1m_2}(t){\hat{d}}_{m_1}^\dagger {\hat{d}}_{m_2}\) and the inverse temperature \(\beta _S=1\). Note that t in the “effective Hamiltonian” should be considered as a parameter.

Using the results of equilibrium consideration for noninteracting Hamiltonians [39], one obtains:

$$\begin{aligned} Z_S(t)= & {} \text{ det }\big [i{\mathbf {G}}^>(t,t)\big ]^{-1} \quad \text{ and }\quad \nonumber \\ e^{-{\mathbf {A}}^{(S)}(t)}= & {} \frac{-i{\mathbf {G}}^{<}(t,t)}{i{\mathbf {G}}^{>}(t,t)}. \end{aligned}$$
(32)

Thus

$$\begin{aligned} \mathbf {\rho }_S(t) = \frac{1}{Z_S(t)} e^{-{\mathbf {A}}^{(S)}(t)} = \text{ det }\big [i{\mathbf {G}}^{>}(t,t)\big ]\frac{-i{\mathbf {G}}^{<}(t,t)}{i{\mathbf {G}}^{>}(t,t)}.\nonumber \\ \end{aligned}$$
(33)

Here, \({\mathbf {G}}^ > rless (t,t)\) are matrices of the greater/lesser projection of Green’s function (4) in the system subspace of the problem, and \(\mathbf {\rho }_S(t)\) is the system density matrix (representation of operator \(\hat{\rho }_S(t)\) in the single-particle basis of S). Similar expressions were derived in Refs. [40,41,42,43].

Using (33) in (30) and employing \(\ln \text{ det }\, {\mathbf {M}} = \text{ Tr }\,\ln {\mathbf {M}}\) (\({\mathbf {M}}\) is a matrix) leads to:

$$\begin{aligned} S(t)= & {} -\text{ Tr}_S\bigg [-i{\mathbf {G}}^{<}(t,t)\,\ln \big (-i{\mathbf {G}}^{<}(t,t)\big )\bigg ]\nonumber \\&-\text{ Tr}_S\bigg [i{\mathbf {G}}^{>}(t,t)\,\ln \big (i{\mathbf {G}}^{>}(t,t)\big )\bigg ]. \end{aligned}$$
(34)

Here, \(-i{\mathbf {G}}^{<}(t,t)\) is the single-particle density matrix \(\rho _S(t)\) and \(i{\mathbf {G}}^{>}(t,t)-i{\mathbf {G}}^{<}(t,t)={\mathbf {I}}\) (\({\mathbf {I}}\) is the unity matrix). Note that (34) holds for any driving.

Taking the time derivative of the entropy (34) leads to the second law of thermodynamics in the following form:

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} S(t)&= \text{ Tr}_S\bigg [\bigg (-i\frac{\mathrm{d}}{\mathrm{d}t}{\mathbf {G}}^{<}(t,t)\bigg )\, \ln \frac{i{\mathbf {G}}^{>}(t,t)}{-i{\mathbf {G}}^{<}(t,t)}\bigg ] \nonumber \\&\equiv \sum _B\sum _{k\in B}\text{ Tr}_S\bigg [ \beta _B(\varepsilon _k-\mu _B)\big [{\mathbf {I}}_k^{(+)}(t)-{\mathbf {I}}_k^{(-)}(t)\big ]\nonumber \\&\quad + \big [{\mathbf {I}}_k^{(+)}(t)-{\mathbf {I}}_k^{(-)}(t)\big ]\, \ln \frac{{\mathbf {G}}^{>}(t,t)\, g_k^{<}(t,t)}{{\mathbf {G}}^{<}(t,t)\, g_k^{>}(t,t)} \bigg ] \nonumber \\&= \sum _B \big [ \beta _B\, \dot{Q}_B(t) + \varDelta _i \dot{S}_B(t)\big ]. \end{aligned}$$
(35)

Here, \(\dot{Q}_B\equiv J_B(t)-\mu _B I_B(t)\) is the heat flux expressed in terms of particle (\(I_B\)) and energy (\(J_B\)) fluxes at the \(S-B\) interface, where the definitions are given by the dynamical NEGF expressions (5) and (6), respectively. The formula \(\varDelta _i \dot{S}(t)=\sum _B\varDelta _i \dot{S}_B\), defined by the second term in the second expression in the right side of (35), is the rate of entropy production, which may be negative (as was discussed in Ref. [37]).

5 Conclusion

We considered two different approaches to thermodynamic formulations for open nonequilibrium quantum systems strongly coupled to their baths. These were a supersystem (system plus baths) weakly coupled to superbaths and a system strongly coupled to its baths. In particular, the former encompasses popular scattering theory formulations of quantum thermodynamics. We analyzed the compatibility of the formulations with a dynamical description of the system via the nonequilibrium Green’s function approach. We presented the thermodynamic formulation in NEGF beyond slow driving. Results for adiabatic driving and equilibrium can be derived from our consideration as limiting cases. Our analysis showed that supersystem–superbath formulations are based on a set of assumptions that are incompatible with the basics of the dynamical NEGF formulation. In particular, this is the cause of differences in definition of energy flux as accepted in the two approaches. At the same time, the system-bath formulation is consistent with NEGF, and definitions of energy fluxes are equivalent in this thermodynamic formulation to those of dynamic NEGF description. For the system-bath formulation, we presented expressions for entropy and entropy production in terms of Green’s functions. It is interesting to note that, while supersystem–superbath formulations postulated energy resolved Shannon-like expression for entropy of the system, the system-bath approach assumes entropy of the system to be given by von Neumann expression constructed from system characteristics integrated in energy. We note that both expressions for system entropy, the nonequilibrium analog of Eq. (12) and Eq.(34), are ad hoc formulations, and that the possibility of construction of energy-resolved formulation consistent with dynamical NEGF description is still an open question.