# Experimental demonstration of information to energy conversion in a quantum system at the Landauer limit

## Abstract

Landauer’s principle sets fundamental thermodynamical constraints for classical and quantum information processing, thus affecting not only various branches of physics, but also of computer science and engineering. Despite its importance, this principle was only recently experimentally considered for classical systems. Here we employ a nuclear magnetic resonance set-up to experimentally address the information to energy conversion in a quantum system. Specifically, we consider a three nuclear spins $S=\frac{1}{2}$ (qubits) molecule—the system, the reservoir and the ancilla—to measure the heat dissipated during the implementation of a global system–reservoir unitary interaction that changes the information content of the system. By employing an interferometric technique, we were able to reconstruct the heat distribution associated with the unitary interaction. Then, through quantum state tomography, we measured the relative change in the entropy of the system. In this way, we were able to verify that an operation that changes the information content of the system must necessarily generate heat in the reservoir, exactly as predicted by Landauer’s principle. The scheme presented here allows for the detailed study of irreversible entropy production in quantum information processors.

### 1. Introduction

In 1961, Landauer [1] demonstrated a revolutionary principle that provided a definitive link between the information theory and thermodynamics. Landauer’s principle states that in any irreversible computation there is an unavoidable entropy production, manifested as heat, which is dissipated to the non-information bearing degrees of freedom of the computer. Landauer discovered that this dissipated heat is bounded, from below, by the information theoretical entropy change. Some years later, Bennett [2] and independently, Penrose [3] used this principle to explain how to solve the long-standing Maxwell’s demon problem in thermodynamics. The demon as first conceived by Maxwell [4], and named by Kelvin [5], has had an infamous and often controversial history that spans the entire development of statistical mechanics [6–8]. Controversies and philosophical issues aside, both the demon and Landauer’s principle have, at their core, simple but pragmatic applications. Landauer’s principle sets fundamental thermodynamic constraints for (classical and quantum) information processing.

Almost half a century has passed, and the Landauer limit has finally been reached in several experiments on classical platforms [9–13]. This delay is due to the fundamental difficulty of dealing with systems containing only a few degrees of freedom, where the fluctuations about average behaviour are dominant. For these systems, the concept of large numbers and hence any notion of thermodynamic equilibrium does not hold. However, for the past 20 years, we have seen a rapid progress in non-equilibrium statistical mechanics with the development of stochastic thermodynamics [14] and the associated discovery of various fluctuation theorems [15]. Within this framework, thermodynamic quantities such as heat, work and entropy now become stochastic variables described by appropriate probability distributions over individual phase space trajectories. This approach not only allows physicists to explore the ultimate thermodynamic limits of microscopic systems, but also their information processing capabilities [9–13].

Turning towards quantum systems [16,17], a picture of non-equilibrium thermodynamics has also emerged with thermodynamic quantities such as heat, work and entropy, being formulated as stochastic variables [18,19]. As expected, in the quantum domain, the situation is even harder. The absence of a phase space picture owing to intrinsic quantum uncertainty aside, one also has to cope with the necessity of performing invasive projective measurements on to a time-dependent energy eigenbasis [20]. Until recently, this restrictive necessity has hindered experimental advances in studying the non-equilibrium thermodynamics of quantum systems. However, recent proposals have outlined that the quantum work distribution may be extracted without the need to perform these direct measurements in favour of implementing phase estimation of an appropriately coupled ancilla [21,22], which samples the characteristic function of the distribution of the thermodynamic quantity. These schemes were recently implemented experimentally and allowed for the first verification of the quantum work fluctuation relations on a nuclear magnetic resonance (NMR) system [23].

In this work, we used an NMR set-up to measure the heat dissipated in elementary quantum logic gates at the Landauer limit. Specifically, we consider a three qubit sample—the system, the reservoir and the ancilla—in order to measure the heat dissipated during the implementation of a global system—reservoir unitary that changes the information content of the system. We do this in two independent steps. First, by employing an interferometric technique, using the ancilla, we were able to reconstruct the heat distribution associated with the unitary process. Second, through quantum state tomography, we measure the change in the entropy of the system. In this way, we were able to verify that an operation that changes the information content of the system must necessarily generate heat in the reservoir, exactly as predicted by Landauer’s principle. The protocol used in this work allows the detailed study of irreversible entropy production in quantum information processors.

### 2. Landauer processes and heat statistics

Imagine a quantum system $\mathcal{S}$ in state ${\hat{\rho}}_{\mathcal{S}}$ containing some information that we want to erase. We can then send the system through an erasure machine that reduces the amount of information in the system. Landauer’s principle relates the heat generated in the erasure machine to the change in the information entropy of the system. This relationship holds as

