PHYSICAL REVIEW X 11, 021019 (2021)

Quantum Advantage in Simulating Stochastic Processes

‡ ‡ † Kamil Korzekwa 1,2, ,* and Matteo Lostaglio 3,4, , 1Faculty of Physics, Astronomy and Applied Computer Science, Jagiellonian University, 30-348 Kraków, Poland 2International Centre for Theory of Quantum Technologies, University of Gdańsk, 80-308 Gdańsk, Poland 3ICFO-Institut de Ciencies Fotoniques, The Barcelona Institute of Science and Technology, Castelldefels (Barcelona), 08860, Spain 4QuTech, Delft University of Technology, P.O. Box 5046, 2600 GA Delft, Netherlands

(Received 20 May 2020; revised 5 November 2020; accepted 3 March 2021; published 22 April 2021)

We investigate the problem of simulating classical stochastic processes through quantum dynamics and present three scenarios where memory or time quantum advantages arise. First, by introducing and analyzing a quantum version of the embeddability problem for stochastic matrices, we show that quantum memoryless dynamics can simulate classical processes that necessarily require memory. Second, by extending the notion of space-time cost of a stochastic process P to the quantum domain, we prove an advantage of the quantum cost of simulating P over the classical cost. Third, we demonstrate that the set of classical states accessible via Markovian master equations with quantum controls is larger than the set of those accessible with classical controls, leading, e.g., to a potential advantage in cooling protocols.

DOI: 10.1103/PhysRevX.11.021019 Subject Areas: Quantum Physics, Quantum Information

I. INTRODUCTION used to simulate a stochastic process that classically requires three bits [8]) and theoretically for a certain class A. Memory advantages of Poisson processes [9]. What tasks can we perform more efficiently by employ- Here, we take a complementary approach starting ing quantum properties of nature? And what are the from the following simple observation: Although all funda- quantum resources powering them? These are the central mental interactions are memoryless, the basic information- questions that need to be answered not only to develop processing primitives (such as the bit-swap operation) cannot novel quantum technologies but also to deepen our under- be performed classically in a time-continuous fashion with- standing of the foundations of physics. Over the last few out employing implicit microscopic states that act as a decades, these questions were successfully examined in the memory [10]. We show that this picture changes dramati- context of cryptography [1], computing [2], simulations cally if instead we consider memoryless quantum dynamics. [3], and sensing [4], proving that the quantum features of This difference is due to quantum coherence, arising from nature can indeed be harnessed to our benefit. the superposition principle, which can effectively act as an More recently, an area of active theoretical and exper- internal memory of the system during the evolution. imental interest focused on the memory advantages offered by for the simulation of stochastic B. Classical vs quantum processes in the setting of classical causal models [5–8].An experimentally accessible and relevant measure of such an But what do we really mean when we say that a bit-swap advantage is the dimensionality of the memory required for (or other information-processing tasks) cannot be per- the simulation [8,9]. These dimensional advantages have formed classically in a memoryless way? First, when we been identified experimentally (a qubit system has been speak of a bit, we mean a fundamentally two-level system, i.e., a system with only two microscopic degrees of freedom (e.g., a spin-1=2 particle) and not a macroscopic *[email protected] object with a coarse-grained description having two states † [email protected] (e.g., a piece of iron magnetized along or against the z axis). ‡ These authors contributed equally to this work. Otherwise, if the system merely implements a bit in a higher-dimensional state space of dimension d>2, the Published by the American Physical Society under the terms of internal degrees of freedom can be used as a memory and a the Creative Commons Attribution 4.0 International license. Further distribution of this work must maintain attribution to bit swap can be performed, as illustrated in Fig. 1(a) for the author(s) and the published article’s title, journal citation, d ¼ 3. Thus, when we speak of classical systems, we take and DOI. them to be fundamentally d dimensional, and when we

2160-3308=21=11(2)=021019(20) 021019-1 Published by the American Physical Society KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

information about the past. For classical systems with a continuous phase space, it is then difficult to properly assess the number of memory states used during a given evolution. Hence, in this work, we only focus on discrete systems. Ultimately, we are then interested in a stochastic process in which discrete outputs i are observed for given discrete inputs j. This process is characterized by a matrix of transition probabilities Pijj. In the classical setting, we want to know whether there exists a classical memoryless dynamics (described by a Markovian ) involving these states that outputs Pijj after some time. Quantum mechanically, we are similarly asking whether a quantum memoryless dynamics (described by a Markovian ) can output Pijj after some time. In this work, we highlight that these two questions admit very different answers, both in terms of which Pijj can arise from memoryless processes and in terms of the memory FIG. 1. Space-time cost for classical and quantum bit swap. required to achieve a given P . (a) Space-time optimal realization of a bit swap, i.e., a trans- ijj position between two states (solid-line boxes), using one memory For concreteness, assume Pijj results from a thermal- state (dashed-line boxes) and three time steps. Each time step is ization process, which typically satisfies the so-called composed of a continuous memoryless dynamics that does not detailed balance condition. Physically, we are then asking affect one of the states and maps the remaining two to one of whether the observed Pijj is compatible or not with a process them. (b) In the quantum regime, a bit swap can be performed involving no memory effects, such as information backflows without any memory, simply by a time-continuous unitary from the environment [11]. Classically, P originates from σ ijj process expði xtÞ that continuously connects the identity oper- incoherent jumps induced by interacting with the environ- ation at time t ¼ 0 with the bit swap, represented by Pauli x ment (absorbing or emitting energy). Alternatively, we can operator σx, at time t ¼ π=2. During the process, the information about the initial state of the system is preserved in quantum see classical dynamics as the evolution of a quantum coherence. system that undergoes very strong decoherence at all times, so that any nonclassical effects are killed right away. In fact, standard quantum thermalization models speak of memoryless dynamics, we mean probabilistic (weak coupling with a very large thermal bath) can also be jumps between these discrete states occurring at rates understood in this way since they are unable to generate ’ independent of the system s past. Of course, this is just quantum superpositions of energy states. As soon as we the standard setting for classical Markov processes. Then, move away from this semiclassical limit, however, we see for every finite dimension d, there exist processes that that more exotic thermalization processes can generate cannot be performed in a memoryless fashion. P that, classically, would necessarily signal memory This setting should also be contrasted with classical ijj effects but that, quantum mechanically, can emerge from systems with a continuous phase space. The simplest memoryless processes due to quantum coherence. Note example is probably given by an isolated classical pendu- that the term “memoryless” is used throughout the paper lum, i.e., a harmonic oscillator. The state of the system is as a synonym of Markovian, i.e., that the evolution only then given by a point in (more generally, distribution over) depends on the current state of the system and not on its a two-dimensional phase space x; p describing its position ½ history. Such evolution may still require an auxiliary clock x relative to the equilibrium position, and its momentum p. system (used, e.g., to know how much longer the system If we now identify the pendulum’s state −x0; 0 with a bit ½ should be coupled to an external control field) and a state 0 and x0; 0 with a bit state 1, the time evolution of the ½ counter system (used to record the current channel in the system clearly performs a bit-swap operation within half a sequence of channels necessary to implement the given period. However, a pendulum is not a simple two-level dynamics). These constitute extra resources that one may system but rather a system with a continuously infinite want to separately account for, e.g., using the framework number of states. Thus, the bit swap is performed by of quantum clocks (see, e.g., Ref. [12]). employing infinitely many ancillary memory states: ½−x0; 0 evolves through states with x>−x0 and positive C. Summary of results momenta p to ½x0; 0, while ½x0; 0 evolves through states with x

021019-2 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

Second, in Sec. III, we go beyond the simple distinction between stochastic processes that can or cannot be simu- lated without memory, and take a more quantitative approach, thus investigating quantum memory advantages. To this end, we employ the recent formalism of Ref. [10], which allows one to quantify the classical space-time cost of a given stochastic process, i.e., the minimal amount of memory and time steps needed to classically implement a given process. We extend this approach to the quantum domain in order to analyze the quantum space-time cost. An illustrative example is given by the bit-swap process presented in Fig. 1, which, in the classical setting, requires either one memory state and three time steps, or two memory states and two time steps. However, if one allows for quantum evolution, such a bit swap can be performed in a continuous and memoryless fashion through a simple unitary evolution expðiσxtÞ, with σx denoting the Pauli x operator. More generally, the authors of Ref. [10] have FIG. 2. Classical vs quantum memoryless processes. The characterized the space-time cost for the family of f0; 1g- vertices of the triangle correspond to deterministic processes valued stochastic processes (i.e., all discrete functions). (S, stay; C, move clockwise; A, move anticlockwise) for a Their bound shows an unavoidable classical trade-off random walker moving between three states. Points inside the between the number of memory states m and the number triangle correspond to probabilistic mixtures (convex combina- of time steps τ needed to realize a given stochastic process tions) of these three deterministic processes; e.g., the center N d of the triangle corresponds to the maximally mixing dynamics on systems of dimension . Crucially, a typical process (with S, C, and A each happening with probability 1=3). The necessarily requires extra resources, meaning that either m orange petal-shaped region contains all stochastic processes that or τ is exponential in N. In this paper, we prove that in can arise from time-continuous, memoryless, classical dynamics. the quantum regime, all such processes can be simulated For time-continuous, memoryless, quantum dynamics, this set is with zero memory states and in, at most, two time steps, enlarged by the remaining shaded region in blue. For details, see demonstrating an advantage over the best-possible classical Sec. II C and, in particular, Fig. 4. implementation. Third, in Sec. IV, we study memory advantages in First, in Sec. II, we investigate the possibility to simulate control by comparing classical and quantum continuous classical processes requiring memory using quantum mem- memoryless dynamics in terms of the set of accessible final oryless dynamics. More precisely, we compare the sets of states. We assume a fixed point of the evolution is given, all stochastic processes that can be generated by time- which is a realistic physical constraint in dissipative continuous memoryless dynamics in the classical and processes and typically, but not necessarily, coincides with quantum domains. We prove that the latter set is strictly the thermal Gibbs state. A standard example is given by a larger than the former one, i.e., that there exist stochastic thermalization of the system to the environmental temper- processes that classically require memory to be imple- ature. Here, we employ our recent result [14] characterizing mented but can be realized by memoryless quantum the input-output relations of classical Markovian master dynamics. As an example, consider a random walk on a equations with a given fixed point. We show how quantum cyclic graph with three sites, where the walker can either memoryless dynamics with the same fixed point allows move clockwise, move anticlockwise, or stay in place. As one to access a larger set of final states. This is we present in Fig. 2, only a small orange subset of such most evident in the case of maximally mixed fixed walks can arise from a continuous classical evolution that points (corresponding to the environment in the infinite- does not employ memory (note that, differently from other temperature limit) since every transformation that is clas- investigations [13], we do not put any restriction on the sically possible with arbitrary amounts of memory can be classical dynamics beyond the fact that it is memoryless). realized in a memoryless fashion in the quantum domain. However, if we allow for continuous, memoryless, quantum For general fixed points, we prove that an analogous evolution, all stochastic processes in the much larger blue set result holds for systems of dimension d ¼ 2, and we argue can be achieved. Besides this particular class, in this work, that the set of accessible states is strictly larger in the we provide general constructions for whole families of quantum regime than in the classical one for all d. Since it stochastic processes for any finite-dimensional systems that is known that memory effects enhance cooling [15,16],a require memory classically but can be implemented quan- direct consequence of our results is that quantumly it is tumly in a memoryless fashion. possible to bring the two-dimensional system below the

021019-3 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

d PðtÞ¼LðtÞPðtÞ;Pð0Þ¼1: ð3Þ dt The aim of the control LðtÞ is to realize a target stochastic process P at some final time tf as P ¼ PðtfÞ. If this is possible for some choice of LðtÞ, then P is embeddable, and if there exists a time-independent generator L such that P ¼ eLtf , then we say that P can be embedded by a time- homogeneous Markov process. A final technical comment is that we also consider the case tf ¼ ∞ to be embeddable (in Ref. [10], this case was referred to as limit-embeddable). Then, P cannot be generated in any finite time, but it can be approximated arbitrarily well. This is the case, e.g., with the 0 ↦ 0 1 ↦ 0 FIG. 3. Markovian cooling of a qubit. Classical memoryless bit erasure process: , [10]. processes can only cool the initial state ρ of a two-dimensional The question of which stochastic matrices P are system to the thermal state γ at the environmental temperature embeddable is a challenging open problem that has been (path along the solid-line arrow). Quantum memoryless dynamics extensively investigated for decades [17–22]. The full with fixed point γ allows one to cool the system below that, all the characterization does not go beyond 2 × 2 and 3 × 3 way to the state ρ0 with the lowest temperature achievable by stochastic matrices; however, various necessary conditions classical processes with memory (path along the dotted-line have been found. In particular, in Ref. [21], it was proven arrow). For details, see Sec. IV B and, in particular, Fig. 8. that every embeddable stochastic matrix P satisfies the following inequalities: environmental temperature without employing memory Y ≥ ≥ 0 effects, something that is impossible classically (see Fig. 3). Piji det P : ð4Þ Finally, in Sec. V, we discuss the potential for practical i applications of our results, while Sec. VI contains the ≥ 0 outlook for future research. The condition det P is, in fact, also known to be sufficient in dimension d ¼ 2 [19], and a time-independent rate matrix L can then be found. II. EMBEDDABILITY OF STOCHASTIC Example 1 (Thermalization). Consider a two-level sys- PROCESSES tem with energy gap E incoherently exchanging energy β A. Classical embeddability with a large environment at inverse temperature . Assume β 1 E ¼ . Suppose one observes Pijj satisfying the detailed Given a discrete state space, f1; …;dg, the state of a −1 balance condition: P1 0 ¼ P0 1e . Can this stochastic finite-dimensional classical system is described by a prob- j j ability distribution p over these states. A stochastic matrix or process originate from a memoryless dynamics? Using the condition in Eq. (4), one can verify this is the case if process P is a matrix Pijj of transition probabilities, and only if P0 1 ≤ e=ð1 þ eÞ ≈ 0.731. The dynamics that X j realizes P is then a standard thermalization process P ≥ 0; P ¼ 1; ð1Þ ijj ijj whereby the system’s state p exponentially relaxes to i the equilibrium distribution γ ¼ (e=ð1 þ eÞ; 1=ð1 þ eÞ), which describes the evolution of the system from one state, according to the classical master equation: p, to another, Pp. d Classically, the Pijj that can be achieved without employ- pðtÞ¼R(γ − pðtÞ); ð5Þ ing memory are known as embeddable. A stochastic matrix dt P is embeddable if it can be generated by a continuous where R denotes the thermalization rate. The stochastic Markov process [17]. This notion can be understood as a process P is realized by a partial thermalization lasting for a control problem involving a master equation. Namely, − 1− 1 time t¼ log½ P0j1ð þeÞ=e=R. Intuitively, the deexci- introducing a rate matrix or generator L as a matrix with 1 finite entries satisfying tation probability P0j1 cannot be made larger than e=ð þ eÞ X because memoryless thermalizations need to satisfy L ≥ 0 for i ≠ j; L ¼ 0; ð2Þ detailed balance at every intermediate time step (so there ijj ijj is always some probability of absorbing an excitation i 1 from the bath). In fact, P0j1 >e=ð þ eÞ can only be a continuous one-parameter family LðtÞ of rate matrices realized if memory effects are present. An example of 1 generates a family of stochastic processes PðtÞ satisfying such a process is a detailed balanced P with P0j1 ¼ ,

021019-4 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021) which is the “β-swap” providing enhanced cooling in anticommutator. In analogy with Eq. (3), a continuous Ref. [15]. Indeed, the latter process can be approximated one-parameter family of Lindbladians LðtÞ generates a by a Jaynes-Cummings coupling of a two-level system to family of quantum channels EðtÞ satisfying an “environment” given by a single harmonic oscillator initialized in a thermal state, which gives rise to a highly d ˆ ˆ ˆ ˆ EðtÞ¼LðtÞEðtÞ; Eð0Þ¼Iˆ ; ð8Þ non-Markovian evolution of the system. dt

