Experimental system

NMR offers an exceptional degree of preparation, control, and measurement of coupled nuclear spin systems21,22. It has for this reason become a premier tool for the study of quantum thermodynamics7,26,27. In our investigation, we consider two nuclear spins-1/2, in the 13C and 1H nuclei of a 13C-labeled CHCl 3 liquid sample diluted in Acetone-d6 (Fig. 1b). The sample is placed inside a superconducting magnet that produces a longitudinal static magnetic field (along the positive z-axis) and the system is manipulated by time-modulated transverse radio-frequency (rf) fields. We study processes in a time interval of few milliseconds, which is much shorter than any relevant decoherence time of the system (of the order of few seconds)26. The dynamics of the combined spins in the sample is thus effectively closed and the total energy is conserved to an excellent approximation. Our aim is to study the heat exchange between the 1H (system A) and 13C (system B) nuclear spins under a partial thermalization process in the presence of initial correlations (Fig. 1a). Employing a sequence of transversal rf-field and longitudinal field-gradient pulses, we prepare an initial state of both nuclear spins (A and B) of the form,

$$\rho _{{\mathrm{AB}}}^0 = \rho _{\mathrm{A}}^0 \otimes \rho _{\mathrm{B}}^0 + \chi _{{\mathrm{AB}}},$$ (1)

where χ AB = α|01〉〈10| + α*|10〉〈01| is a correlation term and \(\rho _i^0 = {\mathrm{exp}}( - \beta _i{\cal{H}}_i)/{\cal{Z}}_i\) a thermal state at inverse temperature β i = 1/(k B T i ), i = (A, B), with k B the Boltzmann constant. The state \(\left| 0 \right\rangle\) (\(\left| 1 \right\rangle\)) represents the ground (excited) eigenstate of the Hamiltonian \({\cal{H}}_i\), and \({\cal{Z}}_i = {\mathrm{Tr}}_i\,{\mathrm{exp}}( - \beta _i{\cal{H}}_i)\) is the partition function. The individual nuclear spin Hamiltonian, in a double-rotating frame with the nuclear spins (1H and 13C) Larmor frequency, may be written as \({\cal{H}}_i = h

u _0\left( {{\bf{1}} - \sigma _z^i} \right)/2\), with ν 0 = 1 kHz effectively determined by a nuclei rf-field offset. In Eq. (1), the coupling strength should satisfy \(|\alpha | \le {\mathrm{exp}}\left[ { - h

u _0(\beta _{\mathrm{A}} + \beta _{\mathrm{B}})/2} \right]/({\cal{Z}}_{\mathrm{A}}{\cal{Z}}_{\mathrm{B}})\) to ensure positivity. We consider two distinct cases: for α = 0, the spins are initially uncorrelated as assumed in standard thermodynamics, while for α ≠ 0, the joint state is initially correlated. We note that since \({\mathrm{Tr}}_i\,\chi _{{\mathrm{AB}}} = 0\), the two spins are locally always in a thermal Gibbs state in both situations. As a result, thermodynamic quantities, such as temperature, internal energy, heat, and entropy, are well defined. A partial thermalization between the qubits is described by the effective (Dzyaloshinskii–Moriya) interaction Hamiltonian, \({\cal{H}}_{{\mathrm{AB}}}^{{\mathrm{eff}}} = i(\pi \hbar /2)J\left( {\sigma _x^{\mathrm{A}}\sigma _y^B - \sigma _y^{\mathrm{A}}\sigma _x^{\mathrm{B}}} \right)\), with J = 215.1 Hz28,29, which can be easily realized experimentally. We implement the corresponding evolution operator, \({\cal{U}}_\tau = {\mathrm{exp}}\left( { - i\tau {\cal{H}}_{{\mathrm{AB}}}^{{\mathrm{eff}}}/\hbar } \right)\), by combining free evolutions under the natural hydrogen–carbon scalar coupling and rf-field rotations (Fig. 1c). We further stress that the correlation term should satisfy \(\left[ {\chi _{{\mathrm{AB}}},{\cal{H}}_{{\mathrm{AB}}}^{{\mathrm{eff}}}} \right]

e 0\) for the heat flow reversal to occur (Supplementary Information).