**Q**〉 is the average heat dissipated to the reservoir and Δ

**S**=

**S**

_{i}−

**S**

_{f}is the change of von Neumann entropy. The von Neumann entropy is a measure of the information contained in a quantum state ${\hat{\rho}}_{\mathcal{S}}$ as $\mathbf{\text{S}}(\hat{\rho})=-\mathrm{tr}[\hat{\rho}\mathrm{log}(\hat{\rho})]$. We will formally define

**Q**below.

The erasure machine performs a generalized quantum operation on $\mathcal{S}$, thus it can be represented by a completely positive trace preserving (CPTP) map. Any CPTP map can be seen as contraction of unitary dynamics of $\mathcal{S}$ along with a reservoir $\mathcal{R}$ [24]. Recently, Reeb & Wolf have shown that equation (2.1) holds for processes satisfying the following criteria [25]: (i) the process involves a system $\mathcal{S}$ and a reservoir $\mathcal{R}$; (ii) the initial $\mathcal{R}\mathcal{S}$ state is uncorrelated, i.e. ${\hat{\rho}}_{\mathcal{R}\mathcal{S}}={\hat{\rho}}_{\mathcal{S}}\otimes {\hat{\rho}}_{\mathcal{R}}$; (iii) the reservoir $\mathcal{R}$ is initially in the Gibbs state ${\hat{\rho}}_{\mathcal{R}}=\mathrm{exp}\{-\beta {\hat{H}}_{\mathcal{R}}\}/{\mathcal{Z}}_{\mathcal{R}}$, with Hamiltonian ${\hat{H}}_{\mathcal{R}}=\sum _{m}{E}_{m}|{r}_{m}\u27e9\u27e8{r}_{m}|$, inverse temperature *β*^{−1}=*k*_{B}*T*^{1} and partition function ${\mathcal{Z}}_{\mathcal{R}}=\mathrm{tr}[\mathrm{exp}\{-\beta {\hat{H}}_{\mathcal{R}}\}]$; and (iv) the interaction between $\mathcal{S}$ and $\mathcal{R}$ is unitary: ${\hat{\rho}}_{\mathcal{R}\mathcal{S}}^{\prime}=\hat{U}{\hat{\rho}}_{\mathcal{R}\mathcal{S}}{\hat{U}}^{\u2020}$.

Relaxing any of these four criteria can lead to violations of equation (2.1). Thus, we call processes satisfying the four criteria above as *Landauer processes*. The resultant dynamics on the system or the reservoir alone is non-unitary. This is responsible for generating heat in $\mathcal{R}$ at the expense of changing the entropy of $\mathcal{S}$. The change in entropy of $\mathcal{S}$ can be computed by calculating the entropies of ${\hat{\rho}}_{\mathcal{S}}$ and ${\hat{\rho}}_{\mathcal{S}}^{\prime}$. While the average heat on the reservoir is given as

Moreover, **Q** is a stochastic variable. That is, in a given run the reservoir may be in state |*r*_{m}〉, which has energy *E*_{m}, with probability ${p}_{m}=\mathrm{exp}\{-\beta {\hat{E}}_{m}\}/{\mathcal{Z}}_{\mathcal{R}}$. After the process, we may find the reservoir in state |*r*_{n}〉 with energy *E*_{n}. The probability for finding $\mathcal{R}$ in state |*r*_{n}〉 is given by

*r*

_{n}〉. Then, with probability

*p*

_{n|m}

*p*

_{m}, the reservoir has

*E*

_{n}−

*E*

_{m}heat generation. These probabilities give us a distribution for the heat [26,27]

If we can measure the entire heat distribution, we can measure the average heat. However, owing to the invasive nature of projective measurements, it is generally not easy to measure the heat distribution, rather we measure its corresponding characteristic function, *Θ*(*t*), calculated by Fourier transform to be