B. Quantum embeddability where hats indicate superoperators (i.e., matrix representa- A state of a finite-dimensional quantum system is given tions of quantum channels that act on vectorized quantum I by a density operator ρ, i.e., a positive semidefinite operator states) and denotes the identity channel. A quantum E E E with trace one that acts on a d-dimensional channel is Markovian [23] if ¼ ðtfÞ for some choice of the Lindbladian LðtÞ and t (perhaps t ¼þ∞). In other Hd. A general evolution of a is described by f f a E, which is a completely positive words, E is Markovian if it is a channel that results from (CP) trace-preserving map from the space of density integrating a quantum master equation up to some time tf. matrices to itself. Now, focusing on the computational Any given Markovian channel E gives a stochastic process d H P through Eq. (6). The aim of the control LðtÞ is to achieve basis Pfjkigk¼1 of d, suppose we input the ρ E P t p ¼ k pkjkih kj, apply the channel , and measure the a target stochastic matrix after some time f. More resulting state EðρpÞ in the computational basis. The formally, we introduce the following definition. measurement outcomes will be distributed according to Definition 1 (Quantum-embeddable stochastic matrix). Pp, where A stochastic matrix P is quantum embeddable if

E E Pijj ¼hij ðjjih jjÞjii: ð6Þ Pijj ¼hij ðjjih jjÞjii; ð9Þ

In this way, the preparation of ρp, followed by a channel E where E is a Markovian quantum channel. and the computational basis measurement, simulates the Example 2. Consider a two-point projective measure- action of a stochastic process P on the classical state p. ment scheme (TPM) [26]. First, a projective energy Surprisingly, as far as we are aware, the set of processes measurement is performed, and one finds the system in a P that can be simulated by a quantum process without well-defined energy state j. Then, a quantum evolution E employing memory has not been named or studied before. follows, and finally, a second energy measurement returns Hence, we define a stochastic matrix P as quantum the outcome i with probability Pijj. We can then ask whether embeddable if it can be simulated by a quantum process it is possible that the process E generating P resulted from E ijj as in Eq. (6) with a Markovian quantum channel [23], i.e., a Markovian quantum master equation. Suppose one a channel that can result from a Markovian master equation observes [the quantum analogue of Eq. (3)]. Here, we describe what it rigorously means for a 1=32=3 quantum channel E to be Markovian. Despite the difference P ¼ : ð10Þ in jargon between the two communities, Markovianity is 2=31=3 for channels what embeddability is for stochastic matrices. It captures the fact that E can be realized without employing Then, it is straightforward to show that the above can arise memory effects. It can also be understood as a control from the following unitary dynamics U (which is a problem but, this time, involving a quantum master Markovian channel), equation. More precisely, the rate matrix L is replaced " pffiffiffiffiffiffiffiffi p ffiffiffiffiffiffiffiffi # by a Lindbladian [24,25], which is a superoperator L acting 1=3 2=3 on density operators and satisfying U ¼ pffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffi ; ð11Þ 2=3 − 1=3 1 Lð·Þ¼−i½H; ·þΦð·Þ − fΦð1Þ; ·g; ð7Þ 2 while according to Eq. (4), it is impossible to generate such a P using classical memoryless dynamics. with the first term describing unitary evolution and the remaining ones encoding the dissipative dynamics, e.g., due to the interaction with an external environment. Here, C. Quantum advantage H is a Hermitian operator, ½A; B ≔ AB − BA denotes a One can easily see that all (classically) embeddable commutator, Φ is a completely positive superoperator, stochastic processes are also quantum embeddable: Given a Φ denotes the dual of Φ under the Hilbert-Schmidt classical generator L, one chooses the CP map Φ defining scalar product, and fA; Bg ≔ AB þ BA stands for the the Lindbladian L in Eq. (7) to be

021019-5 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021) X qffiffiffiffiffiffiffi Φ † Let us now discuss the consequences of Lemma 1 with ð·Þ¼ Kijð·ÞKij;Kij ¼ Lijjjiih jj: ð12Þ ij increasing generality. We start with the following corollary for dimension d ¼ 2. However, the converse is not true. There exist many Corollary 2. All 2 × 2 stochastic matrices are quantum stochastic matrices P that can be generated by a quantum, embeddable. but not a classical, Markov process. The simplest example Proof.—A general 2 × 2 stochastic matrix P can be is given by a nontrivial permutation Π, satisfying written as Y Π 1 Π 0 a 1 − b det ¼ ; iji ¼ : ð13Þ P ¼ : ð16Þ i 1 − ab Π Clearly, Eq. (4) is violated, and hence is not embeddable. If det P ≥ 0, then P is embeddable and hence quantum † However, noting that every unitary channel Uð·ÞU is embeddable. Otherwise, if det P<0, we can write Markovian [by choosing the Lindbladian with no dissipa- P ¼ ΠP0, with Π denoting the nontrivial 2 × 2 permutation tive part and H such that U ¼ expðiHtfÞ] and that a and P0 being a stochastic matrix with det P0 ≥ 0. Since P permutation matrix Π is unitary, we conclude that every can be written as a composition of two quantum- permutation Π is quantum embeddable. This conclusion embeddable maps, by Lemma 1, it is also quantum also proves that neither of the two conditions in Eq. (4) is embeddable. ▪ necessary for quantum embeddability. For d ≥ 3, comparing quantum and classical embedd- More generally, a larger class of stochastic matrices that ability becomes complicated because of the lack of a are quantum embeddable is given by the set of unistochas- complete characterization of classical embeddability. tic matrices [27,28]. These are defined as all stochastic However, one can focus on certain subclasses of stochastic matrices P satisfying processes that are better understood. For example, for the family of 3 × 3 circulant stochastic matrices, defined by P ¼jhjjUjiij2 ð14Þ 2 3 ijj 1 − a − ba b 6 7 for some unitary matrix U, and the argument for quantum P ¼ 4 b 1 − a − ba5; ð17Þ embeddability is analogous to the one given for permuta- ab1 − a − b tion matrices. The set of unistochastic matrices includes permutations but also other (classically) nonembeddable the necessary and sufficient conditions for (classical) stochastic matrices. As an example, one can consider the embeddability are known. Denoting the eigenvalues of P iθ bistochastic matrix P in Eq. (10) or, in fact, any other 2 × 2 by λk ¼ rke k with θk ∈ ½−π; π, these conditions are given bistochastic matrix. This is because in dimension d ¼ 2, by [29] every bistochastic matrix is unistochastic; thus, it is quantum embeddable. ∀ k∶ rk ≤ exp ½−θk tanðπ=3Þ: ð18Þ Beyond these examples, we prove a simple general result that allows one to find larger families of quantum-embed- We illustrate the set of classically embeddable circulant dable stochastic matrices. matrices by the green region in parameter space ½a; b in Lemma 1 (Monoid property). The set of quantum- Fig. 4. On the other hand, because of Lemma 1, quantum- embeddable stochastic matrices contains identity and is embeddable circulant stochastic matrices also include closed under composition; i.e., if P and Q are quantum permutations of P, i.e., ΠP, with Π denoting circulant embeddable, then PQ is also. 3 × 3 permutation matrices. In fact, this set contains not Proof.—First, identity is obviously quantum embeddable only permutations of P but also compositions of P with any as it arises from a trivial Lindbladian L ¼ 0. Now, note that unistochastic matrix; however, numerical verification sug- the composition of Markovian quantum channels gives a gests that this does not further expand the investigated set. Markovian quantum channel. Next, notice that a com- As a result, the set of quantum-embeddable stochastic pletely dephasing map matrices in the parameter space ½a; b contains not only the X region corresponding to classically embeddable matrices Dð·Þ ≔ hkj · jkijkih kjð15Þ but also its two copies (corresponding to two permuta- k tions), which we illustrate in blue in Fig. 4. Moreover, all unistochastic circulant matrices (which are fully charac- is a Markovian quantum channel. Finally, the composition terized by the “chain-links” conditions from Ref. [28]) are E ¼ EP∘D∘EQ, with EP and EQ being quantum channels also quantum embeddable. The resulting region is also describing the quantum embeddings of P and Q,isa plotted in Fig. 4 in orange. Thus, we clearly see that the set Markovian quantum channel that quantum embeds the of quantum-embeddable stochastic circulant matrices is stochastic process described by PQ. ▪ much larger than the classically embeddable one since it