Fig. 1 Schematic of the experimental setup. a Heat flows from the hot to the cold spin (at thermal contact) when both are initially uncorrelated. This corresponds to standard thermodynamic. For initially quantum-correlated spins, heat is spontaneously transferred from the cold to the hot spin. The direction of heat flow is here reversed. b View of the magnetometer used in our NMR experiment. A superconducting magnet, producing a high-intensity magnetic field (B 0 ) in the longitudinal direction, is immersed in a thermally shielded vessel in liquid He, surrounded by liquid N in another vacuum separated chamber. The sample is placed at the center of the magnet within the radio-frequency coil of the probe head inside a 5-mm glass tube. c Experimental pulse sequence for the partial thermalization process. The blue (black) circle represents x (y) rotations by the indicated angle. The orange connections represents a free evolution under the scalar coupling, \({\cal{H}}_{\mathrm{J}}^{{\mathrm{HC}}} = (\pi \hbar /2)J\sigma _z^{\mathrm{H}}\sigma _z^{\mathrm{C}}\), between the 1H and 13C nuclear spins during the time indicated above the symbol. We have performed 22 samplings of the interaction time τ in the interval 0 to 2.32 ms Full size image

Thermodynamics

In macroscopic thermodynamics, heat is defined as the energy exchanged between to large bodies at different temperatures2. This notion has been successfully extended to small systems initially prepared in thermal Gibbs states30, including qubits10. Since the interaction Hamiltonian commutes with the total Hamiltonian of the two qubits, \(\left[ {{\cal{H}}_{\mathrm{A}} + H_{\mathrm{B}},{\cal{H}}_{{\mathrm{AB}}}^{{\mathrm{eff}}}} \right] = 0\), the thermalization operation does not perform any work on the spins31. As a result, the mean energy is constant in time and the heat absorbed by one qubit is given by its internal energy variation along the dynamics, Q i = ΔE i , where \(E_i = {\mathrm{Tr}}_i{\kern 1pt} \rho _i{\cal{H}}_i\) is the z-component of the nuclear spin magnetization. For the combined system, the two heat contributions satisfy9,10,11,

$$\beta _{\mathrm{A}}Q_{\mathrm{A}} + \beta _{\mathrm{B}}Q_{\mathrm{B}} \ge {\mathrm{\Delta }}I(A:B),$$ (2)

where ΔI(A:B) is the change of mutual information between A and B. The mutual information, defined as I(A:B) = S A + S B − S AB ≥ 0, is a measure of the total correlations between two systems23, where S i = −Tr i ρ i ln ρ i is the von Neumann entropy of state ρ i . Equation (2) follows from the unitarity of the global dynamics and the Gibbs form of the initial spin states. For initially uncorrelated spins, the initial mutual information is zero. As a result, it can only increase during thermalization, ΔI(A:B) ≥ 0. Noting that Q A + Q B = 0 for the isolated bipartite system, we find9,10,11,

$$Q_{\mathrm{B}}\left( {\beta _{\mathrm{B}} - \beta _{\mathrm{A}}} \right) \ge 0\quad {\mathrm{(uncorrelated)}}.$$ (3)

Heat hence flows from the hot to the cold spin, Q B > 0 if T A ≥ T B . This is the standard second law. By contrast, for initially correlated qubits, the mutual information may decrease during the thermal contact between the spins. In that situation, we may have9,10,11,

$$Q_{\mathrm{B}}\left( {\beta _{\mathrm{B}} - \beta _{\mathrm{A}}} \right) \le 0\quad {\mathrm{(correlated)}}.$$ (4)

Heat flows in this case from the cold to the hot qubit: the energy current is reversed. We quantitatively characterize the occurrence of such reversal by computing the heat flow at any time τ, obtaining (see the Methods section),

$${\mathrm{\Delta }}\beta Q_{\mathrm{B}} = {\mathrm{\Delta }}I(A:B) + S\left( {\rho _{\mathrm{A}}^\tau \parallel \rho _{\mathrm{A}}^0} \right) + S\left( {\rho _{\mathrm{B}}^\tau \parallel \rho _{\mathrm{B}}^0} \right),$$ (5)

where Δβ = β B − β A ≥ 0 and \(S\left( {\rho _i^\tau \parallel \rho _i} \right) = {\mathrm{Tr}}_i\,\rho _i^\tau \left( {{\mathrm{ln}}\,\rho _i^\tau - {\mathrm{ln}}\,\rho _i} \right) \ge 0\) denotes the relative entropy23 between the evolved \(\rho _{{\mathrm{A(B)}}}^\tau = {\mathrm{Tr}}_{{\mathrm{B(A)}}}{\cal{U}}_\tau \rho _{{\mathrm{AB}}}^0{\cal{U}}_\tau ^\dagger\) and the initial \(\rho _{{\mathrm{A(B)}}}^0\) reduced states. The latter quantifies the entropic distance between the state at time τ and the initial thermal state. It can be interpreted as the entropy production associated with the irreversible heat transfer, or to the entropy produced during the ensuing relaxation to the initial thermal state32,33. According to Eq. (5), the direction of the energy current is therefore reversed whenever the decrease of mutual information compensates the entropy production. The fact that initial correlations may be used to decrease entropy has first been emphasized by Lloyd34 and further investigated in refs. 35,36. Heat flow reversal has recently been interpreted as a refrigeration process driven by the work potential stored in the correlations12. In that context, Eq. (5) can be seen as a generalized Clausius inequality due to the positivity of the relative entropies. The coefficient of performance of such a refrigeration is then at most that of Carnot12.