In order to measure *Θ*(*t*), we implemented the circuit shown in figure 1. In this method, we have used an ancillary qubit (labelled as $\mathcal{A}$) in the superposition state $|+\u27e9=(|0\u27e9+|1\u27e9)/\sqrt{2}$. The implementation of unitary operations ${\hat{v}}_{t}$ and ${\hat{v}}_{t}^{\u2020}$ is controlled by the state of $\mathcal{A}$; the operations are applied when $\mathcal{A}$ is in state |1〉 and not applied when the state is |0〉. Between the two controlled operations, the system and the reservoir interact via $\hat{U}$. The expectation values for observable ${\hat{\sigma}}_{x}$ and ${\hat{\sigma}}_{y}$ on $\mathcal{A}$ are directly related to the characteristic function $\mathit{\Theta}(t)={\u27e8{\hat{\sigma}}_{x}(t)\u27e9}_{\mathcal{A}}-\mathrm{i}{\u27e8{\hat{\sigma}}_{y}(t)\u27e9}_{\mathcal{A}}$. In other words, we employed an interferometric technique to map the information about the characteristic function of the desired heat distribution, or the Fourier transform of it, on the state of the ancilla [21,22,28]. Next, we present our experimental set-up to observe the information to energy conversion of basic quantum logic gates that can be studied in the quantum domain using an NMR system.

### 3. Experimental set-up

In a pulsed NMR experiment, a transient signal, called free induction decay (FID) is detected in a pick-up coil, following the application of a sequence of radiofrequency pulses. After amplification, this signal is digitized and filtered, before exhibition in a control monitor. The Fourier transform of the FID is the NMR spectrum. The total sample magnetization is proportional to the spectral area, being the proportionality factor dependent on only the electronic circuitry details and resonance frequencies [29]. In the great majority of NMR experiments, however, the detected signal amplitude is understood to be relative to a reference signal, usually the equilibrium state, and the electronic factor can be neglected. This is the case of the present experiment.

#### (a) The system

Our experiments were performed using a Varian 500 MHz spectrometer with a double resonance probe-head equipped with a magnetic field gradient coil, at room temperature. The sample consists of trifluoroiodoethylene (C_{2}F_{3}I) molecules dissolved in acetone D_{6} (97%), whose three ^{19}*F* nuclear spins (spin-$\frac{1}{2}$) represent our qubits (the system, the reservoir and the ancilla). The Hamiltonian of our system is given by the Ising model

*z*-direction for

*j*th spin (${\sigma}_{z}^{j}$ is the Pauli matrix) whose Larmor frequency is

*ω*

_{j}. The summations run over the three qubits named: the ancilla $\mathcal{A}$, the system $\mathcal{S}$ and the reservoir $\mathcal{R}$. The last term of the Hamiltonian

*ω*(

*t*) and

*ω*

_{rf}. The physical parameters of our molecule (relaxation times, natural and interaction frequencies) are shown in figure 2.

#### (b) Initial state preparation

In liquid state NMR set-up, the system is initially prepared in the so-called pseudo-pure state ${\hat{\rho}}_{\mathrm{PPS}}=(1-\epsilon )\hat{\U0001d7d9}/8+\epsilon \hat{\rho}$ instead of $\hat{\rho}$, where $\mathrm{\U0001d7d9}$ is the identity operator on $\mathcal{A}\mathcal{R}\mathcal{S}$ space and *ε*∼10^{−5} is the ratio between the magnetic and the thermal energy [30,31]. Our first goal is to initialize the experiment by preparing ${\hat{\rho}}_{\mathrm{PPS}}$ into the following state

*α*being the rotation angle defined in figure 3. Comparing this with the definition of the density matrix of a system in thermal equilibrium at finite inverse temperature

*β*, one can obtain a relation between the temperature and the rotation angle

*α*with the reservoir temperature

*α*from 0 to

*π*/2. It is important to observe here that this does not correspond to the room temperature, being instead a controlled property of our system that we identify with the temperature of $\mathcal{R}$ by the identification of its state with the Gibbs one, and we can vary this parameter as desired. The system will remain at this temperature for the duration of the experiment if it does not interact with other qubits. Finally, the system, $\mathcal{S}$, is prepared in the maximally mixed state which represents the situation in which it contains one bit of information, thus acting as a memory. Different choices for the system would simply give a different amount of entropy variation and heat dissipated, but the validity of the Landauer’s principle is independent of this choice.

#### (c) The unitary operations

Unitary operations are implemented by the application of controlled radio frequency pulses, as shown in equation (3.1). Here we investigate the Landauer principle considering two distinct processes: (i) the partial swap, denoted by ${\hat{U}}_{\mathrm{PS}}(\phi )$ (figure 4) and (ii) the controlled-not, denoted by ${\hat{U}}_{\mathrm{CN}}$ (see equation (3.9)). The validity of Landauer’s principle is completely independent of the choice of these particular operations. Our choice is motivated by the fact that the Cnot gate is one of the most employed gates in quantum computation, whereas the swap operation mimics the paradigmatic erasure process, usually considered when discussing Landauer’s principle and Maxwell’s demons. The goal of the next two sections is to describe the experimental implementations of these operations.