021019-6 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

Xd Πm ¼ jn ⊕ mih nj;m¼ 1; …;d− 1; ð20Þ n¼1

where ⊕ here denotes addition modulo d. A direct calcu- iHm lation shows that Πm ¼ e , with Hamiltonian

Xd 2πðn − 1Þ H ¼ jψ ih ψ j; ð21Þ d n n n¼1

and

1 Xd ffiffiffi −i2πðk−1Þðn−1Þ=d jψ ni¼p e jki: ð22Þ d FIG. 4. Embeddability of 3 × 3 circulant matrices. Every 3 × 3 k¼1 circulant matrix corresponds to a point within a half-square in the parameter space ½a; b according to Eq. (17). The green petal- We thus see that the continuous and memoryless shaped region around the origin contains all (classically) embed- Hamiltonian evolution creates a superposition of classical dable matrices. The set of quantum-embeddable matrices is larger states jni on the way between identity and Πm. The intuitive and contains the orange trianglelike region of unistochastic picture that emerges is that the matrices, as well as two, blue, petal-like regions corresponding between classical states created during the evolution effec- to permutations of the classically embeddable region. tively acts as a memory. For example, when we perform a rotation of the Bloch sphere around the y axis, we can 0 1 contains the union of green, blue, and orange regions. implement a bit swap sending j i to j i and vice versa, but However, we do not expect that all 3 × 3 circulant matrices the path the state follows (going through jþi if the initial 0 − 1 are quantum embeddable, with the case a ¼ b ¼ 1=2 being state is j i and through j i if the initial state is j i) will intuitively the least likely to arise from quantum Markovian preserve the memory about the initial state. At the same time, dynamics. a classical memoryless process moving (1,0) towards (0,1) For general dimension d, one can generate families and (0,1) towards (1,0) cannot proceed beyond the point at of quantum-embeddable matrices using Lemma 1 in an which the two trajectories meet. analogous way, by composing classically embeddable One might wonder if we can quantify the coherent matrices with unistochastic ones. Moreover, employing resources required for the advantage. There are various Corollary 2, we note that the set of quantum-embeddable frameworks that have been put forward to quantify super- stochastic matrices also includes all matrices P that can be position (the resource theory of coherence in its various written as products of elementary stochastic matrices P forms [31] or that of asymmetry [32]). However, none of ei them associates costs to permutations (technically, these are (also known as pinching matrices), i.e., “free operations”) despite the fact that they carry an advantage in our setting. What we allude to in the present … Π ⊕ Π P ¼ Pen Pe1 ;Pei ¼ iðP2 Id−2Þ i; ð19Þ discussion is that, while these theories assign no cost to these operations, they can be performed in a Markovian where P2 is a general 2 × 2 stochastic matrix, Id−2 denotes fashion only because one can continuously connect differ- ent basis states through the creation of superpositions. identity on the remaining states, and Πi is an arbitrary permutation. Notably, for d ≥ 4, such products of elemen- Thus, current frameworks seem inadequate to capture the tary stochastic matrices contain matrices that are not resources involved in the quantum memory advantage. An unistochastic [30] and hence cannot be reduced to the alternative framework would have to quantify the maxi- examples above. In conclusion, quantum embeddings allow mum amount of coherence that must be created at inter- one to achieve many stochastic processes that necessarily mediate times, minimized over all Markovian realizations require memory from a classical standpoint. of a target channel. This quantity may then be given an operational meaning in terms of minimal coherent resour- ces one must input to realize the corresponding protocol. D. Discussion We leave this research direction for future work. From a physical perspective, it is now natural to ask why Our results can also be naturally connected to a result by the set of quantum-embeddable stochastic matrices is strictly Montina [33], who proved that Markovian hidden variable larger than the set of classically embeddable ones. To address models reproducing quantum mechanical predictions nec- this question, let us first consider the simple example of essarily require a number of continuous variables that grow classically nonembeddable permutation matrices, linearly with the Hilbert space dimension and, hence,

021019-7 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021) exponentially with the system size. Intuitively, here we are required to “quench” LðiÞ to Lðiþ1Þ.Ifn ¼ 1, one has an showing that this “excess baggage” [34] can be exploited to almost autonomous protocol; i.e., the only requirement is simulate memory effects. In what follows, we provide a the ability to switch off the controls after time t1. quantification of the advantage beyond the embeddable- From a physical point of view, the issue with this nonembeddable dichotomy. We will see that quantum definition is that it assigns an infinite cost to any realistic theory allows for advantages in the simulation of stochastic protocol in which controls are switched on and off in a processes by memoryless dynamics. continuous fashion. For example, suppose a single two- level system is kept in contact with an idealized dissipative environment while we slowly tune its energy gap. Such a III. SPACE-TIME COST OF A protocol can be seen as the continuous limit of a sequence STOCHASTIC PROCESS of steps described in Eq. (23). As such, it would be assigned In this section, we first recall a recently introduced an infinite time cost according to the above definition, even framework for the quantification of the space and time costs though it is certainly experimentally feasible. To overcome of simulating a stochastic process by memoryless dynamics this issue, note that by Levy’s lemma [35], a crucial [10]. We then extend it to the quantum domain and prove a property of each step in the sequence of Eq. (23) is that quantum advantage in the corresponding costs. the set of nonzero transition probabilities does not change, which naturally suggests defining the time cost as the number of times the set of “blocked” transitions changes. A. Classical space-time cost One could physically motivate this definition as follows. Let P be a nonembeddable stochastic matrix acting Consider a system interacting with a large thermal envi- on d so-called visible states. We then ask, how many ronment. Transitions between any pairs of the system’s additional memory states m does one need to add, in energy levels are possible by absorption or emission of the order to implement P by a classical Markov process? corresponding energy from or to the bath. Absorptions are Formally, one looks for an embeddable stochastic exponentially suppressed in the energy gap. To selectively matrix Q acting on d þ m states whose restriction to the couple only certain levels, we either need to raise and lower first d rows and columns is identical to P. When this infinite energy barriers [10] or we need to engineer the happens, Q is said to implement P with m memory states. spectrum of the environment so that only certain transitions ’ In fact, given any d-dimensional distribution p, if we take can occur. Changing the set of the system s energy levels involved in the interaction, by decoupling some and the d þ m-dimensional distribution q ¼ðp; 0; …; 0Þ, then coupling new ones, is then a nontrivial control operation, Qq ¼ðPp; 0; …; 0Þ. Following Ref. [10], we now have the and we hence assign a cost to it. The time cost, defined as following definition. the number of times we need to change the set of coupled d d Definition 2 (Space cost). The space cost of a × energy levels, is then a good proxy for the level of required stochastic matrix P, denoted CspaceðPÞ, is the minimum m control. It solves the issue with the previous definition, and, such that a ðd þ mÞ × ðd þ mÞ embeddable matrix Q in particular, it assigns a cost n ¼ 1 to the qubit protocol implements P. mentioned above. As a technical comment, we note that the above To sum up, these considerations lead to the following definition can be extended to situations in which visible definition of a one-step process [10]. and memory states are not disjoint, e.g., when the visible Definition 3 (One-step process). A stochastic matrix T states on which P acts are logical states defined by a coarse is called a one-step process if graining of the states on which Q acts. Since this does not (1) it is embeddable; change any of the results presented here, we refer to (2) the controls LðtÞ that generate T at time tf through Ref. [10] for further details and adopt the simpler definition Eq. (3) can be chosen such that the set of nonzero given here. transition probabilities of PðtÞ is the same for Once we find a matrix Q that implements P, the next all t ∈ ð0;tfÞ. question is as follows: What is the number of time steps Putting all this together, we obtain the notion of time cost required to realize Q? The notion of a time step is meant to from Ref. [10]. capture the number of independent controls that are needed Definition 4 (Time cost). The time cost C ðP; mÞ of a to achieve Q. A natural definition would be that the number time d × d stochastic matrix P, while allowing for m memory of time steps necessary to realize an embeddable stochastic states, is the minimum number τ of one-step stochastic matrix Q is the minimum number n such that matrices TðiÞ of dimension ðd þ mÞ × ðd þ mÞ such that ðnÞ ð1Þ τ 1 Q ¼ eL tn eL t1 ; ð23Þ Q ¼ Tð Þ Tð Þ implements P. where Lð1Þ; …;LðnÞ are time-independent generators; i.e., ðkÞ B. Quantum space-time cost each L is a control applied for some time tk. This definition captures the idea of a sequence of autonomous The framework presented above allows one to steps, with n the number of times an active intervention is quantify the memory and time costs of implementing a