In our experiment, we prepare the two-qubit system in an initial state of the form (1) with effective spin temperatures \(\beta _{\mathrm{A}}^{ - 1} = 4.66 \pm 0.13\) peV (\(\beta _{\mathrm{A}}^{ - 1} = 4.30 \pm 0.11\) peV) and \(\beta _{\mathrm{B}}^{ - 1} = 3.31 \pm 0.08\) peV (\(\beta _{\mathrm{B}}^{ - 1} = 3.66 \pm 0.09\) peV) for the uncorrelated (correlated) case \(\alpha = 0.00 \pm 0.01\) (\(\alpha = - 0.19 \pm 0.01\)) (Supplementary Information). The value of α was chosen to maximize the current reversal. In order to quantify the quantumness of the initial correlation in the correlated case, we consider the normalized geometric discord, defined as \(D_{\mathrm{g}} = {\mathrm{min}}_{\psi \in {\cal{C}}}2\left\| {\rho - \psi } \right\|^2\), where \({\cal{C}}\) is the set of all states classically correlated24,25. The geometric discord has a simple closed-form expression for two qubits that can be directly evaluated from the measured QST data (Supplementary Information). We find the nonzero value D g = 0.14 ± 0.01 for the initially correlated state prepared in the experiment.

We experimentally reconstruct the global two-qubit density operator using quantum-state tomography21 and evaluate the changes of internal energies of each qubit, of mutual information, and of geometric quantum discord during thermal contact (Fig. 2a–f). We observe the standard second law in the absence of initial correlations (\(\alpha \simeq 0\)), i.e., the hot qubit A cools down, Q A < 0, while the cold qubit B heats up, Q B > 0 (circles symbols in Fig. 2a, b). At the same time, the mutual information and the geometric quantum discord increase, as correlations build up following the thermal interaction (circles symbols in Fig. 2c, d). The situation changes dramatically in the presence of initial quantum correlations (α ≠ 0): the energy current is here reversed in the time interval 0 < τ < 2.1 ms, as heat flows from the cold to the hot spin, Q A = −Q B > 0 (squares symbols in Fig. 2a, b). This reversal is accompanied by a decrease of mutual information and geometric quantum discord (squares symbols in Fig. 2c, d). In this case, quantum correlations are converted into energy and used to switch the direction of the heat flow, in an apparent violation of the second law. Correlations reach their minimum at around τ ≈ 1.05 ms, after which they build up again. Once they have passed their initial value at τ ≈ 2.1 ms, energy is transferred in the expected direction, from hot to cold. In all cases, we obtain good agreement between experimental data (symbols) and theoretical simulations (dashed lines). Small discrepancies seen as time increases are mainly due to inhomogeneities in the control fields.

Fig. 2 Dynamics of heat, correlations, and entropic quantities. a Internal energy of qubit A along the partial thermalization process. b Internal energy of qubit B. In the absence of initial correlations, the hot qubit A cools down and the cold qubit B heats up (cyan circles in panel a and b). By contrast, in the presence of initial quantum correlations, the heat current is reversed as the hot qubit A gains and the cold qubit B loses energy (orange squares in panel a and b). This reversal is made possible by a decrease of the mutual information c and of the geometric quantum discord d. Different entropic contributions to the heat current (5) in the uncorrelated e and uncorrelated f case. Reversal occurs when the negative variation of the mutual information, ΔI(A:B), compensates the positive entropy productions, \(S\left( {\rho _{\mathrm{A}}^\tau \parallel \rho _{\mathrm{A}}} \right)\) and \(S\left( {\rho _{\mathrm{B}}^\tau \parallel \rho _{\mathrm{B}}} \right)\), of the respective qubits. The symbols represent experimental data and the dashed lines are numerical simulations. Error bars were estimated by a Monte Carlo sampling from the standard deviation of the measured data (Supplementary Information) Full size image

The experimental investigation of Eq. (5) as a function of the thermalization time is presented in Fig. 2e, f. While the relative entropies steadily grow in the absence of initial correlations, they exhibit an increase up to 1.05 ms followed by a decrease in presence of initial correlations. The latter behavior reflects the pattern of the qubits already seen in Fig. 2a, b, for the average energies. We note, in addition, a positive variation of the mutual information in the uncorrelated case and a large negative variation in the correlated case. The latter offsets the increase of the relative entropies and enables the reversal of the heat current. These findings provide direct experimental evidence for the trading of quantum mutual information and entropy production.