##### (i) Partial swap operations

We call partial swap the process that continuously interpolates (controlled by the parameter *φ*; figure 4) between the identity operation and the total swap, passing by the square root of swap, which can be represented, in the computational basis, by the matrices

*φ*={

*π*/6,

*π*/3,

*π*/2,3

*π*/2,5

*π*/6,

*π*}, whose pulse sequences are shown in figure 4. The value

*φ*=0 is the identity operation, whereas the complete swap is implemented by

*φ*=

*π*. This last case represents the complete erasure of the information initially contained in the system, because, after the process, the system ends in the thermal equilibrium state. All other cases can be interpreted as a partial erasure of the system information content.

The main goal of the pulse sequence shown in figure 4 is to implement a Heinsenberg Hamiltonian between the reservoir and the system, given by

*τ*and the rotation angle

*φ*appearing in figure 4 is given by $\phi =2\pi {J}_{\mathcal{R}\mathcal{S}}\tau $, with ${J}_{\mathcal{R}\mathcal{S}}=47.65\hspace{0.17em}\mathrm{Hz}$ in our experiment (figure 2).

We then vary *τ* from *τ*=0 (the identity operation) to $\tau =1/2{J}_{\mathcal{R}\mathcal{S}}$, which implements the complete swap. It is important to note here that undesired rotations—the two first terms in equation (3.7)—around the *z*-axis are present in our system, but fortunately, they can be compensated using the techniques described in reference [32] (see appendix).

##### (ii) Controlled-not operation

The controlled-not gate, which can be represented by the matrix

*i*th qubit about direction

*k*by an angle

*α*, whereas ${\hat{U}}_{0}$ represents a free evolution, i.e. an evolution generated by Hamiltonian equation (3.1) without the radiofrequency part.

##### (iii) Controlled-*v*_{t} operation

The controlled-${\hat{v}}_{t}$ operation, see figure 1 and equation (2.5), is implemented by letting all of the qubits freely evolve during a time *t*/2 followed by a *π* pulse in the *x*-direction on the system qubit and by another free evolution for *t*/2. The *π* pulse is necessary to effectively protect the system qubit, whereas the desired controlled operation is applied in the other two qubits. For the ${\hat{v}}_{t}^{\u2020}(t),$ we apply a *π*/2 pulse in the *y*-direction on the ancilla qubit, a *t*/2 free evolution, a *π* pulse in the *x*-direction on the system qubit, followed by another *t*/2 free evolution.

#### (d) Measuring the heat distribution and the entropy change

Our experiment is divided into two parts. First, we measure the characteristic function, defined in equation (2.5), by a direct measurement on $\mathcal{A}$ while varying the reservoir free evolution time *t* as described in the previous section. These gives us the expectation values of ${\hat{\sigma}}_{x}$ and ${\hat{\sigma}}_{y}$, which are shown in figure 5*a*, as a function of time, in one run of the circuit. By computing the discrete inverse Fourier transform of the acquired data for the characteristic function, we attain the corresponding heat distributions, from which we can compute the average dissipated heat, i.e. the left-hand side of equation (2.1).

In the second part of the experiment, we perform state tomography on $\mathcal{S}$ in order to determine the (average) change in the entropy of the system. See [33] for details on performing quantum state tomography in NMR. From the quantum state tomography data, we obtain the quantities appearing in the right-hand side of equation (2.1), which characterizes the change in information content of the system. In this way, we can independently measure both sides of equation (2.1), thus verifying Landauer’s principle. The results of the experiments are described in the following.

### 4. Results

We have performed two sets of experiments varying the interaction between the system and the environment (the process), one using a Cnot gate and another one employing the swap. In the next two sections, we present the data and corresponding results.

#### (a) Cnot gate

We performed several experiments where the controlled-not gate is taken to be the interaction between $\mathcal{S}$ and $\mathcal{R}$. We take $\mathcal{S}$ to be the control qubit and $\mathcal{R}$ to be the target qubit. In these experiments, we vary the temperature of the reservoir, and the results are shown in table 1. As we can see, the measured irreversible entropy production and heat dissipated are in agreement within the errors, confirming Landauer’s principle as stated in equation (2.1).

${(\beta \hslash )}^{-1}$ (Hz) | 〈Σ〉(exp.) |
β〈Q〉(exp.) |
Γ(theor.) |
---|---|---|---|

123 | 3.2 (2) | 3.3 (2) | 3.3 |

185 | 2.1 (1) | 2.1 (1) | 2.1 |