021019-8 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021) given stochastic process by classical master equations. this problem for stochastic matrices P that are f0; 1g valued We now introduce a natural extension of the above to or, in other words, represent a function f over the set of the quantum domain. states f1; …;dg. How do these results compare with what Definition 5 (Quantum space cost). The quantum space can be done quantum mechanically? In the next section, we 0 1 cost of a d × d stochastic matrix P, denoted QspaceðPÞ,is give a protocol realizing every f ; g-valued stochastic the minimum m such that the ðd þ mÞ × ðd þ mÞ quantum- matrix that scales much better than the corresponding embeddable matrix Q implements P. minimal classical cost. Concerning the definition of the quantum time cost of a stochastic matrix, the physical intuitions discussed in the C. Quantum advantage classical case apply essentially unchanged. We can now Let P be a f0; 1g-valued d × d stochastic matrix add to those intuitions the standard example of a sequence f defined by a function f∶Z → Z . Let fixðfÞ be the of n laser pulses, each involving a fixed energy submani- d d number of fixed points of f, jimgðfÞj the dimension of fold. Naturally, these will count as n time steps. In analogy the image of f, and cðfÞ the number of cycles of f, i.e., the with the classical counterpart, the quantum time cost admits number of distinct orbits of elements of f1; …;dg of the more or less restrictive definitions. Since we eventually form fi; fðiÞ;fðfðiÞÞ; …;ig. Recently, the following result want to prove a quantum advantage, in the quantum regime has been shown. it is convenient to adopt the simpler and more constrained Theorem 3 (Classical cost of a function [10]). The time definition. Thus, we use the definition involving time- cost of a f0; 1g-valued stochastic matrix Pf described by a independent generators only, as an advantage proven function f is given by according to such a restricted scenario will persist if we   allow even more freedom in the quantum protocol. mþdþmax½cðfÞ−m;0−fixðfÞ Definition 6 (Quantum time cost) The quantum time C ðP ;mÞ¼ þb ðmÞ time f mþd−jimgðfÞj f cost QtimeðP; mÞ of a d × d stochastic matrix P, while   allowing for m memory states, is the minimum τ such that mþd−fixðfÞ ≥ ; ð25Þ there exist time-independent Lindbladians L1; …; Lτ on a mþd−jimgðfÞj ðd þ mÞ × ðd þ mÞ-dimensional Hilbert space and where bfðmÞ¼0 or 1 and d·e is the ceiling function. ðτÞ ð1Þ L tτ L t1 Suppose that the state space is given by all bit strings of Qijj ¼hije e ðjjih jjÞjiið24Þ length s so that d ¼ 2s. Theorem 3 shows that, if jimgðfÞj is implements P. OðdÞ, then Pf is expensive to simulate by memoryless At this point, it is worth highlighting that this notion of dynamics unless the number of fixed points is also OðdÞ. time step, which is a quantum version of that in Ref. [10],is Since for a typical f we have jimgðfÞj ¼ OðdÞ and disconnected from the one used in quantum computing. fixðfÞ¼Oð1Þ (see the Appendix A), we conclude that, 2s There, one takes the system to consist of a number of typically, CtimeðPf;mÞ¼Oð =mÞ; i.e., an exponential qubits, and the operations are constrained by the fact that number of memory states are required to have an efficient they involve only a few qubits at once. Here, instead, we simulation in the number of time steps. Conversely, allow for transformations involving all energy levels at one needs an exponential number of time steps to have once. The basic disconnect is due to the fact that elementary an efficient simulation for a fixed number of memory states. operations in a computational setting typically do not One of the examples discussed in Ref. [10] is that of f1ðiÞ¼ involve dissipative dynamics, which is, however, the main i ⊕ 1 (addition modulo d), which may be interpreted subject of discussion here (for a unitary, it is not natural to as keeping track of a clock in a digital computer. From ≥2s act on all energy levels at once, but for a thermalization Theorem 3, we see that one has CtimeðPf1 ;mÞ =m, with m process with a collective bath, it can be). Hence, it is not the number of memory states introduced (see Fig. 5). obvious to what extent one can reconcile the two However, as we discussed already above, any permuta- approaches. In this work, we adopt ours as working tion is quantum embeddable by a unitary, and hence 0 1 definitions, which carry their own physical intuitions and QtimeðPf1 ; Þ¼ . The existence of this advantage is have the advantage of allowing a clear comparison with the generalized by the following result. classical work in Ref. [10]. Nonetheless, we believe an Theorem 4 (Quantum cost of a function). For any ≥ 0 ≤ 2 approach that more directly captures computational restric- m and any function f,wehaveQtimeðPf;mÞ . tions in the simulation of stochastic processing using both The explicit proof is given in Appendix B, but it is based elementary gates and dissipative interactions would be on the simple fact that every function can be realized extremely interesting. quantumly by a unitary process realizing a permutation Moving on, the central question in the classical setting is followed by a classical master equation achieving an to find CspaceðPÞ and then characterize CtimeðP; mÞ for idempotent function fI in a single time step. Hence, one ≥ m CspaceðPÞ. The main result of Ref. [10] was to solve can achieve every function quantumly using zero memory

021019-9 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

or may not be the thermal state of the system). We then introduce the following two definitions and discuss the corresponding examples involving standard dynamical models. The former encapsulates the set of input-output relations achievable by means of general stochastic proc- esses with a fixed point γ, while the latter captures the subset achievable without exploiting memory effects, i.e., by Markovian master equations. Definition 7 (Classical accessibility). A distribution q is accessible from p by a classical stochastic process with a fixed point γ if there exists a stochastic matrix P, such that

Pp ¼ q and Pγ ¼ γ: ð27Þ

We denote the set of all q accessible from p given γ Mem by Cγ ðpÞ. FIG. 5. Classical versus quantum space-time trade-off. Example 3. A standard effective model in cavity QED The optimal trade-off between space cost and time cost of and atomic physics is the Jaynes-Cummings model in the implementing stochastic matrices for a system of s ¼ 32 bits, rotating wave approximation [36]. Formally, it describes i.e., with dimension d ¼ 232 (plotted in log-log scale). Solid the resonant interaction of a two-level system (with energy colored curves correspond to optimal trade-offs for classically levels j0i and j1i), with a single harmonic oscillator by implementing exemplary f0; 1g-valued stochastic matrices de- means of the Hamiltonian scribed by functions f1ðiÞ¼i ⊕ 1 (addition modulo d) and s=2 s f2ðiÞ¼minfi þ 2 ; 2 − 1g, as analyzed in Ref. [10]. The ℏω σ ℏω † σþ σ− † dashed black curve corresponds to optimal trade-offs for quan- HJC ¼ 2 z þ a a þ gðtÞð a þ a Þ; ð28Þ tumly implementing any f0; 1g-valued stochastic matrix, thus illustrating a quantum advantage. where a† and a are the creation and annihilation operators þ of the oscillator, and σz ¼j0ih 0j − j1ih 1j, σ ¼j1ih 0j, − states and only two time steps, compared to the typical σ ¼j0ih 1j. Suppose the oscillator is initially in a thermal ρ 0 classical cost C ðP ;mÞ ≥ d=m. This result, illustrated state and the system is in a general state ð Þ, and denote by time f1 p in Fig. 5, is quantitative evidence of the power of super- ðtÞ the populations in the energy eigenbasis of the system position to act as effective memory. at time t. Then, in the reduced dynamics of the system generated by HJC, the population and coherence terms decouple. Moreover, one can show that pðtÞ¼P pð0Þ, IV. ROLE OF MEMORY IN STATE t where Ptγ ¼ γ and γ is the thermal distribution of the two- TRANSFORMATIONS Mem level system. Hence, pðtÞ ∈ Cγ (pð0Þ); i.e., if we know Mem A. Accessibility regions Cγ (pð0Þ), we can constrain the set of achievable final Mem In this section, we change the focus from processes to states. In fact, in the low-temperature regime, Cγ (pð0Þ) states. We investigate whether a given state transformation is a good approximation of the set of all states that can be can be realized by either a classical or a quantum master achieved in the Jaynes-Cummings model after a long- equation. In other words, given an input distribution p,isit enough dynamics [37]. possible to get a given final state q through an embeddable In what follows, we denote by ρp the density matrix (or quantum-embeddable) stochastic matrix P? Of course, diagonal in the computational (or energy) basisP with entries p ρ given full control, it is always possible to choose a master given by the probability distribution : p ¼ k pkjkih kj. q equation with being the unique fixed point. However, Example 4. Consider a system in a classical state ρp. Mem more realistically, a fixed point of the evolution is con- Then, Cγ ðpÞ describes the set of classical states that can — strained rather than being arbitrary and typically corre- be obtained from ρp by thermal operations [38,39], i.e., γ sponds to the thermal Gibbs distribution , with energy-preserving couplings of the system with arbitrary thermal baths at a temperature fixed by the choice of γ. This 1 Xd −β −β scenario was analyzed in Refs. [38,40], and it was proven γ ≔ e Ek ;Z≔ e Ek : ð26Þ k Z CMem p k¼1 there that γ ð Þ is fully specified by the notion of thermomajorization (also known as majorization relative Here, Ek are the energy levels of the system interacting with to γ [41]). an external environment at inverse temperature β. Hence, The memoryless version of the above classical acces- suppose some (full-rank) fixed point γ is given (which may sibility region is defined as follows.

021019-10 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

Definition 8 (Classical memoryless accessibility). A Gibbs-preserving quantum channels, in general, cannot be distribution q is accessible from p by a classical master realized by means of a Markovian master equation; i.e., equation with a fixed point γ if there exists a continuous they require memory effects. one-parameter family LðtÞ of rate matrices generating a It is of course natural to consider the transformations that family of stochastic matrices PðtÞ, such that can be realized by the subset of Gibbs-preserving maps that originate from a Markovian quantum master equation, so PðtfÞp ¼ q;LðtÞγ ¼ 0 for all t ∈ ½0;tfÞ: ð29Þ we introduce the following. Definition 10. [Quantum memoryless accessibility] A We denote the set of all q accessible from p given γ distribution q is accessible from p by a quantum master by CγðpÞ. equation with a fixed point γ if there exists a continuous Example 5. Consider an N-level quantum system one-parameter family of Lindbladians LðtÞ generating a weakly interacting with a large thermal bath. A microscopic family of quantum channels EðtÞ, such that derivation [42] leads to a quantum Markovian master E ρ ρ L ρ 0 ∈ 0 equation for the system known as a Davies process [43], ðtfÞ½ p¼ q; ðtÞ½ γ¼ for all t ½ ;tfÞ: ð32Þ which is a standard model for thermalization [44]. One can q p γ then verify that the populations pðtÞ of the system under- We denote the set of all accessible from given Q p going a Davies process satisfy a classical Markovian master by γð Þ. equation, Example 7. Standard thermalization processes result- ing from weak couplings to a large environment, such as dpðtÞ Davies maps, are generated by a Lindbladian L satisfying ¼ LpðtÞ;Lγ ¼ 0; ð30Þ L ρ 0 dt ½ γ¼ , as required by the definition above. However, these dynamics are unable to create quantum superposi- and thus pðtÞ ∈ Cγ(pð0Þ). A characterization of CγðpÞ then tions and hence cannot be used to show a quantum advantage. On the other hand, more exotic thermal- allows one to restrict the intermediate nonequilibrium states pffiffiffiffiffi pffiffiffiffiffi generated by standard thermalization processes, without the ization processes exist. Let jγi ≔ γ0j0iþ γ1j1i, γ ¼ need to solve the actual dynamics. Since these processes are γ0j0ih0jþγ1j1ih1j and consider the quantum master building blocks of more complex protocols—they form equation on a two-level system thermalization strokes of engines and refrigerators [45]— d this information can be employed to identify thermody- ρ ¼ LðρÞ; ð33Þ namic protocols with optimal performance. dt These definitions naturally generalize to quantum where L is the Lindbladian specified by Eq. (7) with a dynamics in the following way. Φ Definition 9 (Quantum accessibility). A distribution q is vanishing Hamiltonian H and the map given by a accessible from p by quantum dynamics with a fixed point measure-and-prepare channel of the following form: γ E if there exists a quantum channel , such that ρ00 ΦðρÞ¼ ðγ − γ1jγih γjÞ þ ρ11jγih γj: ð34Þ γ0 EðρpÞ¼ρq and EðργÞ¼ργ: ð31Þ It satisfies LðργÞ¼0,soifpðtÞ is the population vector of We denote the set of all q accessible from p given γ ρðtÞ, one has pðtÞ ∈ Qγ(pð0Þ). One can verify that the QMem p by γ ð Þ. dynamics equilibrates every state to γ and yet it is capable γ Example 6. Setting to be the thermal Gibbs state, the of generating coherence [for example, for ρð0Þ¼j1ih 1j, E ρ ρ set of channels satisfying ð γÞ¼ γ (Gibbs-preserving one has dρ01=dt > 0 around t ¼ 0]. This particular maps) was identified as the most general set of operations dynamics is unable to translate the ability to create that can be performed without investing work [46]. The coherence into the ability to generate a P that classically reason is that any channel that is not Gibbs-preserving can requires memory (we will later construct dynamics that create a nonequilibrium resource from an equilibrium do). What the example illustrates, however, is a central state. These channels can then be taken as free operations, mechanism by which a quantum advantage can arise, i.e., and the minimal work cost of a general channel F can be generation of quantum superpositions by exotic, thermal- computed from the minimal work a battery system must izing, Markovian master equations. These dynamics are, provide to simulate F using Gibbs-preserving maps only. in principle, allowed by quantum mechanics, but we leave The set of stochastic matrices P that can be realized the question of how they can actually be realized for future with Gibbs-preserving maps coincides with the set of work. We note, in passing, that what is needed is a all P with a fixed point γ (see, e.g., Theorem 1 of physical model where a Markovian process with a thermal Ref. [39]). It is not surprising that this includes P fixed point naturally emerges despite the fact that the that cannot be simulated without memory effects since dynamics does not satisfy the secular approximation.

021019-11 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

Note that in Definitions 8 and 10, the requirements Theorem 5 (Maximal quantum advantage for uniform LðtÞγ ¼ 0 and LðtÞ½ργ¼0 for all times ensure that fixed points). For every p and a uniform distribution Mem PðtÞγ ¼ γ and EðtÞ½ργ¼ργ for all intermediate times η ¼ð1=d; …; 1=dÞ, one has QηðpÞ¼Cη ðpÞ. — Q p ⊆ CMem p t ∈ ½0;tf. By characterizing the difference between the Proof. Clearly, we have ηð Þ η ð Þ because Mem Q p ⊆ QMem p CMem p sets Cγ ðpÞ and CγðpÞ, one can capture the state trans- ηð Þ η ð Þ¼ η ð Þ. Conversely, let us show Mem Mem formations that can be achieved only through controls Cη ðpÞ ⊆ QηðpÞ. Take q ∈ Cη ðpÞ. As it is well known exploiting memory effects. In other words, all states (see Theorem B6 of Ref. [41]), this is equivalent to the Mem q ∈ Cγ ðpÞ, but not in CγðpÞ, can only be achieved from majorization relation p≻q, i.e., p via a transformation that employs memory. Analogous Xk Xk Mem ↓ ↓ statements hold for Qγ ðpÞ and QγðpÞ. ≥ 1 … pi qi ;k¼ ; ;d; ð36Þ In what follows, we study relations between the acces- i¼1 i¼1 sibility regions. Our main result is that Cγ p ⊂ Qγ p in ð Þ ð Þ p↓ p the case of a uniform fixed point η ≔ ð1=d; …; 1=dÞ and for where denotes the probability distribution sorted in a nonincreasing order. We show that every q satisfying the general fixed points for a qubit system. These results signal p a quantum advantage; i.e., some transitions that classically above can be achieved from by a composition of two require memory can be achieved through memoryless quantum-embeddable processes (so, according to Lemma 1, quantum dynamics. by one quantum-embeddable process), each with a uniform fixed point. First, note that every permutation is quantum embeddable, as discussed in Sec. II C. Thus, one can B. Quantum advantage at infinite temperature rearrange p into p0 with p0≻p, sorted in the same way as q p0≻q A natural question that arises is whether the sets QγðpÞ . By transitivity of majorization, we have . Now, using Mem β → ∞ q and Qγ ðpÞ are larger than their classical counterparts. Theorem 11 of Ref. [47] with , it follows that can be p0 This enlargement of the set of achievable states is another achieved from by applying a sequence of stochastic facet of the quantum advantage. More generally, one could processes of the form also investigate more refined versions of memory advan- 1 − λ=2 λ=2 tages on state transformations, e.g., trying to include space Tði;jÞ ≔ ⊕ I ; ð37Þ λ 21− λ 2 nði;jÞ and time resources in the analysis, similarly to what we did = = in Sec. III. where λ ∈ ½0; 1 and I is the identity matrix on all states It is straightforward to prove that without the memory- nði;jÞ ði;jÞ less constraint, there will be no quantum advantage. In excluding i and j. The matrices T are embeddable with Mem other words, we have q ∈ Qγ ðpÞ if and only if rate matrices q ∈ CMem p “ ” γ ð Þ. The if part is obvious, as the set of all −1=21=2 ði;jÞ quantum channels with a fixed point ργ contains as a subset L ¼ ⊕ 0 ; ð38Þ 1=2 −1=2 nði;jÞ the set of classical stochastic processes with the same fixed Mem q ∈ Qγ p 0 point. Conversely, take any ð Þ, meaning that where n is the zero matrix on all states excluding i and j. E E ρ ρ ði;jÞ there exists a channel such that ð pÞ¼ q and Moreover, matrices Lði;jÞ satisfy Lði;jÞη ¼ 0. Putting every- E ρ ρ ð γÞ¼ γ. Then, we can construct a stochastic process thing together, we have a unitary permutation followed by a P with matrix elements P given by hijEðjjih jjÞjii. The ðik;jkÞ ijj sequence of processes eL tk that map p into q,so matrix P is stochastic because E is positive and trace- Mem q ∈ QηðpÞ. We conclude that QηðpÞ¼Cη ðpÞ. ▪ preserving. Furthermore, it satisfies Pp ¼ q and Pγ ¼ γ. Mem Since QηðpÞ¼Cη ðpÞ, in order to prove a quantum q ∈ CMem p Therefore, γ ð Þ. To sum up, advantage, we only need to show that classical memoryless dynamics is more restrictive than general classical dynam- Mem Mem C p Qγ ðpÞ¼Cγ ðpÞ: ð35Þ ics with a fixed point, i.e., that ηð Þ is a proper subset of Mem Cη ðpÞ. This is indeed the case, as can be easily verified for d ¼ 2 (and it is rigorously proven in Ref. [14] for a However, as we now prove, a quantum advantage is γ Q p ⊊ C p general fixed point in any dimension). Here, in Fig. 6,we exhibited by γð Þ γð Þ; i.e., there are states classi- Mem illustrate that CηðpÞ is a proper subset of Cη ðpÞ for an cally accessible only with memory that can be achieved 3 by quantum memoryless dynamics. In the case of a exemplary case of d ¼ . uniform fixed point, going from classical to quantum memoryless dynamics allows one to achieve the maximal C. Quantum advantage at any finite quantum advantage: All transformations involving temperature (qubit case) memory can be realized quantum mechanically with no Now, we generalize the considerations above to arbitrary memory. fixed points or, if we think of γ as a thermal fixed point,

021019-12 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

does not occur when dissipation is well described by a Markovian master equation since, in this case, the dynam- ics cannot cross the fixed state γ. Memory effects (e.g., in the form of non-negligible system-bath correlations) are Mem required to access all the states in Cγ ðpÞ. Let us now look at CγðpÞ, the achievable states with classical memoryless processes with a thermal fixed point. For d ¼ 2, the set of Markovian master equations with a fixed point γ is limited to the thermalizations introduced in Example 1. Hence, CγðpÞ is readily characterized as all states along a line connecting p and the thermal state: ( ½p; 1=Z if p ≤ 1=Z CγðpÞ¼ ð41Þ ½1=Z; p if p>1=Z: FIG. 6. Quantum advantage at infinite temperature for d ¼ 3.We show the sets of states accessiblevia classical [CηðpÞ, smaller orange The difference between Eqs. (39) and (41) is simply that shape] and quantum [Qη p , larger blue hexagon] memoryless ð Þ “ ” dynamics with a uniform fixed point η for a system of dimension memory effects allow one to go on the other side of the d ¼ 3 andanexemplaryinitialstatep (each point inside a triangle thermal state. Without memory, this is not possible since corresponds to a probabilistic mixture of sharp distributions). The the thermal state is at a minimum of the free energy. set CηðpÞ was constructed using the results of Ref. [14]. Now, we turn to the corresponding quantum mechanical problem, looking for potential advantages. Any unitary that arbitrary temperatures. In other words, we compare states changes the population of the state is forbidden since it achievable by classical memoryless processes with a fixed does not have ργ as a fixed point. Hence, we cannot rely on point γ to states achievable by quantum memoryless any of the previous constructions exploiting the fact that, processes with a fixed point ργ. Here, we solve the case quantum mechanically, one can generate permutations for d ¼ 2. To ease physical intuition, we parametrize γ without using memory. We then need to characterize the as in Eq. (26), with E ¼ E2 − E1 the energy gap between set of diagonal quantum states achievable from a given state the two states and β the inverse temperature of the external ρp via Markovian quantum master equations with a given environment. fixed point ργ. Even without the constraint that the channel Let us start by recalling the classical solution to this is generated by a master equation, finding a simple Mem problem. First, Cη ðpÞ can be obtained using the thermo- characterization of the set of accessible states for d>2 majorization condition [38,40].Ifp ¼ðp; 1 − pÞ, in terms has remained an open problem for decades [48]. This issue of the achievable ground-state populations, we have explains why we are focusing here on the simplest non- ( trivial case of a qubit system, where such a problem has 1 − −βE ≤ 1 Mem ½p; e p if p =Z been fully solved [48–50]. We numerically show that, in Cγ ðpÞ¼ ð39Þ ½1 − e−βEp; p if p>1=Z: d ¼ 2, one also achieves a maximal quantum advantage. Specifically, all states achievable classically by means of This set of states can be approximately achieved processes with thermal fixed points that involve memory, by the Jaynes-Cummings interaction of Example 3, which Eq. (39), can be attained by a Markovian quantum master involves memory effects. The need for memory effects to equation with fixed point ργ. More compactly, we have the achieve the states in Eq. (39) can be understood more following result: generally by looking at information backflows, which Result 1 (Quantum advantage at every finite Mem are a standard signature of non-Markovian effects. As temperature—numerics). For d ¼ 2, QγðpÞ¼Cγ ðpÞ. one can verify from the previous expressions, any con- This result showcases that the advantage of Theorem 5 is tinuous trajectory rðtÞ connecting p to the other extremal not limited to the special case of a uniform fixed point Mem point in Cγ ðpÞ has to pass through γ. Thus, the (non- involving unitary dynamics. Superposition can substitute equilibrium) free energy of the system, memory in the control of classical systems at every finite temperature. X 1 X p − p p − In order to prove Result 1, we present an explicit Fð Þ¼ piEi βHð Þ;Hð Þ¼ pi logpi; ð40Þ i i construction and numerical evidence for an even stronger result. will first decrease all the way to its minimal value and then Result 2. [Numerics] Every qubit state accessible via a increase again, signaling an information backflow from the qubit channel with a given fixed point can be achieved by a thermal environment. It is obvious that such a phenomenon qubit Markovian master equation with the same fixed point.

021019-13 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

Let us start by recalling the result of Ref. [48], where the authors provided necessary and sufficient conditions for the existence of a qubit channel E satisfying

EðρÞ¼ρ0; EðσÞ¼σ0; ð42Þ for any two pairs of qubit density matrices ðρ; ρ0Þ and ðσ; σ0Þ. Moreover, whenever such a channel exists, the authors provided a construction of the Kraus operators of E. 0 Setting σ ¼ σ ¼ ργ, one obtains a characterization of all states accessible from ρ through arbitrary channels with a given fixed point ργ (we choose a basis in which the fixed point is diagonal). In Ref. [50], the continuous set of conditions presented in Ref. [48] was reduced to just two FIG. 7. Qubit accessibility region. Geometrically, states with a c inequalities: fixed value of Rþ lie on a circle centered at 0 and with radius R0 (in orange). Similarly, states with a fixed value of R− lie on a circle centered at c1 and with radius R1 (in blue). States R ðρÞ ≥ R ðρ0Þ: ð43Þ achievable from a given initial state ρ via quantum channels with a fixed point ργ lie inside the Bloch sphere in the intersection These inequalities are best understood through the of two balls ðc0;R0Þ and ðc1;R1Þ. Here, the parameters for initial standard Bloch sphere parametrization of the states and fixed states are chosen to be x ¼ 1=2, z ¼ 0, and ζ ¼ 1=4. involved. Recall that a general qubit state can be written as c 1 þ rρ · σ (ii) states with a constant R− lying on a circle ð 1;R1Þ if ρ 0 ¼ 2 ; ð44Þ z 0 and find the state ρ1 on the extremal path with z0 ¼ z þ Δ. Using the construction where of Ref. [48], we obtain an explicit form for the quantum qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi channel E0 mapping ρ0 to ρ1 while preserving ργ. Next, we δ ρ ≔ − ζ 2 2 1 − ζ2 define the Lindbladian L0 ¼ E0 − I and evolve the state ð Þ ðz Þ þ x ð Þ; ð47Þ L L according to e 0 , obtaining ρ˜1 ≔ e 0 ρ0. We then repeat the same procedure, but instead of ρ0, we start with ρ˜ for i>0. with analogous (primed) definitions for ρ0. The two i In this way, we construct a whole set of Lindbladians L . inequalities from Eq. (43) can then be used to find extremal i The procedure ends when Eq. (43) is no longer satisfied for states accessible from ρ via qubit channels with fixed point z0 ¼ z þ Δ. Because of the extremely complicated form of ργ. As shown in Fig. 7, these are given by the Kraus operators describing the channels Ei (and hence (i) states with a constant Rþ lying on a circle with L 0 i), instead of their explicit expressions, we provide their c0;R0 z ≥ z centre and radius ð Þ if , where construction in Appendix C. 2 WeQ have thus constructed a quantum Markovian evolu- R − ζ L þ c 0 0 ζ 1 − tion e i passing through the points ρ˜ . Numerical R0 ¼ 2 ; 0 ¼½ ; ; ð R0Þ; ð48Þ i i 1 − ζ investigations show that this Markovian dynamics evolves

021019-14 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

Despite the above outlook, we still believe that our results may find near-term applications on the side of control theory and . As we discussed, for d ¼ 2, any classical Markovian master equation with a fixed point γ evolves p along the path pðtÞ that can never go “on the other side of the fixed point” (recall Fig. 3); memory is required for that to happen. On the other hand, the corresponding quantum Markovian master equations access all states achievable under general stochastic maps with a fixed point γ. Creation of quantum coherence is crucial since it opens new pathways that “go around” the fixed state. What is surprising is that the creation of coherence in a qubit Markovian dissipative FIG. 8. Qubit memorylessQ accessibility region. We show the “β ” L process can replace all memory effects. Even the swap, ρ i initial state evolved by i e (black dots) as described in the the classical process with a thermal fixed point that requires main text. The evolved states clearly approach the extremal paths the largest free-energy back-flow and achieves the farthest for thermodynamic processes with memory given by circles accessible state on the other side of γ in Eq. (41), can be ðc0;R0Þ and ðc1;R1Þ. In both panels, Δ is chosen such that the evolution is divided into 100 equal steps (to increase readability, approximated arbitrarily well by a quantum Markovian only the even steps are plotted). (a) Parameters: x ¼ 0, z ¼ −1=3 master equation with a thermal fixed point. and ζ ¼ 1=2. (b) Parameters: x ¼ 0, z ¼ 5=6, ζ ¼ 1=4. This observation potentially has significant conse- quences in the context of cooling, a central problem in ρ0 ¼ ρ approximately along the extremal circle ðc0;R0Þ [or quantum sciences. Access to pure, “cold” quantum systems ðc1;R1Þ for Δ < 0], with the approximation improving as is a preliminary requirement for quantum computing [54]. Δ → 0. We illustrate these results for particular choices of One possible way to achieve it is to employ heat-bath initial and fixed states in Fig. 8 and note that this is strong algorithmic cooling (HBAC) protocols [55–57], initially evidence that Result 2 holds. developed in the context of NMR systems. These protocols are optimized to achieve the largest possible cooling of a V. POTENTIAL FOR PRACTICAL ADVANTAGES target system by means of a sequence of unitary operations and interactions with a heat bath. Recently, optimal HBAC While the quantum advantages described in this paper were derived [15,58]. For a single qubit, these protocols may ultimately find practical applications in information involve performing a sequence of X pulses and β swaps, processing technologies, we do not think they can be leading to an exponential convergence to the ground state in immediately applied to improve the performance of the number of cooling rounds [15]. It was also noted that if modern-day classical information processors. Quantum the interactions with the bath are restricted to be Markovian advantages proven here arise only once we get to the and destroy superpositions, then one cannot cool the target fundamental limit of encoding classical bits in quantized system below the environment’s temperature. levels of memory systems. As mentioned in Sec. IB, In the scheme of Ref. [15], it is the memory effects, whenever a bit is encoded in macroscopic degrees of encoded in system-bath correlations, that are central in freedom (that actually consist of d ≫ 2 distinct quantum achieving the desired cooling performance. Our Result 1 levels), one can employ a subset of them to act as an internal implies that this control over system-bath correlations can memory and, e.g., unlock the possibility of a classical be replaced by the control over the coherent properties of Markovian bit swap. Moreover, from a practical perspective, the system. Specifically, a time-dependent Lindbladian the cost of coherent control over all degrees of freedom of a with a thermal fixed point is able to generate the required memory system is massive and, so far, seems to greatly β swap, which implies that qubit systems can be cooled all exceed the benefits we have proven here. In some sense, the the way to their ground state without exploiting any situation resembles the one with the famous Landauer’s memory effects. This is a purely quantum phenomenon, principle [51]: While switching from irreversible to revers- exploiting control over coherent resources. The practical ible computations, one can go below the fundamental impact of these protocols, of course, depends on the 2 kBT log limit of dissipated heat per bit of erased informa- possibility of experimentally realizing these exotic dynam- tion by performing all logical gates reversibly [52], the ics, which is an important question put forward by this technological cost related to such a change still exceeds investigation. possible gains [53]. Nevertheless, if in the future we have Moreover, the phenomenon identified in the previous coherent control over quantum systems as good as incoher- section for qubit systems may be relevant in a much broader ent control over classical systems, we will need to use fewer setup, as the following general mechanism illustrates. memory states to implement certain processes. Suppose, for simplicity, that there are no degeneracies in

021019-15 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021) the Bohr spectrum of the system; i.e., the allowed energy − differences, fEi Ejgi≠j, for the studied system are all distinct. Given the initial classical state of the system, ρð0Þ¼ρp, and its evolution described by ρðtÞ, use the following decomposition:

ρ ρ ðtÞ¼ rðtÞ þ CðtÞ; ð50Þ where rðtÞ is the population in the energy eigenbasis and CðtÞ denotes the off-diagonal terms (“coherences”) at time t. Any classical Markovian evolution with a thermal fixed point requires ðd=dtÞF(rðtÞ) ≤ 0 and CðtÞ¼0 at all t ≥ 0. Any quantum Markovian dynamics requires d=dt F (ρ t ) ≤ 0 for all t ≥ 0, where F is the quantum ð Þ Q ð Þ Q FIG. 9. Free energy stored in coherence. Under a Markovian nonequilibrium free energy: master equation with a thermal fixed point, the quantum free energy FQ is monotonically decreasing in time. Since ρ ρ − β−1 ρ FQð Þ¼Trð HSÞ Sð Þ; ð51Þ FQ ¼ F þ A=β, part of the classical component F can be stored ≤ in the coherent component A at times t t and recovered later. with HS denoting the Hamiltonian of the system and At time t ¼ t, the population is thermal, so the classical free SðρÞ¼−Trðρ log ρÞ being the von Neumann entropy. energy is at a minimum; however, A ≠ 0,soFQ is above the ≥ Recall that FQðρÞ can be additively decomposed into minimum. For t t, part of this coherent free energy is two non-negative components [39]: converted back into classical free energy. Hence, the latter undergoes a backflow, which classically would require memory −1 effects. FQ(ρðtÞ) ¼ F(rðtÞ) þ β A(ρðtÞ): ð52Þ

The first term is the classical nonequilibrium free energy, more physical ones. The unifying notion is that of the and the second one is a quantum component (called underlying Markovian master equation and the advantages “ ” asymmetry ), which measures the coherent contribution one gains with quantum controls as compared to the 0 r 0 p 0 0 to FQ [59].Att ¼ ,wehave ð Þ¼ and Cð Þ¼ , classical ones. The driving force behind these advantages (ρ 0 ) 0 which implies A ð Þ ¼ . Hence, both classical and is the superposition principle, which provides a wider arena quantum free energies for the initial state are equal to for memoryless evolutions to unfold. While Holevo’s p Fð Þ. However, a Markovian quantum evolution can store theorem [2] prevents us from retrieving more than n bits ≥ 0 some free energy in coherences at times t since only the of information from n qubits, we see that, in many other sum of the classical and quantum components of the free respects, superpositions can take over the role played by a energy must monotonically decrease in time. Thus, at time r γ classical memory. t when ðtÞ¼ , one is classically stuck in a free-energy This result is most clearly captured by the notion of minimum FðγÞ and cannot proceed further. But quantum ≠ 0 quantum-embeddable stochastic processes introduced here: mechanically, one can have CðtÞ , and hence (ρ ) γ processes that do not require any memory quantum FQ ðtÞ >Fð Þ. Markovian quantum dynamics can thus mechanically, but classically they do. We found several access other states at t>t by converting back some of the classes of such processes, but the full characterization is left quantum component of free energy into classical free as a big, open problem for future research. It may be energy. This process allows one to achieve the required especially difficult to taking into account that the classical backflow into the classical component of the free energy, as version of the problem is still unsolved for d>3; however, illustrated in Fig. 9. Storing free energy in coherence is of recent progress on accessibility of quantum channels via course a nontrivial task (it requires the aid of an external the Lindblad semigroup [60] is promising. Moreover, one source of coherence, and, certainly, it cannot be done with may still hope for a partial characterization; e.g., it would thermal operations [59]), but our qubit construction has be of particular interest to identify the outer limits to the shown that it is possible with quantum Markovian master quantum advantage by means of necessary conditions for equations. quantum embeddability. We have also proved the quantum advantage in terms of VI. OUTLOOK memory and time-step cost of implementing a given The central task of this paper was to introduce a unifying stochastic process. By means of computational-basis input framework to prove that quantum dynamics offers memory states and measurements, a quantum Markovian master improvements over the classical stochastic evolution in a equation on a ðd þ mQÞ-dimensional quantum system variety of settings, from the more computational ones to the realizes a d × d stochastic process P in τQ time steps.

021019-16 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

We compared ðmQ; τQÞ with the minimal ðmC; τCÞ required from the European Union’s Marie Sklodowska-Curie in order to simulate the same P through any classical individual fellowships (No. H2020-MSCA-IF-2017 and Markovian master equation. When P is deterministic, i.e., a No. GA794842), Spanish MINECO (Severo Ochoa SEV- function over a discrete state space, we saw that, typically, 2015-0522 and Project No. QIBEQI FIS2016-80773-P), one has a gap between ðmQ; τQÞ and ðmC; τCÞ. Fundacio Cellex and Generalitat de Catalunya (CERCA From a technological perspective, our investigations led Programme and SGR 875), and ERC Grant EQEC to the question of whether these in-principle simulation No. 682726. advantages translate into practical ones. There is a long history, dating back to Landauer, of associating a cost to APPENDIX A: TYPICAL FUNCTIONS erasure [51] because of the unavoidable dissipation of entropy required for the implementation of such processes. Consider a function f∶Zd → Zd sampled uniformly Notably, these costs are common to classical and quantum from the set of all such functions. First, focus on the scenarios. On the other hand, we showed here that the dimension of the image. The probability that a given a ∈ d memory and time-step costs of computations under mem- Zd is not in the image of f is ð1 − 1=dÞ ≈ 1=e for large d. oryless quantum dynamics are typically lower than the The average dimension of the image is hence a binomial corresponding classical costs. However, practical advan- with average d½1 − ð1=eÞ and variance ðd=eÞ½1 − ð1=eÞ. tages can be expected once we overcome technological Hence, for large d, the size of the image of f is OðdÞ. barriers concerning (a) information density and (b) coherent Second, focus on the number of fixed points. The prob- control of quantum systems. As we do not expect these ability that a given a ∈ Zd is a fixed point is 1=d. The barriers to be overcome within the next few decades, we number of fixed points is hence a binomial with average decided not to discuss this point as a potential application. ð1=dÞ × d ¼ 1 and variance 1 × ½1 − ð1=dÞ. As such, for It would be of interest to extend our framework to large d, the number of fixed points is Oð1Þ. sequential scenarios, where one samples PijjðtkÞ over the visible states i, j at discrete times t , and looks for a predictive k APPENDIX B: PROOF OF THEOREM 4 dynamical model matching the observed data. We showed that quantum models can reproduce the same data with Proof. Given a function f∶Zd → Zd, let us denote the advantages in terms of the number of hidden states and time size of the image of f by r ¼jimgðfÞj. Next, we denote the r steps. It would be worthwhile to investigate whether such an elements of imgðfÞ by fykgk¼1, and the remaining elements advantage becomes larger in sequential scenarios. Whether Z d belonging to dnimgðfÞ by fykgk¼rþ1. Moreover, for each these scenarios translate to practical advantages that can be yk with k ≤ r, i.e., for each of the r elements of the image of realized in near-term quantum devices is an intriguing open f, let us denote the corresponding preimage as follows: question of the present investigation. Finally, our results may also find applicability in the −1 k dk f ðykÞ¼fx g 1: ðB1Þ realm of quantum thermodynamics. Our proof that qubit j j¼ systems can be quantum mechanically cooled below the Note that the sets fxkgdk are disjoint and that their union is environmental temperature using neither memory effects j j¼1 Z nor ancillas (something that is impossible classically) the full set d. suggests that we should look for realistic Markovian master Now, we construct a permutation function fπ and an Z Z equations in which this phenomenon can be observed. One idempotent function fI, both mapping d to d, such that could also investigate possible memory advantages in ∘ control (and especially cooling) for higher-dimensional f ¼ fI fπ: ðB2Þ systems. First, fπ is defined by ACKNOWLEDGMENTS ( yk if j ¼ 1 k fπðx Þ¼ P ðB3Þ The authors would like to thank Stephen Bartlett for j −1 yrþ k ðd −1Þþj−1 otherwise; hosting them at the initial stage of the project, as well as l¼1 l Iacopo Carusotto and Claudio Fontanari for their kind P 0 ≡0 hospitality in Trento, where part of this project was carried where theP convention is that l¼1 . Then, introducing ≔ s−1 − 1 out. K. K. would also like to thank K. Życzkowski for ns r þ l¼1ðdl Þ, the idempotent map fI is given by helpful discussions. K. K. acknowledges financial support  ≤ by the Foundation for Polish Science through the IRAP yk for k r fIðykÞ¼ ðB4Þ project co-financed by EU within the Smart Growth ys for k ∈ fns þ 1;ns þ ds − 1g: Operational Programme (Contract No. 2018/MAB/5) and through the TEAM-NET project (Contract No. POIR.04.04. With the above definitions, it is a straightforward calcu- 00-00-17C1/18-00). M. L. acknowledges financial support lation to show that Eq. (B2) holds.

021019-17 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

1 Finally, we need to show that there exist time-independent ψ 0 ψ 0 (ρ0 − 1 − ρ ) L L j 0ih 0j¼ ð R0Þ γ ; ðC4bÞ Lindbladians π and I that generate Pfπ and PfI , i.e., R0 f0; 1g-valued stochastic matrices realizing functions fπ and 1 ψ ψ − (ρ − 1 ρ ) fI, respectively. Thus, by Definition 6, we will prove that j 1ih 1j¼ ð þ R1Þ γ ; ðC4cÞ R1 any function f can be realized quantumly without the use of 1 memory and in at most two time steps. First, since Pfπ is a 0 0 0 jψ 1ih ψ 1j¼− (ρ − ð1 þ R1Þργ): ðC4dÞ permutation, its generator Lπ exists and is simply given by R1 the commutator with the Hamiltonian (see discussion in The above four projectors are used to define four unitary Sec. II C). Now, in the case of fI, notice that it is a function matrices, sending r disjoint sets Yk of size dk, ⊥ n þd −1 U ¼j0ih ψ jþj1ih ψ j; ðC5Þ Y ¼ y ∪ fy g k k ; ðB5Þ i i i k k l l¼nkþ1 ∈ 0 1 0 with i f ; g and an analogous primed definition for Ui. to a single element yk of the given set Yk. This mapping These matrices are then employed to define four rotated can be easily realized for t → ∞ by a classical generator † 0 f fixed states Γ ≔ U ργU and analogously for Γ . Let us L i i i i (so also by the corresponding quantum Lindbladian) parametrize these states as follows: given by 8 pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ! ϵ 1 − <> −1 for k ¼ l and l>r ai i aið aiÞ Γi ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi : ðC6Þ L ¼ 1 for k ¼ f ðlÞ and l>r ðB6Þ ϵ a ð1 − a Þ 1 − a ykjyl :> I i i i i 0 otherwise: These eight parameters are then used to calculate the ▪ following eight new parameters: sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi a ð1 − a0Þ ϵ ϵ0 APPENDIX C: EXTREMAL PATH α ¼ i i i i ; ðC7aÞ i 0 1 − 1 − ai 1 − ϵ2 aið aiÞ 0 ð i Þ Consider the initial qubit state ρ described by the Bloch ai vector ðx; 0;zÞ and a fixed state ργ with the Bloch vector sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð0; 0; ζÞ. Here, we show how to construct quantum chan- ða0 − a Þð1 − a0Þ ϵ0 β ¼ i i i i ; ðC7bÞ nels E0 and E1 with a fixed point ργ, evolving ρ along the i 1 − 0 1 − ai 1 − ϵ2 ð aiÞai 0 ð i Þ ai extremal circles ðc0;R0Þ and ðc1;R1Þ, as derived in vffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi Ref. [50] and described in Sec. IV B. More precisely, for u sffiffiffiffiffiffiffiffiffiffiffiffi u 1 − ϵ02 − ai 1 − ϵ2 Δ 0 E ρ ρ0 ð i Þ 0 ð i Þ 1 − 0 agiven > , we look for 0 that evolves to with t ai ai γi ¼ ; ðC7cÞ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1 − ai 1 − ϵ2 1 − a0 ð i Þ ai 0 Δ 0 2 − ( 0 − ζ 1 − )2 i z ¼ z þ ;x¼ R0 z ð R0Þ : ðC1Þ sffiffiffiffiffiffiffiffiffiffiffiffiffiffi 0 a − ai Similarly, for a given Δ > 0, we look for E1 that evolves ρ ω i i ¼ 1 − : ðC7dÞ to ρ0 with ai qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 0 0 2 0 2 These parameters, in turn, allow us to introduce the z z − Δ;x R − (z − ζ 1 R1 ) : C2 ¼ ¼ 1 ð þ Þ ð Þ following operators:       Note that, in both cases, there is a maximal value of Δ for x0 10 0 ωi 00 Δ A⋆ ¼ ;B⋆ ¼ ;C⋆ ¼ ; ðC8Þ to stay real, and we assume that is below that maximal i 0 α i 0 β i 0 γ value (otherwise, the map we are looking for does not i i i exist). Below, we explain how to construct Kraus operators which, after unitary rotations, yield the final Kraus oper- E fAi;Bi;Cig for i so that ators we seek: E † † † ið·Þ¼Aið·ÞAi þ Bið·ÞBi þ Cið·ÞCi : ðC3Þ 0† ⋆ 0† ⋆ 0† ⋆ Ai ¼ Ui Ai Ui;Bi ¼ Ui Bi Ui;Ci ¼ Ui Ci Ui: ðC9Þ The construction is based on the general construction for channels mapping between pairs of qubit states as provided by Alberti and Uhlmann in Ref. [48]. The first step is to define the following projectors: 1 jψ 0ih ψ 0j¼ (ρ − ð1 − R0Þργ); ðC4aÞ [1] N. Gisin, G. Ribordy, W. Tittel, and H. Zbinden, Quantum R0 Cryptography, Rev. Mod. Phys. 74, 145 (2002).

021019-18 QUANTUM ADVANTAGE IN SIMULATING STOCHASTIC … PHYS. REV. X 11, 021019 (2021)

[2] M. A. Nielsen and I. L. Chuang, Quantum Computation [22] P. Carette, Characterizations of Embeddable 3 × 3 Stochas- and Quantum Information (Cambridge University Press, tic Matrices with a Negative Eigenvalue, New York J. Math. Cambridge, England, 2010). 1, 129 (1995), http://nyjm.albany.edu/j/1995/1-8p.pdf. [3] I. M. Georgescu, S. Ashhab, and F. Nori, Quantum [23] M. M. Wolf, J. Eisert, T. S. Cubitt, and J. I. Cirac, Assessing Simulation, Rev. Mod. Phys. 86, 153 (2014). Non-Markovian Quantum Dynamics, Phys. Rev. Lett. 101, [4] C. L. Degen, F. Reinhard, and P. Cappellaro, Quantum 150402 (2008). Sensing, Rev. Mod. Phys. 89, 035002 (2017). [24] V. Gorini, A. Kossakowski, and E. C. G. Sudarshan, Com- [5] W. Y. Suen, J. Thompson, A. J. Garner, V. Vedral, and M. pletely Positive Dynamical Semigroups of N-Level Systems, Gu, The Classical-Quantum Divergence of Complexity in J. Math. Phys. (N.Y.) 17, 821 (1976). Modelling Spin Chains, Quantum 1, 25 (2017). [25] G. Lindblad, On the Generators of Quantum Dynamical [6] J. Thompson, A. J. Garner, J. R. Mahoney, J. P. Crutchfield, Semigroups, Commun. Math. Phys. 48, 119 (1976). V. Vedral, and M. Gu, Causal Asymmetry in a Quantum [26] M. Campisi, P. Hänggi, and P. Talkner, Colloquium: World, Phys. Rev. X 8, 031013 (2018). Quantum Fluctuation Relations: Foundations and [7] F. C. Binder, J. Thompson, and M. Gu, Practical Unitary Applications, Rev. Mod. Phys. 83, 771 (2011) Simulator for Non-Markovian Complex Processes, Phys. [27] I. Bengtsson, The Importance of Being Unistochastic, Rev. Lett. 120, 240502 (2018). arXiv:quant-ph/0403088. [8] F. Ghafari, N. Tischler, J. Thompson, M. Gu, L. K. Shalm, [28] I. Bengtsson, Å. Ericsson, M. Kuś, W. Tadej, and K. V. B. Verma, S. W. Nam, R. B. Patel, H. M. Wiseman, and Życzkowski, Birkhoff’s Polytope and Unistochastic Matri- G. J. Pryde, Dimensional Quantum Memory Advantage in ces, n ¼ 3 and n ¼ 4, Commun. Math. Phys. 259, 307 the Simulation of Stochastic Processes, Phys. Rev. X 9, (2005). 041013 (2019). [29] P. Lencastre, F. Raischel, T. Rogers, and P. G. Lind, From [9] T. J. Elliott, C. Yang, F. C. Binder, A. J. Garner, J. Thompson, Empirical Data to Time-Inhomogeneous Continuous Mar- and M. Gu, Extreme Dimensional Compression with Quan- kov Processes, Phys. Rev. E 93, 032135 (2016). tum Modelling, Phys. Rev. Lett. 125, 260501 (2020). [30] Y.-T. Poon and N.-K. Tsing, Inclusion Relations between [10] D. H. Wolpert, A. Kolchinsky, and J. A. Owen, A Space– Orthostochastic Matrices and Products of Pinching Time Tradeoff for Implementing a Function with Master Matrices, Linear Multilinear Algebra 21, 253 (1987). Equation Dynamics, Nat. Commun. 10, 1727 (2019). [31] A. Streltsov, G. Adesso, and M. B. Plenio, Colloquium: [11] H.-P. Breuer, E.-M. Laine, and J. Piilo, Measure for the Quantum Coherence as a Resource, Rev. Mod. Phys. 89, Degree of Non-Markovian Behavior of Quantum Processes 041003 (2017). in Open Systems, Phys. Rev. Lett. 103, 210401 (2009). [32] I. Marvian and R. W. Spekkens, How to Quantify Coher- [12] P. Erker, M. T. Mitchison, R. Silva, M. P. Woods, N. Brunner, ence: Distinguishing Speakable and Unspeakable Notions, and M. Huber, Autonomous Quantum Clocks: Does Thermo- Phys. Rev. A 94, 052324 (2016). dynamics Limit Our Ability to Measure Time?, Phys. Rev. X [33] A. Montina, Exponential Complexity and Ontological 7, 031022 (2017). Theories of Quantum Mechanics, Phys. Rev. A 77, 022104 [13] V. Gualtieri, C. Benedetti, and M. G. Paris, Quantum- (2008). classical Dynamical Distance and Quantumness of Quan- [34] L. Hardy, Quantum Ontological Excess Baggage, Stud. tum Walks, Phys. Rev. A 102, 012201 (2020). Hist. Philos. Sci. B 35, 267 (2004). [14] M. Lostaglio and K. Korzekwa, Fundamental Constraints of [35] D. Freedman, Approximating Countable Markov Chains Quantum Thermodynamics in the Markovian Regime (to be (Springer-Verlag, Berlin, 1983). published). [36] H.-P. Breuer and F. Petruccione, The Theory of Open [15] Á. M. Alhambra, M. Lostaglio, and C. Perry, Heat-Bath Quantum Systems (Oxford University Press, New York, Algorithmic Cooling with Optimal Thermalization Strate- 2002). gies, Quantum 3, 188 (2019). [37] M. Lostaglio, Á. M. Alhambra, and C. Perry, Elementary [16] P. Taranto, F. Bakhshinezhad, P. Schüttelkopf, and M. Huber, Thermal Operations, Quantum 2, 52 (2018). Exponential Improvement for Quantum Cooling through [38] M. Horodecki and J. Oppenheim, Fundamental Limitations Finite Memory Effects, Phys. Rev. Applied 14,054005 for Quantum and Nanoscale Thermodynamics, Nat. Com- (2020). mun. 4, 2059 (2013). [17] E. B. Davies, Embeddable Markov Matrices, Electron. J. [39] M. Lostaglio, An Introductory Review of the Resource Pro 15, 1474 (2010). Theory Approach to Thermodynamics, Rep. Prog. Phys. [18] G. Elfving, Zur Theorie der Markoffschen Ketten, Acta Soc. 82, 114001 (2019). Sci. Fennicae, n. Ser. A2 8, 1 (1937). [40] E. Ruch, R. Schranner, and T. H. Seligman, The Mixing [19] J. F. C. Kingman, The Imbedding Problem for Finite Mar- Distance, J. Chem. Phys. 69, 386 (1978). kov Chains, Probab. Theory Relat. Fields 1, 14 (1962). [41] A. W. Marshall, I. Olkin, and B. C. Arnold, Inequalities: [20] J. T. Runnenburg, On Elfving’s Problem of Imbedding a Theory of Majorization and Its Applications (Springer, Time-Discrete Markov Chain in a Time-Continuous One for New York, 2010). Finitely Many States I, P. K. Ned. Akad. A Math 65, 536 [42] E. B. Davies, Markovian Master Equations, Commun. (1962). Math. Phys. 39, 91 (1974). [21] G. S. Goodman, An Intrinsic Time for Non-Stationary [43] W. Roga, M. Fannes, and K. Życzkowski, Davies Finite Markov Chains, Probab. Theory Relat. Fields 16, Maps for Qubits and Qutrits, Rep. Math. Phys. 66, 311 165 (1970). (2010).

021019-19 KAMIL KORZEKWA and MATTEO LOSTAGLIO PHYS. REV. X 11, 021019 (2021)

[44] R. Alicki and R. Kosloff, Introduction to Quantum Thermo- [53] J. Koomey, S. Berard, M. Sanchez, and H. Wong, Impli- dynamics: History and Prospects,inThermodynamics in cations of Historical Trends in the Electrical Efficiency of the Quantum Regime: Fundamental Aspects and New Computing, IEEE annals of the history of computing 33,46 Directions, edited by F. Binder, L. A. Correa, C. Gogolin, (2010). J. Anders, and G. Adesso (Springer Nature, Switzerland, [54] D. P. DiVincenzo, The Physical Implementation of Quantum 2018), pp. 1–33. Computation, Fortschr. Phys. 48, 771 (2000). [45] R. Uzdin, A. Levy, and R. Kosloff, Equivalence of Quantum [55] L. J. Schulman and U. V. Vazirani, Molecular Scale Heat Heat Machines, and Quantum-Thermodynamic Signatures, Engines and Scalable Quantum Computation,inProceed- Phys. Rev. X 5, 031044 (2015). ings of the 31st Annual ACM Symposium on Theory of [46] P. Faist and R. Renner, Fundamental Work Cost of Quantum Computing (ACM, 1999), pp. 322–329, https://doi.org/ Processes, Phys. Rev. X 8, 021011 (2018). 10.1145/301250.301332. [47] C. Perry, P. Ćwikliński, J. Anders, M. Horodecki, and J. [56] P. O. Boykin, T. Mor, V. Roychowdhury, F. Vatan, and R. Oppenheim, A Sufficient Set of Experimentally Implement- Vrijen, Algorithmic Cooling and Scalable NMR Quantum able Thermal Operations for Small Systems, Phys. Rev. X 8, Computers, Proc. Natl. Acad. Sci. U.S.A. 99, 3388 (2002). 041049 (2018). [57] N. A. Rodríguez-Briones, Novel Heat-Bath Algorithmic [48] P. Alberti and A. Uhlmann, A Problem Relating to Positive Cooling Methods, Ph.D. thesis, University of Waterloo Linear Maps on Matrix Algebras, Rep. Math. Phys. 18, 163 (2020). (1980). [58] N. A. Rodríguez-Briones, E. Martín-Martínez, A. Kempf, [49] G. Gour, Quantum Resource Theories in the Single-Shot and R. Laflamme, Correlation-Enhanced Algorithmic Cool- Regime, Phys. Rev. A 95, 062314 (2017). ing, Phys. Rev. Lett. 119, 050502 (2017). [50] K. Korzekwa, Structure of the Thermodynamic Arrow of [59] M. Lostaglio, D. Jennings, and T. Rudolph, Description of Time in Classical and Quantum Theories, Phys. Rev. A 95, Quantum Coherence in Thermodynamic Processes Re- 052318 (2017). quires Constraints Beyond Free Energy, Nat. Commun. [51] R. Landauer, Irreversibility and Heat Generation in the 6, 6383 (2015). Computing Process, IBM J. Res. Dev. 5, 183 (1961). [60] F. Shahbeigi, D. Amaro-Alcalá, Z. Puchała, and K. [52] C. H. Bennett, Logical Reversibility of Computation, IBM J. Życzkowski, Log-Convex Set of Lindblad Semigroups Res. Dev. 17, 525 (1973). Acting on N-Level System, arXiv:2003.12184.

021019-20