227 | 1.64 (8) | 1.66 (8) | 1.67 |

274 | 1.30 (6) | 1.32 (7) | 1.32 |

324 | 1.03 (5) | 1.04 (5) | 1.05 |

383 | 0.80 (4) | 0.82 (4) | 0.82 |

458 | 0.61 (3) | 0.62 (3) | 0.63 |

550 | 0.45 (2) | 0.45 (2) | 0.46 |

678 | 0.31 (2) | 0.31 (2) | 0.32 |

862 | 0.20 (1) | 0.20 (1) | 0.20 |

1168 | 0.113 (6) | 0.114 (6) | 0.114 |

1775 | 0.050 (2) | 0.052 (3) | 0.051 |

3573 | 0.0128 (6) | 0.0171 (9) | 0.0126 |

Figure 5*a* shows an example of the experimental characteristic function, whereas in figure 5*b,* we can see examples of the heat distribution at different values of *β*. The central peak at **Q**=0, in the heat distribution, corresponds to the cases where the energy eigenstate does not change, whereas **Q**>0 means a transition from low-energy state to high-energy state has occurred, and **Q**<0 represents the reverse situation. For this particular gate, it is straightforward to see that the theoretical entropy change is Δ**S**=0. However, as it is clearly shown, there are instances where **Q**<0, seemingly in violation with the Landauer principle. Reinforcing the statistical concept of the second law, these events are fluctuations and the stochastic nature of the thermodynamic variables in this domain is emphasized. As we can see, although there is a probability to observe a transient *violation* of Landauer’s bound in the quantum domain, the *average* heat is greater than the entropy variation, reinforcing the view that Landauer’s principle (as well as the second law) are valid on average, but not necessarily for a single realization of a specific experiment. In what follows, we now use the average value to explore the heat dissipated for information processing at the ultimate limit.

#### (b) swap case—exploring the Landauer limit

In order to reach the Landauer limit, we have used the partial swap operation, as described earlier. Figure 6*a* shows the average dissipated heat versus the theoretically computed entropy variation for increasing strength of the process. The case of *φ*=*π* operation that can be seen as the paradigmatic example of the erasure protocol, because the final state of $\mathcal{S}$ is the initial (thermal) state of $\mathcal{R}$, irrespective of the initial state of $\mathcal{S}$. In all cases, we confirm that the Landauer principle holds. The feature of figure 6*a* which initially strikes us is the discrepancy between experiment and theory. This difference is understood as being due to the fundamental irreversible entropy production owing to the finite size reservoir.

It has been shown by Esposito *et al.* [34,35] that the average irreversible entropy production 〈*Σ*〉 can be computed as

*β*〈

**Q**〉=Δ

**S**. It is important to point out that the positivity of the average entropic contribution 〈

*Σ*〉 was used recently by Reeb and Wolf in order to provide finite size corrections to the Landauer bound [25]. In figure 6

*b,*we plot the experimentally measured 〈

*Σ*〉 appearing in the right-hand side of the last equation along with the theoretically computed quantity. The agreement between experiment and theory here confirms that we have measured the heat dissipated by an elementary quantum logic gate at the ultimate limit.

### 5. Conclusion

In this work, we have used a modified phase estimation scheme for the extraction of heat statistics from elementary quantum logic gates which were implemented in an NMR experimental set-up. The experimental acquisition of the heat statistics allowed us to extract the average heat dissipated during a process at the ultimate limit, set by the Landauer’s principle. Although for the purpose of demonstration we have focused on specific gate implementations, the scheme is sufficiently general to explore entropy production in a range of gate operations and elementary circuits which are central to the theory of quantum information. We believe that the experiments reported in this work will open an avenue for further pioneering experiments on the thermodynamics of systems at the fundamental quantum limit.

### Data accessibility

Experimental data for all the experiments were submitted together with the article.

### Authors' contributions

All the authors contributed to the design of the experiment, statistical and theoretical analysis of the data, and helped draft the manuscript. All the authors gave final approval for publication.

### Competing interests

We have no competing interests.

### Funding

This work was partially supported by the COST Action MP1209. Financial support from the Brazilian funding agencies CNPq, CAPES and the Brazilian National Institute of Science and Technology of Quantum Information (INCT/IQ) are also acknowledged.

## Appendix A. Error analysis

To implement single-spin operations, we exploit standard Isech-shaped pulses as well as numerically optimized GRAPE pulses [36]. The GRAPE pulses are optimized to be robust to radiofrequency (r.f.) inhomogeneities and chemical shift variations. Two qubit operations were implemented by interleaving free evolutions periods with selective *π* pulses, introduced into the sequences in order to refocalize unwanted evolutions owing to the coupling between the spins during the gate implementation.

For combining all operations into a single pulse sequence, we have used the techniques described in [32,37] for Ising coupled system. A computer program was built, similar to the NMR quantum compiler used in the seven qubits NMR experiments [38–40]. The input of this program is the desired unitary transformation, the internal Hamiltonian and predefined shaped pulses. All pulses are then combined together ensuring that the errors do not propagate as the sequence progresses. The program is capable of minimizing the effects of unwanted coupling evolutions and off-resonance errors as well (see equation (3.7)).

**(a) Errors in the pulses**

There are two main error sources here, the signal acquisition (reading) and the duration of each pulse (which is not exactly equal to the planned one). Both these errors were extensively studied in [29]. Assuming that both errors are independent, it was estimated the combined result of approx. 1% on the measurement of the spins magnetization. However, in order to work with mononuclear systems, shaped pulses are necessary. This improves the precision of the required operations, but increases the duration of the pulses, which contributes to the decoherence processes (see below).

**(b) Errors in the entropies**

The experimental procedure to determine the entropies requires a smaller amount of pulses (owing to the lack of the ${\hat{v}}_{t}$ operation, which also makes it faster). Therefore, the errors in the entropies are much smaller than the ones in the heat distribution.

The experimental states were reconstructed by quantum state tomography [33] and the fidelity obtained was, in the worst case, 7%. The precision of the whole process can be estimated by comparing the fidelities of the measured density matrices and the theoretically calculated ones. For the tested cases, we have determined that it was between 2% (fidelity of approx. 0.98) and 7% (fidelity of approx. 0.93), at most. From this, it was possible to estimate, through standard statistical methods, the error bars for the entropies determined on the experiments reported on this paper.

**(c) Errors in the heat**

The errors in the heat distribution are caused mainly by two sources. The first one is decoherence, which is discussed below. The second one, much more seriously because we cannot correct it, is due to the numerical computation of the inverse Fourier transform of the acquired data. For the determination of the characteristic function only one qubit is measured, which is equivalent to the measurement of the nuclear spin magnetization. This measurement can be achieved with high precision in NMR systems. The error bar for the experimental determination of the average heat was estimated from the standard deviation of the measured points for the characteristic function. Then, we have used standard error propagation for calculating the error bars. In some cases, the oscillations of characteristic function over time are small when compared with the average of *Θ*(*t*), over time. When this happens, we have a larger uncertainty.

**(d) Decoherence**

The data acquisition time for the swap case varies appreciably, reaching around 150 ms. This is relatively long when compared with the transversal relaxation time for our sample (figure 2). Therefore, the signal lost owing to decoherence is considerable, and we need to take it into account. To do this, we performed numerical simulations of the experiment considering the action of local phase damping channels, which is a very good model for the kind of noise we have [24]. This noise will cause an exponential decay in the oscillations of the magnetization, whose inverse Fourier transform will give us the heat distribution. The small discrepancies between the simulation and the experiment are mainly due to unwanted couplings not refocused and the inhomogeneity of the radiofrequency fields. The net effect was to produce a constant shift in the data both for the heat distribution and for the entropies. We then employed this analysis to correct the final data for signal loss, leading us to the results presented in this work. The controlled-not gates are much faster, and the signal loss was not significant. The spin-lattice relaxation, which is characterized by *T*_{1}, causes no appreciable effect during the experiment for both gates.

Therefore, the high level of precision of our set-up guarantees that the experimentally implemented operations (Cnot and swap gates) are very close to the ideal ones, as also confirmed by the excellent agreement between experiment and theory observed here.

## Footnotes

### References

- 1
Landauer R . 1961 Irreversibility and heat generation in the computing process.**IBM J. Res. Dev.**, 183–191. (doi:10.1147/rd.53.0183) Crossref, Web of Science, Google Scholar**5** - 2
Bennett CH . 1973 Logical reversibility of computation.**IBM J. Res. Dev.**, 525–532. (doi:10.1147/rd.176.0525) Crossref, Web of Science, Google Scholar**17** - 3
Penrose O . 1970**Foundations of statistical mechanics: a deductive treatment**. New York, NY: Pergamon. Google Scholar - 4
- 5
Thompson W . 1874 Kinetic theory of the dissipation of energy.**Nature**, 441–444. (doi:10.1038/009441c0) Crossref, Google Scholar**9** - 6
Szilárd L . 1929 Über die entropieverminderung in einem thermodynamischen system bei eingriffen intelligenter wesen.**Z. Phys.**, 840–856. (doi:10.1007/BF01341281) Crossref, Google Scholar**53** - 7
Leff HS, Rex AR . 2003**Maxwell’s demon 2: entropy, classical and quantum information, computing**. London, UK: Institute of Physics. Google Scholar - 8
Manuyama K, Nori F, Vedral V . 2009 Colloquium: the physics of Maxwell’s demon and information.**Rev. Mod. Phys.**, 1–23. (doi:10.1103/RevModPhys.81.1) Crossref, Web of Science, Google Scholar**81** - 9
Orlov AO, Lent CS, Thorpe CC, Boechler GP, Snider GL . 2012 Experimental test of Landauer’s principle at the sub-*k*_{B}*T*level.**Jpn J. Appl. Phys.**, 06FE10. (doi:10.7567/JJAP.51.06FE10) Crossref, Web of Science, Google Scholar**51** - 10
Toyabe S, Sagawa T, Ueda M, Muneyuki E, Sano M . 2010 Experimental demonstration of information-to-energy conversion and validation of the generalized Jarzynski equality.**Nat. Phys.**, 988–992. (doi:10.1038/nphys1821) Crossref, Web of Science, Google Scholar**6** - 11
Bérut A, Arakelyan A, Petrosyan A, Ciliberto S, Dillenschneider R, Lutz E . 2012 Experimental verification of Landauer’s principle linking information and thermodynamics.**Nature**, 187–189. (doi:10.1038/nature10872) Crossref, PubMed, Web of Science, Google Scholar**483** - 12
Koski JV, Maisi VF, Pekola JP, Averin DV . 2014 Experimental realization of a Szilard engine with a single electron.**Proc. Natl Acad. Sci. USA**, 13 786–13 789. (doi:10.1073/pnas.1406966111) Crossref, Web of Science, Google Scholar**111** - 13
Jun Y, Gavrilov M, Bechhoefer J . 2014 High-precision test of Landauer’s principle in a feedback trap.**Phys. Rev. Lett.**, 190601. (doi:10.1103/PhysRevLett.113.190601) Crossref, PubMed, Web of Science, Google Scholar**113** - 14
- 15
Seifert U . 2012 Stochastic thermodynamics, fluctuation theorems and molecular machines.**Rep. Prog. Phys.**, 126001. (doi:10.1088/0034-4885/75/12/126001) Crossref, PubMed, Web of Science, Google Scholar**75** - 16
Goold J, Huber M, Riera A, del Rio L, Skrzypczyk P . 2015 The role of quantum information in thermodynamics—a topical review. (http://arxiv.org/abs/1505.07835) Google Scholar - 17
Vinjanampathy S, Anders J . 2015 Quantum thermodynamics. (http://arxiv.org/abs/1508.06099) Google Scholar - 18
Esposito M, Harbola U, Mukamel S . 2009 Nonequilibrium fluctuations, fluctuation theorems, and counting statistics in quantum systems.**Rev. Mod. Phys.**, 1665–1702. (doi:10.1103/RevModPhys.81.1665) Crossref, Web of Science, Google Scholar**81** - 19
Campisi M, Hänggi P, Talkner P . 2011 Colloquium: quantum fluctuation relations: foundations and applications.**Rev. Mod. Phys.**, 771–791. (doi:10.1103/RevModPhys.83.771) Crossref, Web of Science, Google Scholar**83** - 20
Talkner P, Lutz E, Hänggi P . 2007 Fluctuation theorems: work is not an observable.**Phys. Rev. E**, 050102. (doi:10.1103/PhysRevE.75.050102) Crossref, Web of Science, Google Scholar**75** - 21
Dorner R, Clark SR, Heaney L, Fazio R, Goold J, Vedral V . 2013 Extracting quantum work statistics and fluctuation theorems by single-qubit interferometry.**Phys. Rev. Lett.**, 230601. (doi:10.1103/PhysRevLett.110.230601) Crossref, PubMed, Web of Science, Google Scholar**110** - 22
Mazzola L, De Chiara G, Paternostro M . 2013 Measuring the characteristic function of the work distribution.**Phys. Rev. Lett.**, 230602. (doi:10.1103/PhysRevLett.110.230602) Crossref, PubMed, Web of Science, Google Scholar**110** - 23
Batalhão TB *et al.*2014 Experimental reconstruction of work distribution and study of fluctuation relations in a closed quantum system.**Phys. Rev. Lett.**, 140601. (doi:10.1103/PhysRevLett.113.140601) Crossref, PubMed, Web of Science, Google Scholar**113** - 24
Nielsen MA, Chuang IL . 2011**Quantum computation and quantum information**. Cambridge, UK: Cambridge University Press. Google Scholar - 25
Reeb D, Wolf MD . 2014 An improved Landauer principle with finite-size corrections.**New J. Phys.**, 103011. (doi:10.1088/1367-2630/16/10/103011) Crossref, Web of Science, Google Scholar**16** - 26
Goold J, Paternostro M, Modi K . 2015 Non-equilibrium quantum Landauer principle.**Phys. Rev. Lett.**, 060602. (doi:10.1103/PhysRevLett.114.060602) Crossref, PubMed, Web of Science, Google Scholar**114** - 27
Taranto P, Pollock FA, Modi K . 2015 Emergence of a fluctuation relation for heat in typical open quantum processes. (http://arxiv.org/abs/1510.08219) Google Scholar - 28
Goold J, Poschinger U, Modi K . 2014 Measuring the heat exchange of a quantum process.**Phys. Rev. E**, 020101(R). (doi:10.1103/PhysRevE.90.020101) Crossref, Web of Science, Google Scholar**90** - 29
Raitz C, Souza AM, Auccaise R, Sarthour RS, Oliveira IS . 2015 Experimental implementation of a nonthermalizing quantum thermometer.**Quantum Inf. Process**., 37–46. (doi:10.1007/s11128-014-0858-z) Crossref, Web of Science, Google Scholar**14** - 30
Gershenfeld N, Chuang I . 1997 Bulk spin-resonance quantum computation.**Science**, 350–356. (doi:10.1126/science.275.5298.350) Crossref, PubMed, Web of Science, Google Scholar**275** - 31
Cory D, Fahmy A, Havel T . 1997 Ensemble quantum computing by NMR spectroscopy.**Proc. Natl Acad. Sci. USA**, 1634–1639. (doi:10.1073/pnas.94.5.1634) Crossref, PubMed, Web of Science, Google Scholar**94** - 32
Ryan CA, Negrevergne C, Laforest M, Knill E, Laflamme R . 2008 Liquid-state nuclear magnetic resonance as a testbed for developing quantum control methods.**Phys. Rev. A**, 012328. (doi:10.1103/PhysRevA.78.012328) Crossref, Web of Science, Google Scholar**78** - 33
Oliveira IS, Bonagamba TJ, Sarthour RS, Freitas JCC, de Azevedo RR . 2007**NMR quantum information processing**. Amsterdam, The Netherlands: Elsevier. Google Scholar - 34
Esposito M, Lindenberg K, van den Broeck C . 2010 Entropy production as correlation between system and reservoir.**New J. Phys.**, 013013. (doi:10.1088/1367-2630/12/1/013013) Crossref, Web of Science, Google Scholar**12** - 35
Esposito M, van den Broeck C . 2011 Second law and Landauer principle far from equilibrium.**Eur. Phys. Lett.**, 40004. (doi:10.1209/0295-5075/95/40004) Crossref, Web of Science, Google Scholar**95** - 36
Khaneja N, Reiss T, Kehlet C, Schulte-Herbrüggen T, Glaser SJ . 2005 Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms.**J Magn. Reson.**, 296–305. (doi:10.1016/j.jmr.2004.11.004) Crossref, PubMed, Web of Science, Google Scholar**172** - 37
Bowdrey MD, Jones JA, Knill E, Laflamme R . 2005 Compiling gate networks on an Ising quantum computer.**Phys. Rev. A**, 032315. (doi:10.1103/PhysRevA.72.032315) Crossref, Web of Science, Google Scholar**72** - 38
Knill E, Laflamme R, Martinez R, Tseng CH . 2000 An algorithmic benchmark for quantum information processing.**Nature**, 368–370. (doi:10.1038/35006012) Crossref, PubMed, Web of Science, Google Scholar**404** - 39
Souza AM, Zhang J, Ryan CA, Laflamme R . 2011 Experimental magic state distillation for fault-tolerant quantum computing.**Nat. Commun.**, 169. (doi:10.1038/ncomms1166) Crossref, PubMed, Web of Science, Google Scholar**2** - 40
Zhang J, Yung MH, Laflamme R, Aspuru-Guzik A, Baugh J . 2012 Digital quantum simulation of the statistical mechanics of a frustrated magnet.**Nat. Commun.**, 880. (doi:10.1038/ncomms1860) Crossref, PubMed, Web of Science, Google Scholar**3**