원시데이터 수집 시스템
선정목록으로

Identifying optimal cycles in quantum thermal machines with reinforcement-learning

관련 산업용 섬유 · (8) HDPE 섬유(FORPE)

기본 정보

저자
  1. Paolo Andrea Erdman — Freie Universität Berlin, Department of Mathematics and Computer Science, Arnimallee 6, 14195, Berlin, Germany
  2. Frank Noé — Freie Universität Berlin, Department of Mathematics and Computer Science, Arnimallee 6, 14195, Berlin, Germany|||Freie Universität Berlin, Department of Physics, Arnimallee 6, 14195, Berlin, Germany|||Microsoft Research, Cambridge, UK|||Rice University, Department of Chemistry, Houston, TX, 77005, USA
DOI
10.1038/s41534-021-00512-0
저널
npj Quantum Information
발행년도
2022
발행기관
Nature Portfolio
피인용수
108
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1038/s41534-021-00512-0
토픽
Thermal properties of materials
OpenAlex ID
W3198407528

평가 내용

관련도
관련
사업분야
산업용 섬유 · (8) HDPE 섬유(FORPE)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '산업용 섬유 > HDPE 섬유(FORPE)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

초록이 없습니다.

본문 78,339자

본문 펼치기
/ pjq ARTICLE OPEN # Identifying optimal cycles in quantum thermal machines with reinforcement-learning Paolo A. Erdman [1](http://orcid.org/0000-0003-4626-2869) ✉ and Frank Noé1,2,3,4 ✉ The optimal control of open quantum systems is a challenging task but has a key role in improving existing quantum information processing technologies. We introduce a general framework based on reinforcement learning to discover optimal thermodynamic cycles that maximize the power of out-of-equilibrium quantum heat engines and refrigerators. We apply our method, based on the soft actor-critic algorithm, to three systems: a benchmark two-level system heat engine, where we find the optimal known cycle; an experimentally realistic refrigerator based on a superconducting qubit that generates coherence, where we find a non-intuitive control sequence that outperforms previous cycles proposed in literature; a heat engine based on a quantum harmonic oscillator, where we find a cycle with an elaborate structure that outperforms the optimized Otto cycle. We then evaluate the corresponding <mark>effciency</mark> i <mark>at</mark> <mark>maximum</mark> <mark>power.</mark> <mark>npj</mark> <mark>Quantum</mark> <mark>Information</mark> <mark>(2022)8:1</mark> <mark>;</mark> <mark>[https://doi.org/10.1038/s41534-021-00512-0](https://doi.org/10.1038/s41534-021-00512-0)</mark> INTRODUCTION Thermal machines convert between thermal and mechanical energy in a controlled manner. Examples include heat engines such as steam and Otto engines, which extract useful work from a temperature difference, and refrigerators, that extract heat from a cold bath. Quantum thermal machines (QTMs) perform thermodynamic cycles via nanoscale systems that can be as small as single particles or two-level quantum systems (qubits). Quantum heat engines and refrigerators could find applications in heat management at the nanoscale <sup>1</sup>, or for on-chip active cooling <sup>2,3</sup> . Quantum thermodynamics is a rapidly growing research area that aims at the understanding, design, and optimization of QTMs <sup>4</sup> . An open fundamental question is whether quantum effects can boost the performance of QTMs <sup>2,4,5</sup> . On the other hand, understanding how to optimally control the nonequilibrium dynamics of open quantum systems is a complicated task, which can improve existing quantum information processing technologies. Nowadays it is possible to construct devices that behave as quantum systems with few degrees of freedom in platforms such as trapped ions <sup>6,7</sup>, electron spins associated with nitrogen-vacancy centers <sup>8</sup>, circuit quantum electrodynamics <sup>9</sup>, and quantum dots <sup>10</sup>, and to control their state through time-dependent controls, such as electro-magnetic pulses or gate voltages. The heat flow across these systems has been measured <sup>11–14</sup>, and recent experimental realizations of QTMs have been reported <sup>15–22</sup> . While the laws of thermodynamics pose universal constraints on the efficiency of thermal machines, regardless of their classical or quantum nature, they do not pose any restriction on the dynamics of the system, thus on the speed at which it operates. Therefore, it is crucial to study the power to discover the potential benefits of using QTMs. However, optimizing the power is a challenging task: having to operate in finite-time, the state can be driven far from equilibrium, requiring us to model the full dynamics of the quantum system. Furthermore, strategies are needed to identify optimally controlled cycles. Power maximization of QTMs <sup>4,23</sup> is generally carried out either in specific regimes or assuming a priori a specific shape of the control cycle. Within the slow-driving <sup>24–30</sup> and fast-driving regime, general strategies have been recently derived <sup>31–33</sup> . Beyond these regimes, common strategies consider specific cycle structures <sup>34–39</sup>, such as the celebrated Otto cycle <sup>40–55</sup>, and optimize specific aspects of the cycle. Shortcuts to adiabaticity <sup>56–63</sup>, and variational optimization strategies have also been employed <sup>64–66</sup> . The impact of quantum effects on the performance of QTMs is not straightforward. Several studies have found quantum advantages <sup>50,51,55,67–69</sup>, while coherence-induced power losses were proven in linear response for small driving amplitudes <sup>70</sup> and in specific models <sup>42,48,54,64,71</sup> . In general, there is no guarantee that typical regimes and specific cycles considered in literature are optimal for power maximization. Overcoming this limitation may allow us to unlock quantum advantages in power extraction. This calls for the development of powerful search strategies to tackle powermaximization without relying on specific control sequences or assumptions. In this manuscript, we propose a Reinforcement Learning (RL) <sup>72</sup> based approach to optimize the performance of QTMs. Specifically, we use a generalization of soft actor-critic (SAC) methods <sup>73,74</sup> for combined discrete and continuous actions, introduced in the context of robotics and video games <sup>75,76</sup>, to discover thermodynamic cycles that deliver maximum power. RL has received a great deal of attention for its success at mastering complicated tasks beyond the human level such as playing video games <sup>77,78</sup>, the board-game Go <sup>79</sup>, and for robotic applications <sup>80</sup> . RL has been recently used for accurate quantum state preparation <sup>81–84</sup>, outperforming previous state-of-the-art methods <sup>85,86</sup>, to minimize entropy production in closed quantum systems <sup>87</sup>, for faulttolerant quantum computation <sup>88</sup>, and machine learning methods have been used for quantum thermometry <sup>89</sup> . Our RL-based scheme for power maximization of QTMs is generic in that it makes no assumptions on the shape of the control cycle. Rather, it starts from scratch, allowing the RL agent 1Freie Universität Berlin, Department of Mathematics and Computer Science, Arnimallee 6, 14195 Berlin, Germany. 2Freie Universität Berlin, Department of Physics, Arnimallee 6, 14195 Berlin, Germany. <sup>3</sup> Rice University, Department of Chemistry, Houston, TX 77005, USA. <sup>4</sup> Microsoft Research, Cambridge, UK. <sup>✉</sup> email: [p.erdman@fu-berlin.de;](mailto:p.erdman@fu-berlin.de) [frank.noe@fu-berlin.de](mailto:frank.noe@fu-berlin.de) 2 P.A. Erdman and F. Noé to arbitrarily couple or decouple the quantum system from any bath, and to arbitrarily manipulate the control parameter. We apply our approach to three paradigmatic systems that have been well studied in literature: (i) a benchmark heat engine based on a two-level system, where our approach automatically finds the known maximum power cycle <sup>90</sup> . (ii) an experimentally realistic refrigerator based on a superconducting qubit coupled to resonant circuits <sup>48</sup> which generates coherence during its cycle. Our RL approach discovers a new and non-intuitive cycle that outperforms previous proposals <sup>48,54,62</sup> . (iii) a heat engine based on a harmonic oscillator <sup>42</sup>, where we find a cycle with an elaborate structure that shares qualitative similarities with the Otto cycle, but which performs better thanks to additional features. We complement the study of these systems by analyzing the corresponding efficiency at maximum power. The complexity and structure of these cycles demonstrate both the ability of the RL agent to choose actions based on a long-term return and the complicated non-analytic nature of optimal cycles. Our results also show that the celebrated Otto cycle is not in general optimal for power maximization. Furthermore, we show that the detrimental effect of coherence on the performance of QTMs <sup>71</sup>, specifically observed both in the superconducting qubit and harmonic oscillator cases, can be mitigated thanks to carefully crafted cycles. RESULTS Quantum thermal machines We describe a QTM by a quantum system (QS), acting as a working medium, that can exchange heat with a hot (H) or cold (C) thermal bath characterized by inverse temperatures βH < βC (Fig. 1). We can control the evolution of the QS and exchange work with it through a set of time-dependent control parameters u(t). In classical thermal machines, the working medium could be a gas in a cylinder, and u(t) could be the time-dependent position of the piston which influences the state of the gas and allows us to exchange energy. In a QTM, the working medium is a quantum system whose Hamiltonian can be parametrized by the control variables u(t) <sup>91</sup> . Here we study finite-time thermodynamics of QTMs within the Markovian regime using the commonly employed master equation <sup>92–95</sup> . This approach describes the time-evolution of the reduced density matrix of the QS, ρ^ðtÞ, under the assumption of weak system-bath interaction. Setting ℏ = 1, the master equation reads commutator, and D <sup>ð</sup> u <sup>α</sup> ð <sup>Þ</sup> tÞ;dðtÞ <sup>½��</sup> <sup>describes</sup> <sup>the</sup> <sup>effect</sup> <sup>of</sup> <sup>the</sup> <sup>coupling</sup> between the QS and bath α = H, C. d(t) = {Hot, Cold, None} is an additional discrete control parameter which allows us to choose which bath (if any) is coupled to the QS. We compute the extracted power P(t) and the instantaneous heat flux Jα(t) flowing out of bath α in the standard way <sup>23</sup> which guarantees the validity of the first law of thermodynamics ∂U(t)/(∂t) = − P(t) + ∑αJα(t), the internal energy being defined as U ¼ Tr½ρ^ðtÞH <sup>^</sup> ½uðtÞ�� (see “Methods” for details). The two main thermal machines we consider are the heat engine and the refrigerator. A heat engine is used to extract work, while a refrigerator is used to extract heat from the cold bath. Therefore, we define P½E�ðtÞ � X α¼H;C JαðtÞ; P½R�ðtÞ � JCðtÞ; (2) respectively as the instantaneous power of a heat engine E (since the total heat extracted coincides with the work if the internal energy difference is zero), and as the instantaneous cooling power of a refrigerator R. Our goal is to determine the optimal driving, i.e. to determine the functions u(t) and d(t) that maximize the average power in the long run. We thus define the following exponentially weighted average of the power <u>∂</u> - ∂t <sup>ρ^ðtÞ ¼ �i</sup> <sup>H^½uðtÞ�; ^ρðtÞ</sup> þ X α D <sup>ð</sup> u <sup>α</sup> ð <sup>Þ</sup> tÞ;dðtÞ <sup>½ρ^ðtÞ�;</sup> (1) Z 1 hP½ν�i ¼ ~~γ~~ e <sup>�γt</sup> P½ν�ðtÞ dt; (3) 0 where ~~γ~~ determines the timescale over which we average. While we do not enforce any periodic structure on the controls u(t) and d(t), we expect the RL agent to automatically discover the optimality of periodically driving the QTM and the corresponding driving period. The intuition is the following: in the short term, we can maximize the power by taking advantage of the state preparation of the system, for example by extracting all the free energy from the system. However, the amount of work that can be extracted this way is bounded, while the work that can be extracted through cycles scales with the number of performed cycles, i.e. with time. Therefore in the long run, i.e. for small enough ~~γ~~, we expect the maximization of Eq. (3) to naturally discover thermodynamic cycles and to prevent the exploitation of transient effects. We confirm this hypothesis in all QTMs studied below. Reinforcement learning for quantum thermal machines We formulate the power optimization problem as a discounted, continuing RL task. As we will demonstrate, this approach is able to learn far-from-equilibrium finite-time thermodynamic cycles with high performance. RL is a general framework that tackles optimization problems formulated in the following way. As schematically shown in Fig. 2, a computer agent (blue box) must learn to master some tasks by repeated interactions with some environment (gray box). Discretizing time in time steps Δt, we denote with si 2 S the state of the environment at time t = iΔt, where S is the state space. The agent must choose an action ai 2 A to perform on the environment based on its current policy (lower orange arrow). A is the action space, and the policy π(ai∣si) is a function that describes the probability distribution of choosing action ai, given that the environment is in state si. The environment then evolves its state according to the chosen action and provides feedback back to the agent by returning the updated state si+1 and a scalar quantity ri+1 known as the reward (upper orange arrow). This procedure is reiterated for a large number of time steps. At every time step ti, the aim of the agent is to use the feedback it receives from the environment to learn an optimal policy that maximizes, in expectation, the return, i.e. the total future reward it where H <sup>^</sup> ½uðtÞ� is the Hamiltonian of the QS which depends explicitly on time via the control parameters u(t), [⋅, ⋅] denotes the <u>Quantum</u> System ( ) … ( ) ( ) Fig. 1 Schematic representation of a quantum thermal machine. A hot (cold) bath at inverse temperature βH (βC), represented by the red (blue) box, can be coupled to the quantum system QS, gray circle, enabling a heat flux JH(t) (JC(t)). The quantum system is controlled by an external agent through a set of control parameters u(t), which allow power exchange P(t), and through a discrete control d(t) = {Hot, Cold, None} which determines which bath (if any) is coupled to the QS. 3 Reward : = State : = + Δ, <mark>Computer Agent</mark> Environment NN Policy ( | ) NN Value (, ) Ac�on : =, d t <u>Quantum</u> System … Fig. 2 Schematic representation of the learning process. A computer agent (blue box) chooses an action ai at time step i based on the current state si of the environment (gray box) through the policy function π(ai∣si). The action, which encodes the control (u(t), d(t)), is passed to the environment (lower arrow) which evolves the quantum state si of the machine based on the action ai, and computes the average power during the time step as a reward. The new state si+1 and reward ri+1 are returned to the agent (upper arrow), which uses this information to improve π(a∣s) using the soft actor-critic algorithm, which learns also the value function Q(s, a). Both π(a∣s) and Q(s, a) are parameterized using fully connected neural networks (NNs). This process is reiterated until the convergence of the policy. receives from the environment, defined as riþ1 þ γriþ2 þ γ <sup>2</sup> riþ3 þ ���¼ X1 k¼0 γ <sup>k</sup> riþ1þk; (4) P.A. Erdman and F. Noé judges the choices made by the actor, thus providing feedback to improve the actor’s behavior. Both π(a∣s) and Q(s, a) are parameterized using fully connected neural networks with two hidden layers, and they are determined by minimizing the loss functions in Eqs. (22) and (29) in Methods using the ADAM optimization algorithm <sup>96</sup> . The gradient of the loss functions is computed off-policy, over a batch of past experience which is recorded and stored in a replay buffer, using backpropagation (see Methods for details). Case studies In this section, we prove the validity of our RL-based approach by applying it to three different systems, namely a heat engine based on a two-level system, a refrigerator based on a superconducting qubit, and a heat engine based on a quantum harmonic oscillator. While the results presented below were obtained performing a single training, in Methods we show that our RL approach reliably converges to solutions with nearly the same performance across multiple trainings. We first benchmark our method on a two-level system for which the optimal control cycle is known: H^½uðtÞ�¼ <sup><u>E0uðtÞ</u></sup> σ^z; (6) 2 where u(t), which determines the energy gap of the two-level system, is our single control parameter, E0 is a fixed energy scale and σ^z is a Pauli matrix. We consider the qubit to be coupled to fermionic baths with a flat density of states (for example, a singlelevel quantum dot tunnel-coupled to metallic leads), with thermalization timescales fixed by the rates Γα (see Methods for details). Our results are shown in Fig. 3. Figure 3a shows the running average of the power hP½E�iγðiÞ �ð1 � γÞ <sup>P</sup> k <sup>i</sup> ¼0 <sup>γkri�k,</sup> <sup>i.e.</sup> <sup>an</sup> exponentially weighted average of the past rewards with weight γ, as a function of the time steps. Figure 3b shows the actions chosen by the agent, as a function of the steps, at three different moments during training highlighted by the black dots in Fig. 3a. The position of the segments corresponds to the chosen value of u, while the color represents the discrete action d (see legend). The optimal cycle learned at the end of the training is shown in Fig. 3c. Initially, the agent has no knowledge of the system, and its actions appear random (Fig. 3b, left), producing negative power hP½E�iγ (Fig. 3a). As expected, by performing random actions the agent is dissipating work into the heat baths, rather than extracting work. With increasing time, the agent gains experience and learns how to control the heat engine: hP½E�iγ increases, and structure appears in the chosen actions (Fig. 3b, center, and right). Eventually, the policy converges and hP½E�iγ saturates to a finite positive value. The optimal cycle for this model was derived in ref. <sup>90</sup>, and it corresponds to the exact structure discovered by the agent, i.e. a square wave alternating between the hot and the cold bath as fast as possible without spending any time disconnected from the baths. The black dashed line in Fig. 3a shows the corresponding power. Notably, although the frequency of the learned cycle is limited by the choice of Δt, and although the values of u(t) found by the agent are slightly different respect to the ones predicted by ref. <sup>90</sup> (the difference is ≈ 0.05), the power it generates nearly coincides with the upper bound. This occurs because there is a manifold of near-optimal solutions. We conclude the analysis of the two-level system heat engine by computing the efficiency at maximum power (EMP), i.e. the thermodynamic efficiency of the heat engine, defined as the ratio between the extracted work and the input heat, while the engine is operated at maximum power. We compare the EMP both to the Carnot efficiency ηpc =f f i f 1 f i f f i f − f i f f i fβ f H/βC and to the Curzon-Ahlborn efficiency ηca ¼ 1 � βH=βC. Despite not being a fundamental where γ ∈ [0, 1) is the discount factor which determines how much we are interested in future rewards, as opposed to immediate rewards. We now turn to the power maximization problem. Discretizing time in steps Δt, we search for protocols u(t) and d(t) that are constant during each time step. As shown in Fig. 2, we choose as action space A ¼ fðu; dÞ j u 2 U; d 2 fHot; Cold; Nonegg, where U is the continuous set of accessible controls, which can account for any experimental limitation, and d is the discrete action, motivated by typical thermodynamic cycles, which determines which bath (if any) is coupled to the QS. We choose the physical quantum states of the QS and the last chosen action as state space, i.e., S ¼ fðρ^; uÞ j ρ^ 2 D; u 2 Ug, where D ¼ fρ^ j ρ^ � 0; Tr½ρ^�¼ 1g is the space of density matrices. Crucially, we choose as a reward riþ1 ¼ hP½ν�iΔt - Δ <sup><u>1</u></sup> t Z tþΔt t P½ν�ðτÞ dτ; (5) which is the average power of the machine during the time interval [t, t + Δt]. Plugging Eq. (5) into Eq. (4), we see that the aim of the agent is to maximize the average power 〈P[ν]〉 introduced in Eq. (3), where ~~γ~~ ¼ �ln γ=Δt (see Methods for details). In the RL notation, γ sets the timescale for the power averaging, with γ → 1 corresponding to long-term averaging. Our agent has no prior knowledge of quantum dynamics, nor of thermodynamic cycles: the evolution of the state from si ¼ ^ρðtÞ to siþ1 ¼ ^ρðt þ ΔtÞ and the computation of the rewards ri is performed by the environment. We learn the optimal policy employing the SAC method, which relies on learning also a value function Q(s, a), generalized to a combination of discrete and continuous actions <sup>73–76</sup> . In this approach, the policy function π(a∣s) plays the role of an “actor” that chooses the actions to perform, while the value function Q(s, a) plays the role of a “critic” that pc =f f i f 1 f i f f i f − f i f f i f f βH=βC . Despite not being a fundamental 4 P.A. Erdman and F. Noé Fig. 3 Results of training the agent on the two-level heat engine model. a Running average of the extracted power hP½E�iγ as a function of the step during the whole training. The dashed line represents the theoretical upper bound derived in ref. <sup>90</sup> . b Actions chosen by the agent, represented by the value of u, as a function of step, zoomed around the three black circles in panel (a). The color represents action d, i.e. the bath coupled to the QS. c Final cycle found by the agent as a function of time. The parameters used for training are: ΓH = ΓC = 1, βH = 1, βC = 2, U ¼ ½0:3; 1�, E0 = 2.5, Δt = 0.5, and γ = 0.995. upper bound, the latter has received considerable attention in the literature for its simplicity, for being an upper bound to the EMP in various specific models <sup>24,28,97,98</sup>, and it has been derived by general arguments from linear irreversible thermodynamics <sup>99</sup> . Interestingly, we find that the optimal cycle shown in Fig. 3c delivers a large EMP corresponding to 100% of ηca, equivalent to 59% of ηc. We now consider a refrigerator based on an experimentally realistic system, i.e. a superconducting qubit coupled to two resonant circuits which behave as heat baths <sup>48</sup> . As opposed to the previous setup, here coherence between the instantaneous eigenstates is generated while driving the system, since ½H <sup>^</sup> ðu1Þ; H <sup>^</sup> ðu2Þ� ≠ 0 for u1 ≠ u2. This quantum effect was found to deter the power of this specific setup <sup>48,54,62</sup> and of arbitrary systems in linear response and for small driving amplitudes <sup>70</sup> . As shown in refs. <sup>48,54,62</sup>, the system Hamiltonian is given by H^½uðtÞ�¼ �E0½Δσ^x þ uðtÞσ^z�; (7) where E0 is a fixed energy scale, Δ characterizes the minimum gap of the system, and u(t) is our control parameter. In this setup, the coupling to the bath is fixed, and cannot be controlled. However, the qubit is resonantly coupled to the baths at different energies. The u-dependent coupling strength to the C (H) bath is described by the function γ <sup>ð</sup> u <sup>CÞ</sup> (γ <sup>ð</sup> u <sup>HÞ) that, as in ref. 62, is peaked at u = 0 (u =</sup> 1/2) with a resonance width determined by the quality factor QC (QH) (see Methods for details). Panels (a), (b), and (c) of Fig. 4 report the results in the same style as in Fig. 3, with the exception that all actions are black since there is no discrete choice to make, while Fig. 4d shows the coupling strength γ <sup>ð</sup> u <sup>CÞ</sup> (blue curve) and γu <sup>ðHÞ</sup> (red curve) as a function of u (on the y-axis). The parameters were chosen as in Fig. 7 of ref. <sup>62</sup> . As previously, the agent begins with random actions in the first steps, and the corresponding running average cooling power hP½R�iγ is slightly negative, indicating that we are dissipating heat into the cold bath. As the agent gains experience, hP½R�iγ increases until it saturates to a final positive value obtained with the cycle shown in Fig. 4c (thick lines). Interestingly, this setup was partially optimized in ref. <sup>62</sup> . In their analysis, the authors fix a smoothed trapezoidal cycle u(t) (Fig. 4c, dashed line) which was shown to outperform a sine and a trapezoidal cycle <sup>48</sup> . They find that the cooling power is positive for large cycle periods T, and tends to zero as T → ∞. However, the cooling power becomes negative as T → 0 because the detrimental effect of the generation of coherence increases with the speed of the cycle. As a consequence, there is an intermediate optimal value of T. They find that 〈P[R]〉 ≈ 2.3 × 10 <sup>−4</sup> at this optimal choice (dashed line in Fig. 4a, c). Notably, our RL agent discovers a protocol with 〈P[R]〉 ≈ 10.8 × 10 <sup>−4</sup> using the same system parameters. This improvement is due to the non-intuitive additional step visible in Fig. 4c. Indeed, both the trapezoidal and the agent’s cycle spend time in resonance with the baths at u = 0 and u = 0.5. However, the agent identifies also a third point, around u ≈ 0.13, where it spends ≈1/4 of the total cycle time and where the system is essentially decoupled from the bath, thus undergoing unitary evolution (as can be seen by the small values of γ <sup>ð</sup> u <sup>αÞ</sup> correspond ing to u ≈ 0.13 in Fig. 4d). This additional feature allows us to roughly extract the same amount of heat per cycle, but 5 times faster. Interestingly, we verified that the trapezoidal cycle running at the same speed as the cycle found by the RL agent would yield negative power. As argued in <sup>48,54,62</sup>, this power loss is attributed to the generation of coherence during the cycle, so we can interpret the power enhancement achieved by our cycle as mitigation of such detrimental effects. To confirm this, we rigorously quantify the generation of coherence in both cycles by computing the time average of the relative entropy of coherence <sup>100</sup> . Indeed, we find that the trapezoidal cycle operated at the same speed as the cycle found by the RL agent generates almost twice as much coherence (see Methods for details). We conclude the study of the qubit-based refrigerator by evaluating the coefficient of performance (COP) at maximum <sup>ð</sup> u <sup>CÞ</sup> (γ <sup>ð</sup> u <sup>HÞ</sup> <sup>ð</sup> u <sup>CÞ</sup> (blue curve) and γu <sup>ðHÞ</sup> P.A. Erdman and F. Noé Fig. 4 Results of training the agent on the superconducting qubit refrigerator model. a Running average of the cooling power hP½R�iγ as a function of the step during the whole training. The dashed line represents the maximum cooling power found in ref. <sup>62</sup> by optimizing a smoothed trapezoidal cycle. b Actions chosen by the agent, represented by the value of u, as a function of step, zoomed around the three black circles in panel (a). c Final deterministic cycle found by the agent (thick discontinuous line) and smoothed trapezoidal cycle (thin dashed line) whose power is given by the dashed line in panel (a), as a function of time. d coupling strength γ <sup>ð</sup> u <sup>CÞ</sup> (blue curve) and γ <sup>ð</sup> u <sup>HÞ</sup> (red curve) as a function of u (on the y-axis). The parameters used for training are gH = gC = 1, βH = 10/3, βC = 2βH, QH = QC = 30, E0 = 1, Δ = 0.12, ωH = 1.03, ωC = 0.24, U ¼ ½0; 0:75�, Δt = 0.98, and γ = 0.995. 5 power, i.e. the ratio between the heat extracted from the cold bath and the input work, while the system is operated at maximum cooling power. We find that our cycle shown in Fig. 4c as a thick black line delivers a COP at maximum power that is 6% of Cc ¼ β <sup>�</sup> C <sup>1=ðβ�</sup> H <sup>1</sup> <sup>�</sup> <sup>β�</sup> C <sup>1Þ,</sup> <sup>which</sup> <sup>is</sup> <sup>Carnot’s</sup> <sup>upper</sup> <sup>bound</sup> <sup>to</sup> <sup>the</sup> <sup>�</sup> C <sup>1=ðβ�</sup> H <sup>1</sup> <sup>�</sup> H <sup>1</sup> <sup>�</sup> <sup>β�</sup> C <sup>1</sup> of Cc ¼ β <sup>�</sup> C <sup>1=ðβ�</sup> H <sup>1</sup> <sup>�</sup> <sup>β�</sup> C <sup>1Þ,</sup> <sup>which</sup> <sup>is</sup> <sup>Carnot’s</sup> <sup>upper</sup> <sup>bound</sup> <sup>to</sup> <sup>the</sup> COP. While this may appear as a rather low value, we notice that the COP at a maximum power of a two-level system coupled to Fermionic of Bosonic baths is zero <sup>90</sup>, and that for on-chip cooling applications, the aim is typically to maximize the cooling power regardless of the efficiency of such a process. At last, we consider a heat engine based on a collection of noninteracting particles confined in a harmonic potential <sup>42</sup> . The Hamiltonian is given by H^½uðtÞ�¼ 2 <sup><u>1</u></sup> m <sup>p^2 þ</sup> <sup><u>1</u></sup> 2 <sup>mðuðtÞw0Þ2q^2;</sup> (8) where m is the mass of the system, w0 is a fixed frequency, and p^ and q^ are the momentum and position operators. The control parameter u(t) allows us to change the frequency of the oscillator. As in the qubit heat engine case, we let the agent choose which bath (if any) to couple to the oscillator. Since ½H <sup>^</sup> ðu1Þ; H <sup>^</sup> ðu2Þ� ≠ 0 for u1 ≠ u2, also this system exhibits a power loss at finite driving speed <sup>42,71</sup> . The coupling to the baths, characterized by the thermalization rates Γα, is modeled as in ref. <sup>42</sup> (see Methods for details). The solid line in Fig. 5a, b shows hP½E�iγ, as a function of the step, for the same system parameters (chosen as in the upper panel of Fig. 6 of ref. <sup>42</sup> ), but setting respectively U ¼ ½0:5; 1� and U ¼ ½0:35; 1:5�. In both cases, the power is negative for small steps, while it converges to a positive value as the agent gains experience. The corresponding final cycles learned by the agent are shown in Fig. 5c, d as thick lines. These cycles display a quite elaborate structure which demonstrates the ability of the agent to perform planning for a long-time reward. Indeed, while the system is in contact with the cold bath, which happens roughly for 20time steps, energy is flowing into the bath, thus producing negative rewards. Nonetheless, the agent discovers that this step, required by the second law of thermodynamics, is necessary for power extraction in the long run. We now compare the cycle discovered by the agent to the wellknown Otto cycle often considered in literature. The authors of ref. <sup>42</sup> study the power of this system by optimizing an Otto cycle, i.e. the cycle shown in Fig. 5c, d as a dashed line. The authors then fix the value of the control uH = 1 (uC = 0.5) while in contact with bath H (C), and maximize the power by tuning the duration of each of the four segments composing the cycle. The resulting optimized Otto cycle is the one shown as a dashed line in Fig. 5c, d, with corresponding power shown in Fig. 5a, b as a dashed line. As we can see, even constraining the choice of u(t) ∈ [uC, uH] = [0.5, 1] to the values chosen in ref. <sup>42</sup>, the agent discovers a cycle that outperforms the optimized Otto cycle (Fig. 5a). If we further allow the agent to modulate u(t) in a larger interval, we find a cycle with an even larger power (Fig. 5b). The protocol discovered by the agent in Fig. 5a resembles the Otto cycle (both are flat for some time at u = uC and u = uH), yet there are additional features. First, the agent ramps up the control u(t) between uC and uH in a non-linear fashion while in contact with a bath, rather than decoupling the system. Next, there are two strong discontinuities where the system is abruptly disconnected from the baths for a short time (Fig. 5c, green segments). These additional features turn out to enhance the power. At last, we notice that the cycle found by the agent in Fig. 5d is more regular than the one in Fig. 5c, and it further deviates from an Otto cycle. The crucial difference with respect to the Otto cycle, 6 P.A. Erdman and F. Noé Fig. 5 Results of training the agent on the quantum harmonic oscillator heat engine model. a, b Running average of the extracted power hP½E�iγ as a function of the step during the whole training. The dashed line represents the maximum power found in ref. <sup>42</sup> optimizing the duration of each stroke of an Otto cycle (see “Methods” for details). c, d Actions chosen by the agent, represented by the value of u, as a function of time. The color represents action d, i.e. the bath coupled to S. The discontinuous thick line is the final cycle discovered by the agent, while the thin dashed line is the Otto cycle whose power is given by the dashed line in panels (a, b). The parameters used for training are Γ <sup>(H)</sup> = Γ <sup>(C)</sup> = 0.6, βH = 0.2, βC = 2, w0 = 2, Δt = 0.2, and γ = 0.998. In panels a–c we set U ¼ ½0:5; 1� to enable a fair comparison with the Otto cycle of ref. <sup>42</sup>, while in b–d we set a larger control range, i.e., U ¼ ½0:35; 1:5�. therefore, seems to be the ramping up of u(t) while in contact with the baths, which probably benefits from simultaneously exchanging heat and modulating u(t), rather than doing them in two separate strokes. As in the two-level case, we evaluate the EMP of the discovered cycles shown in Fig. 5c, d. In both cases the EMP is considerably high, corresponding respectively to 60% and 78% of ηca, equivalent to 46% and 59% of ηc. Interestingly, the cycle shown in Fig. 5d yields both a higher power and a larger EMP than the cycle displayed in Fig. 5c. DISCUSSION We introduced a general framework based on Reinforcement Learning to discover thermodynamic cycles that maximize the power of out-of-equilibrium quantum thermal machines, paving the way for more systematic use of machine learning in the field of quantum thermodynamics. Using state-of-the-art machine learning techniques, we applied our method to three different paradigmatic setups. Our method found the optimal known solution in the benchmark system, while in the other systems it discovered new unintuitive and elaborate cycles which outperform previously proposed cycles. Our results show that the celebrated Otto cycle is not in general optimal for power extraction and that carefully crafted cycles can mitigate coherence-induced power losses <sup>48,54,70,71</sup> without introducing additional controls as required by Shortcuts to Adiabaticity <sup>56–63</sup> . As opposed to other optimal control techniques, such as the Pontryaghin Minimum Principle <sup>64–66</sup>, our RL-based approach has the following advantages: it does not require any analytic calculation; it can handle both continuous and discrete controls (such as the choice of the heat bath), and it can naturally find discontinuous and irregular protocols; it can be applied as-is to arbitrarily complicated setups and it could be used to find optimal protocols also in the presence of noise in the controls. Future research directions include applications to multi-particle systems, where many-body advantages might be revealed, and a systematic study of the mitigation of coherence-induced power losses. Interesting extensions of our framework include investigating the strong system-bath coupling regime going beyond a master equation approach <sup>101–103</sup>, optimizing additional thermodynamic quantities, such as minimizing the fluctuations in the power output and developing of a scheme that can be applied directly to experimental setups that does not require the knowledge of the quantum state. METHODS Physical model As discussed in the main text, we assume that the state evolves according to the Markovian master Eq. (1), which can be derived, also for nonadiabatic drivings <sup>95</sup>, in the weak system-bath coupling regime performing the usual Born-Markov and secular approximation <sup>92–94</sup> and neglecting the Lamb-shift contribution. We notice that since the RL agent produces piecewise constant protocols, we are not impacted by possible inaccuracies of the master equation subject to fast parameter driving <sup>104</sup>, provided that Δt is not smaller than the bath timescale. Without loss of generality, the dissipators can be expressed as <sup>93,94</sup> ðαÞ k;uðtÞ <sup><u>1</u></sup> 2 A^ ðkα;uÞyðtÞ <sup>A^</sup> <sup><u>1</u></sup> 2 <sup>ρ^A^</sup> ðkα;uÞyðtÞ <sup>A^</sup> D <sup>ð</sup> u <sup>α</sup> ð <sup>Þ</sup> tÞ;dðtÞ <sup>½ρ^�¼ λα½dðtÞ�</sup> X k γ <sup>ð</sup> k <sup>α</sup> ;u <sup>Þ</sup> <sup>ð</sup> k <sup>α</sup> ;u <sup>Þ</sup> ðtÞ A^ - A^ðkα;uÞðtÞ <sup>ρ^A^</sup> ðkα;uÞyðtÞ <sup>�</sup> <sup><u>1</u></sup> A^ðkα;uÞyðtÞ <sup>A^</sup> ðkα;uÞðtÞ <sup>ρ^ �</sup> <sup><u>1</u></sup> 2 <sup>ρ^A^</sup> ðkα;uÞyðtÞ <sup>A^</sup> ðkα;uÞðtÞ ; ðkα;uÞðtÞ <sup>ρ^A^</sup> ðkα;uÞyðtÞ <sup>�</sup> <sup><u>1</u></sup> 2 ðkα;uÞðtÞ <sup>ρ^ �</sup> <sup><u>1</u></sup> 2 (9) where λα[d(t)] ∈ {0, 1} are functions that determine which bath is coupled ðkα;uÞðtÞ <sup>are the Lindblad operators, and γ</sup> k <sup>ðα</sup> ;u <sup>Þ</sup> the QS, A <sup>^</sup> the QS, A <sup>^</sup> k;uðtÞ <sup>are the Lindblad operators, and γ</sup> k <sup>ðα</sup> ;u <sup>Þ</sup> ðtÞ <sup>are the corresponding</sup> rates. In particular, λH(Hot) = 1, λC(Hot) = 0, while λH(Cold) = 0, λC(Cold) = 1, and λH(None) = λC(None) = 0. Notice that both the Lindblad operators and the rates can depend on time through the value of the control u(t). Their explicit form depends on the details of the system, i.e. on the Hamiltonian describing the dynamics of the overall system including the bath and the system-bath interaction. Below, we provide the explicit form of A <sup>^</sup> kðα;uÞðtÞ <sup>and</sup> γ <sup>ð</sup> k <sup>α</sup> ;u <sup>Þ</sup> ðtÞ <sup>used</sup> <sup>to</sup> <sup>model</sup> <sup>the</sup> <sup>three</sup> <sup>setups</sup> <sup>considered</sup> <sup>in</sup> <sup>the</sup> <sup>manuscript.</sup> <sup>We</sup> adopt the standard approach to compute the instantaneous power and heat currents <sup>23</sup> ðαÞ k;uðtÞ <sup>and</sup> γ <sup>ð</sup> k <sup>α</sup> ;u <sup>Þ</sup> ð - - h ρ^ðtÞ <sup><u>∂</u></sup> H^½uðtÞ� ; JαðtÞ � Tr D <sup>ð</sup> u <sup>α</sup> ð <sup>Þ</sup> t PðtÞ ��Tr ρ^ðtÞ <sup><u>∂</u></sup> ∂t h i D <sup>ð</sup> u <sup>α</sup> ð <sup>Þ</sup> tÞ;dðtÞ <sup>½ρ^ðtÞ�</sup> <sup>H^½uðtÞ�</sup> : (10) In the two-level system heat engine, we consider the following Lindblad operators and corresponding rates (identifying k = ± ): ± <sup>α</sup> ; <sup>Þ</sup> uðtÞ <sup>¼ Γα</sup> <sup>f</sup> <sup>ð ± βαuðtÞE0Þ;</sup> (11) A^ ðαÞ ð±α ;ÞuðtÞ <sup>¼</sup> <sup>σ^ ± ; γð</sup> ± <sup>α</sup> ; <sup>Þ</sup> P.A. Erdman and F. Noé 7 where σ^þ and σ^� denote the raising and lowering operators, Γα is a constant rate which sets the thermalization timescale when the QS is coupled to bath α, and f ðxÞ ¼ ½1 þ expðxÞ� <sup>�1</sup> is the Fermi distribution. This choice can be derived, for example, when considering the qubit as a single-level quantum dot tunnel-coupled to metallic leads, with flat density of states, which act as heat baths <sup>105–108</sup> . In the superconducting qubit refrigerator, we employ the model first put forward in ref. <sup>48</sup>, and further studied in refs. <sup>54,62</sup> . In particular, we consider the following Lindblad operators and corresponding rates (identifying k = ± ): entropy-regularized maximization objective. In this setting, the optimal policy π <sup>*</sup> is given by " # ; (16) X1 k¼0 π <sup>�</sup> ¼ arg max π Eπ s �B γ <sup>k</sup> ðrkþ1 þ εHðπð�jskÞÞÞjs0 ¼ s ðαÞ ðαÞ A^þ;uðtÞ <sup>¼ �ijeuðtÞihg</sup> uðtÞ <sup>j; ^A</sup> �;uðtÞ <sup>¼ þijg</sup> uðtÞ <sup>iheuðtÞj;</sup> (12) where jguðtÞi and jeuðtÞi are, respectively, the instantaneous ground state and excited state of Eq. (7). The corresponding rates are given by γ <sup>ð</sup> ± <sup>α</sup> ; <sup>Þ</sup> uðtÞ <sup>¼ Sα½ ± ΔϵuðtÞ�,</sup> <sup>where</sup> <sup>Δϵu(t)</sup> <sup>is</sup> <sup>the</sup> <sup>instantaneous</sup> <sup>energy</sup> <sup>gap</sup> <sup>of</sup> <sup>the</sup> system, and where ε ≥ 0 (usually denoted with α in the RL literature) is a hyperparameter that balances the trade-off between exploration and exploitation, and HðPÞ ¼ x�EP <sup>½�log PðxÞ�</sup> (17) is the entropy of the probability distribution P. Notice that we replaced the unknown state distribution μπ with B, which is a replay buffer populated during training by storing the observed one-step transitions (sk, ak, rk+1, sk+1). We define the value function Q <sup>π</sup> (s, a) of a given policy π as " # γ <sup>k</sup> ðrkþ1 þ εHðπð�jskÞÞÞjs0 ¼ s; a0 ¼ a ; (18) X1 Q <sup>π</sup> ðs; aÞ ¼ Eπ r1 þ SαðΔϵÞ ¼ <sup><u>gα</u></sup> <sup><u>gα</u></sup> <u>1</u> 2 1 þ Q <sup>2</sup> α <sup>ðΔϵ=ω</sup> 1 þ Q <sup>2</sup> α <sup>ðΔϵ=ωα �</sup> <sup>ωα=ΔϵÞ2</sup> <u>Δϵ</u> e <sup>βαΔϵ</sup> - 1 (13) is the noise power spectrum of bath α. Here ωα, Qα, and gα are the base resonance frequency, quality factor, and coupling strength of the resonant circuit acting as bath α = H, C (see refs. <sup>48,62</sup> for details). As in ref. <sup>62</sup>, we pf f i f f i f f i f f i f f i f f i f f i f f i f f choose ωC = 2E0Δ and ωH ¼ 2E0 Δ <sup>2</sup> þ 1=4, such that the C (H) bath is in resonance with the qubit when u = 0 (u = 1/2). The width of the resonance is governed by Qα. The total coupling strength to bath α, plotted in Fig. 4d, is quantified by γ <sup>ð</sup> u <sup>α</sup> ðt <sup>Þ</sup> <sup>ð</sup> u <sup>α</sup> ðt <sup>Þ</sup> Þ <sup>�</sup> <sup>γð</sup> þ <sup>α</sup> ; <sup>Þ</sup> <sup>ð</sup> þ <sup>α</sup> ; <sup>Þ</sup> uðtÞ <sup>þ γ</sup> - <sup>ðα</sup> ; <sup>Þ</sup> - <sup>ðα</sup> ; <sup>Þ</sup> uðtÞ <sup>:</sup> (14) In the Harmonic oscillator heat engine, following ref. <sup>42</sup>, we describe the k¼1 and its recursive Bellman equation reads Q <sup>π</sup> ðs; aÞ ¼ a1�πEð�js1Þ½ <sup>r1 þ γ</sup> ð <sup>Qπ</sup> ð <sup>s1; a1</sup> Þ � εlogπða1js1ÞÞjs0 ¼ s; a0 ¼ a�: (19) We use a function approximator Qϕ(s, a) (e.g. a neural network) to describe the value function of the current policy, where ϕ represents a collection of learnable parameters. Next, we describe the policy π(a∣s). Since we are dealing with a combination of discrete and continuous actions, we define a = (u, d), where u is the continuous action and d is the discrete action (for simplicity, we describe the case of a single continuous action, though the generalization to multiple variables is straightforward). From now on, all functions of a are also to be considered as functions of u, d. We decompose the joint probability distribution as πθðu; djsÞ ¼ πθD ðdjsÞ � πθU;d ðujd; sÞ; (20) where πθD ðdjsÞ is a function approximator for the marginal probability of taking discrete action d, which depends on learnable parameters θD, and πθU;d ðujd; sÞ is a parameterization of the conditional probability density of choosing action u, given action d, which depends on learnable parameters θU,d—one set for each discrete action d. We denote with θ the collection of all parameters θD and θU,d. Notice that this decomposition allows us to describe correlations between the discrete and the continuous action, which are crucial in our application. We further parameterize πθU;d ðujd; sÞ as a squashed Gaussian policy, i.e. as the distribution of the variable coupling to the baths through the Lindblad operators A <sup>^</sup> ðþα;ÞuðtÞ <sup>¼ ^ay</sup> uðtÞ <sup>,</sup> ð�α;ÞuðtÞ <sup>¼ ^auðtÞ</sup> and corresponding rates γ <sup>ð</sup> þ <sup>α</sup> ; <sup>Þ</sup> A^ <sup>ð</sup> þ <sup>α</sup> ; <sup>Þ</sup> uðtÞ <sup>¼ Γα</sup> <sup>nðβαuðtÞω0Þ,</sup> and γ <sup>ð</sup> - <sup>α</sup> ; <sup>Þ</sup> u ð1= γ <sup>ð</sup> - <sup>α</sup> ; <sup>Þ</sup> uðtÞ <sup>¼ Γα½1 þ nðβαuðtÞω0Þ�,</sup> where we identify k = ± . a^uðtÞ ¼ pf f pf f i f f i f f i f f i f f i f f i f f i f f i ffi pf f i f f i f f i f f i f f i f f i f f i f f i ffi pf f 2 pf f i f f i f f i f f i f f i f f i f f i f f i ffi mω0uðtÞ q^ þ i= Þ pf f i f f i f f i f f i f f i f f i f f i f f i ffi mω0uðtÞ p^ and a^ <sup>y</sup> u f f f f f f f f f f f f f f f f f ð1= 2Þ mω0uðtÞ q^ þ i= mω0uðtÞ p^ and a^ <sup>y</sup> uðtÞ <sup>are</sup> <sup>respectively</sup> <sup>the</sup> <sup>(con-</sup> trol dependent) lowering and raising operators, Γα is a constant rate setting the thermalization timescale of the system coupled to bath α, and nðxÞ ¼ ½expðxÞ � 1� <sup>�1</sup> is the Bose–Einstein distribution. Reinforcement learning algorithm As discussed in the Results section, the choice of the reward as in Eq. (5) guarantees that the aim of the RL agent is to maximize 〈P[ν]〉 introduced in Eq. (3). To be precise, plugging Eq. (5) into Eq. (4) gives 〈P[ν]〉 (up to an irrelevant constant prefactor) only in the limit of Δt → 0. However, also for finite Δt, both quantities are time averages of the power, so they are equally valid definitions to describe a long-term power maximization. We use a generalization of the SAC method, first developed for continuous actions <sup>73,74</sup>, to handle a combination of discrete and continuous actions <sup>75,76</sup> . We here present an overview of our implementation of SAC putting special emphasis on the differences with respect to the standard implementation. However, we refer to <sup>73–76</sup> for additional details. Our method, implemented with PyTorch, is based on modifications and generalizations of the SAC implementation provided by Spinning Up from OpenAI <sup>109</sup> . All code and data to reproduce the experiments are available online (see Data Availability and Code Availability sections). The SAC algorithm is based on policy iteration, i.e. it consists of iterating multiple times over two steps: a policy evaluation step, and a policy improvement step. In the policy evaluation step, the value function of the current policy is (partially) learned, whereas in the policy improvement step a better policy is learned by making use of the value function. We now describe these steps more in detail. In typical RL problems, the optimal policy π <sup>*</sup> (s∣a) is defined as the policy that maximizes the expected reward defined in Eq. (4), i.e.: u~θU;d ðs; ξÞ ¼ ua þ <sup><u>ub�</u></sup> 2 <sup><u>ua</u></sup> ½1 þ tanhðμθU;d ðsÞ þ σθU;d ðsÞ � ξÞÞ�; ξ �N ð0; 1Þ; (21) where μθU;d ðsÞ and σθU;d ðsÞ, representing respectively the mean and standard deviation of the Gaussian distribution, are function approximators which depend on the learnable parameters θU,d, N ð0; 1Þ is the normal distribution with zero mean and unit variance, and where we assume that U ¼ ½ua; ub�. We now describe the policy evaluation step. In the SAC algorithm, we learn two value functions Qϕi ðs; aÞ described by the learnable parameters ϕi, for i = 1, 2. Since Qϕi ðs; aÞ should satisfy the Bellman Eq. (19), we define the loss function for Qϕi ðs; aÞ as the mean square difference between the left and right-hand side of Eq. (19), i.e. h i LQðϕiÞ ¼ ðs;a;rE;s <sup>0</sup> Þ�B <sup>ðQϕi</sup> <sup>ðs; aÞ �</sup> <sup>yðr; s0ÞÞ2</sup> ; (22) where - j <sup>min</sup> ¼1;2 <sup>Qϕtarg;j</sup> <sup>ðs0; a0Þ �</sup> <sup>εlog πθða0js0Þ</sup> : (23) yðr; s <sup>0</sup> Þ ¼ r þ γ a <sup>0</sup> �πEθð�js <sup>0</sup> Þ j <sup>min</sup> ¼1;2 " # ; (15) X1 k¼0 π <sup>�</sup> ¼ arg max π Eπ s � μπ γ <sup>k</sup> rkþ1js0 ¼ s Notice that in Eq. (23) we replaced Qϕi with minj¼1;2 <sup>Qϕtarg;j</sup> <sup>, where ϕtarg;j, for j =</sup> 1, 2, are target parameters which are not updated when minimizing the loss function; instead, they are held fixed during backpropagation, and then they are updated according to polyak averaging, i.e. ϕtarg;i ρpolyakϕtarg;i þ ð1 � ρpolyakÞϕi; (24) where ρpolyak is a hyperparameter. This change was shown to improve learning <sup>73,74</sup> . In order to evaluate the expectation value in Eq. (23), we use where Eπ denotes the expectation value choosing actions according to the policy π. The initial state s0 = s is sampled from μπ, i.e. the steady-state distribution of states that are visited by π. In the SAC method, the balance between exploration and exploitation <sup>72</sup> is achieved by introducing an P.A. Erdman and F. Noé 8 the decomposition in Eq. (20) to write πθD ðd <sup>0</sup> js <sup>0</sup> Þ E (25) u <sup>0</sup> �πθU;d0 ð�jd <sup>0</sup> ;s <sup>0</sup> Þ <sup>½��;</sup> a <sup>0</sup> �πEθð�js <sup>0</sup> Þ <sup>½��¼</sup> X d <sup>0</sup> where we denote a <sup>0</sup> ¼ ðu <sup>0</sup> ; d <sup>0</sup> Þ. Plugging Eq. (25) into Eq. (23), and approximating the expectation value over u <sup>0</sup> with a single sampled value yields yðr; s <sup>0</sup> Þ ¼ r þ γ <sup>P</sup> d <sup>0</sup> - j <sup>min</sup> ¼1;2 <sup>Q</sup> ϕ <sup>π</sup> targ;j <sup>ðs0; d0; u0Þ �</sup> <sup>αlog πθðd0; u0js0Þ</sup> ; j <sup>min</sup> ¼1;2 <sup>Q</sup> ϕ <sup>π</sup> <sup>P</sup> d <sup>0</sup> <sup>πθD</sup> <sup>ðd0js0Þ �</sup> j <sup>min</sup> ¼1;2 u <sup>0</sup> - πθU;d0 ð�jd <sup>0</sup> ; s <sup>0</sup> Þ: (26) We, therefore, perform a full average over the discrete action, and a single sampling of the continuous action. We now turn to the policy improvement step. Given a policy πθold, ref. <sup>74</sup> proves that πθnew is a better policy [respect to maximization in Eq. (16)] if we update the policy parameters according to We now turn to the policy improvement step. Given a policy πθold, ref. <sup>74</sup> Table 1. Hyperparameters used in numerical calculations that are not reported in the figure captions. Hyperparameter Figs. 3, 4 Fig. 5a Fig. 5b Hidden layers 2 2 2 Hidden layer units 256 256 256 Initial random steps 5k 5k 10k First update at step 1k 1k 1k Batch size 256 256 256 learning rate 0.001 0.001 0.0005 ε0 50 50 300 εdecay 48k 24k 48k nupdates 50 50 50 ρpolyak 0.995 0.995 0.995 B size 192k 192k 192k actions sampling them uniformly within their range. Furthermore, for another fixed number of initial steps, we do not update the parameters to allow the replay buffer to have enough transitions. B is a first-in-first-out buffer, of fixed dimension, from which batches of transitions are randomly sampled to update the NN parameters. After this initial phase, we repeat a policy evaluation and a policy improvement step nupdates times every nupdates steps. This way, the overall number of updates coincides with the number of actions performed on the environment. The optimization steps are performed using the ADAM optimizer with the standard values of β1 and β2. To favor an exploratory behavior early in the training, and at the same time to end up with a policy that is approximately deterministic, we schedule ε. In particular, we vary it during each step according to εðnstepsÞ ¼ ε0 expð�nsteps=εdecayÞ; (31) where nsteps is the current step number, and ε0 and εdecay are hyperparameters. All hyperparameters used to produce the cycles in Figs. 3, 4, and 5 are provided in Table 1. At last, we discuss the parameterization of the state s. As discussed in the manuscript, we use s ¼ ðρ^; uÞ as state. While u is passed to the NNs asis, we now detail how we encoded ρ^ in the 3 systems studied in the manuscript. In the two-level system heat engine, a closed equation of motion governing the evolution of pðtÞ � Tr½ρ^ðtÞσ^þσ^�� can be derived from the Markovian master equation, and the instantaneous heat flux Jα(t) can be expressed solely in terms of p(t) (see ref. <sup>90</sup> for details). Therefore, we use the single parameter p(t) ∈ [0, 1] to encode ρ^. In the superconducting qubit refrigerator, we encode ρ^ using the following three real parameters: heuðtÞjρ^ðtÞjeuðtÞi, Re½hguðtÞjρ^ðtÞjeuðtÞi� and Im½hguðtÞjρ^ðtÞjeuðtÞi�. These fully characterize a density matrix of a qubit. In the Harmonic oscillator heat engine a closed set of equations of motion can be derived from the Markovian master equation for the following three quantities: HðtÞ � Tr½ρ^ðtÞH <sup>^</sup> ½uðtÞ��; <u>ð</u> <u>Þ</u> min θ <sup>DKL</sup> <sup>πθð�jsÞk</sup> <sup><u>exp</u></sup> <sup><u>Qπ</u></sup> Z <sup>θπoldθold ðs; �Þ=α</sup> θnew ¼ arg min - <u>ð</u> <u>Þ</u> ; (27) <sup>πθð�jsÞk</sup> <sup><u>exp</u></sup> <sup><u>Qπθold ðs; �Þ=α</u></sup> where s is any state, DKL denotes the Kullback-Leibler divergence and Z <sup>πθold</sup> is the partition function of the exponential of the value function. Intuitively, this step is the equivalent of making the policy ϵ-greedy in the standard RL setting. The idea is to use the minimization in Eq. (27) to define a loss function to perform an update of θ. Noting that the partition function does not impact the gradient, multiplying the Kullback-Leibler divergence by α, and replacing Q <sup>πθold</sup> with minj Qϕj, we define the loss function as - αlog πθðajsÞ � jmin¼1;2 <sup>Qϕj</sup> <sup>ðs; aÞ</sup> : (28) LπðθÞ ¼ s�BE a�πθ ð�jsÞ αlog πθðajsÞ � jmin¼1;2 In order to evaluate the expectation value in Eq. (28), we use the previous trick of averaging the discrete action and performing a single sample of the continuous action using ξ. Recalling Eq. (21), this yields - - �� P d πθD ðdjsÞ αlog πθðd; ~uθU;d ðs; ξÞjsÞ � minj¼1;2 <sup>Qϕj</sup> <sup>ðs; d; ~uθU;d</sup> <sup>ðs; ξÞÞ</sup> ; P πθD ðdjsÞ αlog πθðd; ~uθU;d ðs; ξÞjsÞ � minj¼1;2 LπðθÞ ¼ E s�B d ξ �N ð0; 1Þ: (29) To summarize, the SAC algorithm consists of repeating over and over a policy evaluation step, and a policy improvement step. The policy evaluation step consists of a single optimization step to minimize the loss functions LQ(ϕi) (for i = 1, 2), given in Eq. (22), where yðr; s <sup>0</sup> Þ is computed using Eq. (26). The policy improvement step consists of a single optimization step to minimize the loss function Lπ(θ) given in Eq. (29). In both loss functions, the expectation value over the states is approximated with a batch of experiences sampled randomly from the replay buffer B. Training details We now provide the details of the algorithm used to learn the four specific cycles described in the main manuscript. The value function Qϕ(s, u, d) is parameterized the following way. We use a fully connected neural network (NN), with two hidden layers, that take s and u as input (by stacking them into a single array), and output ∣D∣ values, where ∣D∣ is the number of discrete actions. The ith output corresponds to Qϕ(s, u, d = di), where {di} are the possible discrete actions. We use the ReLU activation function in all layers except for the output layer, where we apply the identity (since the value function can take arbitrary positive or negative values). The parameters ϕ correspond to the weights and biases of the whole network. The policy πθðu; djsÞ ¼ πθD ðdjsÞ � πθU;d ðu; jd; sÞ is parameterized the following way. We use a fully connected NN, with two hidden layers, that takes s as input, and produces 3 ⋅∣D∣ values, corresponding to LðtÞ � Tr½ρ^ðtÞ ~~ð~~ 2 <sup><u>1</u></sup> m <sup>p^2 �</sup> <sup><u>1</u></sup> 2 <sup>mðuðtÞw0Þ2q^2Þ�;</sup> DðtÞ � Tr½ρ^ðtÞðq^p^ þ ^pq^Þ�: (32) n πθD ðdijsÞ; μθU;di ðsÞ; σθU;di ðsÞÞ i¼1; ¼ ;jDj <sup>:</sup> (30) Furthermore, the heat flux Jα(t) can be expressed solely in terms of these quantities (see ref. <sup>42</sup> for details). We thus use these three quantities to encode ^ρ. More specifically, since they are not bounded in an obvious way by some system parameter, for numerical stability we use O <sup>~</sup> ðtÞ � log ðjOðtÞj þ δÞ and sO(t) = sign(O(t)) instead of O = H, L, D to encode the state, where δ = 10 <sup>−20</sup> is a small parameter introduced to prevent numerical divergences. At last, we do not use sH(t) since H(t) is always a positive quantity (being the energy of the harmonic oscillator). Therefore, we encode ρ^ using the following 5 parameters: ðH <sup>~</sup> ; <sup>~</sup> L; D <sup>~</sup> ; sL; sDÞ. Convergence of the RL approach The training process presents some degree of stochasticity, such as the initial random steps, and the random sampling of a batch of experience More specifically, we use the ReLU activation in all layers except for the outputnormalizationlayer, where <sup>P</sup> i <sup>πθ</sup> Dwe <sup>ðdij</sup> use <sup>sÞ ¼</sup> the <sup>1,</sup> <sup>we</sup> identity. <sup>apply</sup> However, <sup>a</sup> <sup>soft-max</sup> in <sup>to</sup> order <sup>the</sup> <sup>corresponding</sup> to enforce the outputs, and instead of outputting σθU;di ðsÞ, we output log ðσθU;di ðsÞÞ, which has no constraint on the sign. In order to enforce sufficient exploration in the early stage of training, we do the following. For a fixed number of initial steps, we choose random 9 Fig. 6 Training curves. Training curves for six consecutive runs of the RL method in the two-level system heat engine case [(a, c, and e), corresponding to Fig. 3] and in the superconducting qubit refrigerator case [(b, d, and f), corresponding to Fig. 4]. The panels show, as a function of the training steps, the running average of the power (a, b), the running average of the loss function LQ (c, d), and the running average of the loss function Lπ (e, f). Each curve corresponds to a separate training. from the replay buffer to compute an approximate gradient of the loss functions. We thus need to evaluate the reliability of our approach. In Figs. 6 and 7, we show the training curves for six consecutive runs of our method applied to all four cases studied in the main text. More specifically, panels (a, c, and e) of Fig. 6 correspond to the training of the two-level system heat engine (considered in Fig. 3), while panels (b, d, and f) of Fig. 6 correspond to the training of the superconducting qubit refrigerator (considered in Fig. 4). Panels (a, c, and e) of Fig. 7 correspond to the training of the Harmonic oscillator in the interval considered in Fig. 5a, c, while panels (b, d, and f) of Fig. 7 correspond to the training of the Harmonic oscillator in the interval considered in Fig. 5b, d. Both Figs. 6 and 7 show, as a function of the step, the running average of the power [panels (a) and (b)], the running average hLQiγ of the loss function LQ [panels (c, d)] and the running average hLπiγ of the loss function Lπ [panels (e) and (f)] computed on the batch of experience used to estimate the gradient of the corresponding loss function. Every curve corresponds to a separate training. As we can see in Figs. 6 and 7, in all four cases the running average of the reward reliably converge to a solution yielding similar values of the power, and also the running averages of the loss functions display qualitatively similar behavior. We notice that while LQ is the mean square of the Bellman error [see Eq. (22)], Lπ is just a function whose gradient provides a better policy, so its value during training is not required to be a decreasing function. Generation of coherence In order to quantify the coherence generated in the instantaneous eigenbasis of the Hamiltonian in the refrigerator based on a superconducting qubit, we evaluated the time average of relative entropy of coherence <sup>100</sup>, defined as Cðρ^ðtÞÞ ¼ Sðρ^diag:ðtÞÞ � Sðρ^ðtÞÞ; (33) where Sðρ^Þ ¼ �Tr½ρ^ln ^ρ� is the Von Neumann entropy, and ρ^diag:ðtÞ ¼ hguðtÞjρ^ðtÞjguðtÞi �jguðtÞihguðtÞj þ heuðtÞjρ^ðtÞjeuðtÞi �jeuðtÞiheuðtÞj (34) is the density matrix, in the instantaneous eigenbasis jguðtÞi and jeuðtÞi, with the off-diagonal terms canceled out. We find that that the time average of the relative entropy of coherence is ≈0.116 in the cycle found by the RL agent, while it is ≈0.194 applying the trapezoidal cycle with the same period. Otto cycle comparison In Fig. 5 we compare the performance of an Otto cycle, optimized as in the upper panel of Fig. 6 of ref. <sup>42</sup>, with the cycle discovered by the RL agent. P.A. Erdman and F. Noé Fig. 7 Training curves. Training curves for six consecutive runs of the RL method in the harmonic oscillator heat engine. Panels (a), (c), and (e) correspond to the optimization carried out in the range considered in Fig. 5a, c, while panels (b), (d), and (f) correspond to the optimization carried out in Fig. 5b, d. The panels show, as a function of the training steps, the running average of the power [panels (a) and (b)], the running average of the loss function LQ [panels (c) and (d)], and the running average of the loss function Lπ [panels (e) and (f)]. Each curve corresponds to a separate training. However, ref. <sup>42</sup> only provides the value of the power of the optimized Otto cycle, not the duration of the four strokes that produce such power. We, therefore, performed a grid search in the space of these four durations. After identifying the largest power, we ran the Netwon algorithm to further maximize the power. The final cycle we found is the one shown as dashed lines in Fig. 5c, d. The corresponding power, shown as a dashed line in Fig. 5a, b, nicely matches with ref. <sup>42</sup> . DATA AVAILABILITY All raw data was generated with the accompanying code and is available in Figshare [(https://doi.org/10.6084/m9.figshare.16822054.v1).](https://doi.org/10.6084/m9.figshare.16822054.v1) CODE AVAILABILITY The code used to generate all results is available on GitHub [(https://github.com/](https://github.com/PaoloAE/paper_rl_thermal_machines) [PaoloAE/paper_rl_thermal_machines).](https://github.com/PaoloAE/paper_rl_thermal_machines) Received: 31 August 2021; Accepted: 28 November 2021; REFERENCES 1. Fagas, G., Gammaitoni, L., Paul, D. & Berini, G. A. ICT−Energy−Concepts Towards Zero Power Information and Communication Technology (InTech, 2014). 2. Pekola, J. P. Towards quantum thermodynamics in electronic circuits. Nat. Phys. 11, 118 (2015). 3. Giazotto, F., Heikkilä, T. T., Luukanen, A., Savin, A. M. & Pekola, J. P. Opportunities for mesoscopics in thermometry and refrigeration: physics and applications. Rev. Mod. Phys. 78, 217 (2006). 4. Binder, F., Correa, L., Gogolin, C., Anders, J. & Adesso, G. (eds) Thermodynamics in the Quantum Regime: Fundamental Aspects and New Directions (Springer International Publishing, 2019). 5. Vinjanampathy, S. & Anders, J. Quantum thermodynamics. Contemp. Phys. 57, 545 (2016). 6. Friedenauer, H., Schmitz, H., Glueckert, J., Porras, D. & Schaetz, T. Simulating a quantum magnet with trapped ions. Nat. Phys. 4, 757 (2008). 7. Blatt, R. & Roos, C. Quantum simulations with trapped ions. Nat. Phys. 8, 277 (2012). 8. Childress, L. et al. Coherent dynamics of coupled electron and nuclear spin qubits in diamond. Science 314, 281 (2006). 44. Abah, O. et al. Single-ion heat engine at maximum power. Phys. Rev. Lett. 109, 203006 (2012). 45. Allahverdyan, A. E., Hovhannisyan, K. V., Melkikh, A. V. & Gevorkian, S. G. Carnot cycle at finite power: attainability of maximal efficiency. Phys. Rev. Lett. 111, 050601 (2013). 46. Zhang, K., Bariani, F. & Meystre, P. Quantum optomechanical heat engine. Phys. Rev. Lett. 112, 150602 (2014). 47. Campisi, M. & Fazio, R. The power of a critical heat engine. Nat. Commun. 7, 11895 (2016). 48. Karimi, B. & Pekola, J. P. Otto refrigerator based on a superconducting qubit: classical and quantum performance. Phys. Rev. B 94, 184503 (2016). 49. Kosloff, R. & Rezek, Y. The quantum harmonic otto cycle. Entropy 19, 136 (2017). 50. Watanabe, G., Venkatesh, B. P., Talkner, P. & del Campo, A. Quantum performance of thermal machines over many cycles. Phys. Rev. Lett. 118, 050601 (2017). 51. Deffner, S. Efficiency of harmonic quantum otto engines at maximal power. Entropy 20, 875 (2018). 52. Gelbwaser-Klimovsky, D. et al. Single-atom heat machines enabled by energy quantization. Phys. Rev. Lett. 120, 170601 (2018). 53. Chen, J., Sun, C. & Dong, H. Boosting the performance of quantum otto heat engines. Phys. Rev. E 100, 032144 (2019). 54. Pekola, J. P., Karimi, B., Thomas, G. & Averin, D. V. Supremacy of incoherent sudden cycles. Phys. Rev. B 100, 085405 (2019). 55. Das, A. & Mukherjee, V. Quantum-enhanced finite-time otto cycle. Phys. Rev. B 2, 033083 (2020). 56. Berry, M. V. Transitionless quantum driving. J. Phys. A: Math. Theor. 42, 365303 (2009). 57. Deng, J., Wang, Q.-h, Liu, Z., Hänggi, P. & Gong, J. Boosting work characteristics and overall heat-engine performance via shortcuts to adiabaticity: quantum and classical systems. Phys. Rev. E 88, 062122 (2013). 58. Torrontegui, E. et al. Shortcuts to adiabaticity. Adv. At., Mol., Opt. Phys. 62, 117 (2013). 59. del Campo, A., Goold, J. & Paternostro, M. More bang for your buck: superadiabatic quantum engines. Sci. Rep. 4, 6208 (2014). 60. Çakmak, B. & Müstecaplioğlu, O. E. Spin quantum heat engines with shortcuts to adiabaticity. Phys. Rev. E 99, 032108 (2019). 61. Deng, S. et al. Superadiabatic quantum friction suppression in finite-time thermodynamics. Sci. Adv. 18, eaar5909 (2018). 62. Funo, K. et al. Speeding up a quantum refrigerator via counterdiabatic driving. Phys. Rev. B 100, 035407 (2019). 63. Villazon, T., Polkovnikov, A. & Chandran, A. Swift heat transfer by fast-forward driving in open quantum systems. Phys. Rev. A 100, 012126 (2019). 64. Cavina, V., Mari, A., Carlini, A. & Giovannetti, V. Optimal thermodynamic control in open quantum systems. Phys. Rev. A 98, 012139 (2018). 65. Suri, N., Binder, F. C., Muralidharan, B. & Vinjanampathy, S. Speeding up thermalisation via open quantum system variational optimisation. Eur. Phys. J. Spec. Top. 227, 203 (2018). 66. Menczel, P., Pyhäranta, T., Flindt, C. & Brandner, K. Two-stroke optimization scheme for mesoscopic refrigerators. Phys. Rev. B 99, 224306 (2019). 67. Scully, M. O., Chapin, K. R., Dorfman, K. E., Kim, M. B. & Svidzinsky, A. Quantum heat engine power can be increased by noise-induced coherence. Proc. Natl. Acad. Sci. USA 108, 15097 (2011). 68. Uzdin, R., Levy, A. & Kosloff, R. Equivalence of quantum heat machines, and quantum-thermodynamic signatures. Phys. Rev. X 5, 031044 (2015). 69. Jaramillo, J., Beau, M. & del Campo, A. Quantum supremacy of many-particle thermal machines. New J. Phys. 18, 075019 (2016). 70. Brandner, K., Bauer, M. & Seifert, U. Universal coherence-induced power losses of quantum heat engines in linear response. Phys. Rev. Lett. 119, 170602 (2017). 71. Kosloff, R. & Feldmann, T. Discrete four-stroke quantum heat engine exploring the origin of friction. Phys. Rev. E 65, 055102 (2002). 72. Sutton, R. S. & Barto, A. G. Reinforcement learning: An introduction (MIT press, 2018). 73. Haarnoja, T., Zhou, A., Abbeel, P. & Levine, S. In International Conference on Machine Learning Vol. 80 (PMLR, 2018). 74. Haarnoja, T. et al. Soft actor-critic algorithms and applications. Preprint at [https://arxiv.org/abs/1812.05905](https://arxiv.org/abs/1812.05905) (2018). 75. [Christodoulou, P. Soft actor-critic for discrete action settings. Preprint at https://](https://arxiv.org/abs/1910.07207) [arxiv.org/abs/1910.07207](https://arxiv.org/abs/1910.07207) (2019). 76. Delalleau, O., Peter, M., Alonso, E. & Logut, A. Discrete and continuous action representation for practical RL in video games. Preprint [at https://arxiv.org/abs/](https://arxiv.org/abs/1912.11077) [1912.11077](https://arxiv.org/abs/1912.11077) (2019). 77. Mnih, V. et al. Human-level control through deep reinforcement learning. Nature 518, 529 (2015). 78. Vinyals, O. et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature 575, 350 (2019). 10 P.A. Erdman and F. Noé 9. Wallraff, A. et al. Strong coupling of a single photon to a superconducting qubit using circuit quantum electrodynamics. Nature 431, 162 (2004). 10. Petta, J. R. et al. Coherent manipulation of coupled electron spins in semiconductor quantum dots. Science 309, 2180 (2005). 11. Ronzani, A. et al. Tunable photonic heat transport in a quantum heat valve. Nat. Phys. 14, 991 (2018). 12. Dutta, B. et al. Direct probe of the Seebeck coefficient in a kondo-correlated single-quantum-dot transistor. Nano Lett. 19, 506 (2019). 13. Maillet, O., Subero, D., Peltonen, J. T., Golubev, D. S. & Pekola, J. P. Electric field control of radiative heat transfer in a superconducting circuit. Nat. Commun. 11, 4326 (2020). 14. Senior, J. et al. Heat rectification via a superconducting artificial atom. Commun. Phys. 3, 40 (2020). 15. Roßnagel, J. et al. A single-atom heat engine. Science 352, 325 (2016). 16. Josefsson, M. et al. A quantum-dot heat engine operating close to the thermodynamic efficiency limits. Nat. Nanotechnol. 13, 920 (2018). 17. Klatzow, J. et al. Experimental demonstration of quantum effects in the operation of microscopic heat engines. Phys. Rev. Lett. 122, 110601 (2019). 18. von Lindenfels, D. et al. Spin heat engine coupled to a harmonic-oscillator flywheel. Phys. Rev. Lett. 123, 080602 (2019). 19. Maslennikov, G. et al. Quantum absorption refrigerator with trapped ions. Nat. Commun. 10, 202 (2019). 20. Peterson, J. P. S. et al. Experimental characterization of a spin quantum heat engine. Phys. Rev. Lett. 123, 240601 (2019). 21. Prete, D. et al. Thermoelectric conversion at 30 k in InAs/InP nanowire quantum dots. Nano Lett. 19, 3033 (2019). 22. Horne, N. V. et al. Single-atom energy-conversion device with a quantum load. NPJ Quantum Inf. 6, 37 (2020). 23. Alicki, R. The quantum open system as a model of the heat engine. J. Phys. A: Math. Gen. 12, L103 (1979). 24. Esposito, M., Kawai, R., Lindenberg, K. & den Broeck, C. V. Efficiency at maximum power of low-dissipation Carnot engines. Phys. Rev. Lett. 105, 150603 (2010a). 25. Wang, J., He, J. & He, X. Performance analysis of a two-state quantum heat engine working with a single-mode radiation field in a cavity. Phys. Rev. E 84, 041127 (2011). 26. Avron, J. E., Fraas, M., Graf, G. M. & Grech, P. Adiabatic theorems for generators of contracting evolutions. Commun. Math. Phys. 314, 163 (2012). 27. Ludovico, M. F., Battista, F., von Oppen, F. & Arrachea, L. Adiabatic response and quantum thermoelectrics for ac-driven quantum systems. Phys. Rev. B 93, 075136 (2016). 28. Cavina, V., Mari, A. & Giovannetti, V. Slow dynamics and thermodynamics of open quantum systems. Phys. Rev. Lett. 119, 050601 (2017). 29. Abiuso, P. & Giovannetti, V. Non-Markov enhancement of maximum power for quantum thermal machines. Phys. Rev. A 99, 052106 (2019). 30. Bhandari, B. et al. Geometric properties of adiabatic quantum thermal machines. Phys. Rev. B 102, 155407 (2020). 31. Abiuso, P. & Perarnau-Llobet, M. Optimal cycles for low-dissipation heat engines. Phys. Rev. Lett. 124, 110606 (2020). 32. Abiuso, P., Mille, H. J. D., Perarnau-Llobet, M. & Scandi, M. Geometric optimisation of quantum thermodynamic processes. Entropy 22, 1076 (2020). 33. Cavina, V., Erdman, P. A., Abiuso, P., Tolomeo, L. & Giovannetti, V. Maximum power heat engines and refrigerators in the fast-driving regime. Phys. Rev. A 104, 032226 (2021). 34. Arrachea, L., Moskalets, M. & Martin-Moreno, L. Heat production and energy balance in nanoscale engines driven by time-dependent fields. Phys. Rev. B 75, 245420 (2007). 35. Esposito, M., Kawai, R., Lindenberg, K. & Van den Broeck, C. Quantum-dot carnot engine at maximum power. Phys. Rev. E 81, 041106 (2010b). 36. Juergens, S., Haupt, F., Moskalets, M. & Splettstoesser, J. Thermoelectric performance of a driven double quantum dot. Phys. Rev. B 87, 245423 (2013). 37. Campisi, M., Pekola, J. & Fazio, R. Nonequilibrium fluctuations in quantum heat engines: theory, example, and possible solid state experiments. New J. Phys. 17, 035012 (2015). 38. Dann, R. & Kosloff, R. Quantum signatures in the quantum Carnot cycle. New J. Phys. 22, 013055 (2020). 39. Molitor, O. A. D. & Landi, G. T. Stroboscopic two-stroke quantum heat engines. Phys. Rev. A 102, 042217 (2020). 40. Feldmann, T., Geva, E., Kosloff, R. & Salamon, P. Heat engines in finite time governed by master equations. Am. J. Phys. 64, 485 (1996). 41. Feldmann, T. & Kosloff, R. Performance of discrete heat engines and heat pumps in finite time. Phys. Rev. E 61, 4774 (2000). 42. Rezek, Y. & Kosloff, R. Irreversible performance of a quantum harmonic heat engine. New J. Phys. 8, 83 (2006). 43. Quan, H., Liu, Y., Sun, C. & Nori, F. Quantum thermodynamic cycles and quantum heat engines. Phys. Rev. E 76, 031105 (2007). 11 79. Silver, D. et al. Mastering the game of go without human knowledge. Nature 550, 354 (2017). 80. Haarnoja, T. et al. Learning to walk via deep reinforcement learning. Preprint at [https://arxiv.org/abs/1812.11103](https://arxiv.org/abs/1812.11103) (2018c). 81. Bukov, M. et al. Reinforcement learning in different phases of quantum control. Phys. Rev. X 8, 031086 (2018). 82. An, Z. & Zhou, D. Deep reinforcement learning for quantum gate control. EPL 126, 60002 (2019). 83. Dalgaard, M., Motzoi, F., Sørensen, J. J. & Sherson, J. Global optimization of quantum dynamics with AlphaZero deep exploration. NPJ Quantum Inf. 6, 6 (2020). 84. Mackeprang, J., Dasari, D. B. R. & Wrachtrup, J. A reinforcement learning approach for quantum state engineering. Quantum Mach. Intell. 2, 5 (2020). 85. Niu, M. Y., Boixo, S., Smelyanskiy, V. N. & Neven, H. Universal quantum control through deep reinforcement learning. NPJ Quantum Inf. 5, 33 (2019). 86. Zhang, X.-M., Wei, Z., Asad, R., Yang, X.-C. & Wang, X. When does reinforcement learning stand out in quantum control? a comparative study on state preparation. NPJ Quantum Inf. 5, 85 (2019). 87. Sgroi, P., Palma, G. M. & Paternostro, M. Reinforcement learning approach to nonequilibrium quantum thermodynamics. Phys. Rev. Lett. 126, 020601 (2021). 88. Sweke, R., Kesselring, M. S., van Nieuwenburg, E. P. L. & Eisert, J. Reinforcement learning decoders for fault-tolerant quantum computation. Mach. Learn.: Sci. Technol. 2, 025005 (2020). 89. Luiz, F. S., de Oliveira Junior, A., Fanchini, F. F. & Landi, G. T. Machine classifi[cation for probe based quantum thermometry. Preprint at https://arxiv.org/abs/](https://arxiv.org/abs/2107.04555) [2107.04555](https://arxiv.org/abs/2107.04555) (2021). 90. Erdman, P. A., Cavina, V., Fazio, R., Taddei, F. & Giovannetti, V. Maximum power and corresponding efficiency for two-level heat engines and refrigerators: optimality of fast cycles. New J. Phys. 21, 103049 (2019). 91. Lekscha, J., Wilming, H., Eisert, J. & Gallego, R. Quantum thermodynamics with local control. Phys. Rev. E 97, 022142 (2018). 92. Gorini, V., Kossakowski, A. & Sudarshan, E. C. G. Completely positive dynamical semigroups of N level systems. J. Math. Phys. 17, 821 (1976). 93. Lindblad, G. On the generators of quantum dynamical semigroups. Commun. Math. Phys 48, 119 (1976). 94.Breuer, H. & Petruccione, F. The theory of open quantum systems (Oxford University Press, 2002). 95. Yamaguchi, M., Yuge, T. & Ogawa, T. Markovian quantum master equation beyond adiabatic regime. Phys. Rev. E 95, 012136 (2017). 96. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. Preprint at [https://arxiv.org/abs/1412.6980](https://arxiv.org/abs/1412.6980) (2014). 97. Curzon, F. & Ahlborn, B. Efficiency of a Carnot engine at maximum power output. Am. J. Phys. 43, 22 (1975). 98. Schmiedl, T. & Seifert, U. Efficiency at maximum power: an analytically solvable model for stochastic heat engines. Europhys. Lett. 81, 20003 (2007). 99. den Broeck, C. V. Thermodynamic efficiency at maximum power. Phys. Rev. Lett. 95, 190602 (2005). 100. Baumgratz, T., Cramer, M. & Plenio, M. B. Quantifying coherence. Phys. Rev. Lett. 113, 140401 (2014). 101. Gallego, R., Riera, A. & Eisert, J. Thermal machines beyond the weak coupling regime. New J. Phys. 16, 125009 (2014). 102. Gelbwaser-Klimovsky, D. & Aspuru-Guzik, A. Strongly coupled quantum heat machines. J. Phys. Chem. Lett. 6, 3477 (2015). 103. Perarnau-Llobet, M., Wilming, H., Riera, A., Gallego, R. & Eisert, J. Strong coupling corrections in quantum thermodynamics. Phys. Rev. Lett. 120, 120602 (2018). 104. Dann, R., Levy, A. & Kosloff, R. Time-dependent markovian quantum master equation. Phys. Rev. A 98, 052129 (2018). 105. Beenakker, C. W. J. Theory of coulomb-blockade oscillations in the conductance of a quantum dot. Phys. Rev. B 44, 1646 (1991). P.A. Erdman and F. Noé 106. Esposito, M., Lindenberg, K. & den Broeck, C. V. Thermoelectric efficiency at maximum power in a quantum dot. Europhys. Lett. 85, 60010 (2009). 107.Nazarov, Y. V. & Banter, Y. M. Quantum Transport (Cambridge, 2009). 108. Erdman, P. A. et al. Thermoelectric properties of an interacting quantum dot based heat engine. Phys. Rev. B 95, 245432 (2017). 109. Achiam, J. Spinning Up in Deep Reinforcement Learning [https://github.com/](https://github.com/openai/spinningup) [openai/spinningup](https://github.com/openai/spinningup) (2018). ACKNOWLEDGEMENTS We gratefully acknowledge funding by the BMBF (Berlin Institute for the Foundations of Learning and Data−BIFOLD), the European Research Commission (ERC CoG 772230), and the Berlin Mathematics Center MATH+ (AA1-6, AA2-8). AUTHOR CONTRIBUTIONS P.A.E. and F.N. designed the research and method. P.A.E. wrote the computer code and carried out the numerical calculations. P.A.E. and F.N. analyzed the data and wrote the manuscript. FUNDING Open Access funding enabled and organized by Projekt DEAL. COMPETING INTERESTS P.A.E. and F.N. are authors of a patent application containing aspects of this work (Application to the European Patent Office, file number: 21 191 966.7). ADDITIONAL INFORMATION Correspondence and requests for materials should be addressed to Paolo A. Erdman or Frank Noé. Reprints and permission information is available at [http://www.nature.com/](http://www.nature.com/reprints) [reprints](http://www.nature.com/reprints) Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly [from the copyright holder. To view a copy of this license, visit http://creativecommons.](http://creativecommons.org/licenses/by/4.0/) [org/licenses/by/4.0/.](http://creativecommons.org/licenses/by/4.0/) © The Author(s) 2022

섹션 본문 89문단 · 46,115자

(제목 없음)

1The optimal control of open quantum systems is a challenging task but has a key role in improving existing quantum information processing technologies. We introduce a general framework based on Reinforcement Learning to discover optimal thermodynamic cycles that maximize the power of outof-equilibrium quantum heat engines and refrigerators. We apply our method, based on the soft actor-critic algorithm, to three systems: a benchmark two-level system heat engine, where we find the optimal known cycle; an experimentally realistic refrigerator based on a superconducting qubit that generates coherence, where we find a non-intuitive control sequence that outperform previous cycles proposed in literature; a heat engine based on a quantum harmonic oscillator, where we find a cycle with an elaborate structure that outperforms the optimized Otto cycle. We then evaluate the corresponding efficiency at maximum power.

I. INTRODUCTION

2Thermal machines convert between thermal and mechanical energy in a controlled manner. Examples include heat engines such as steam and Otto engines, that extract useful work from a temperature difference, and refrigerators, that extract heat from a cold bath. Quantum thermal machines (QTMs) perform thermodynamic cycles via nanoscale systems that can be as small as single particles or two-level quantum systems (qubits). Quantum heat engines and refrigerators could find applications in heat management at the nanoscale [1], or for on-chip active cooling [2,3].

3Quantum thermodynamics is a rapidly growing research area that aims at the understanding, design and optimization of QTMs [4]. An open fundamental question is whether quantum effects can boost the performance of QTMs [2,4,5]. On the other hand, understanding how to optimally control the non-equilibrium dynamics of open quantum systems is a complicated task which can improve existing quantum information processing technologies.

4Nowadays it is possible to construct devices which behave as quantum systems with few degrees of freedom in platforms such as trapped ions [6,7], electron spins associated with nitrogen-vacancy centers [8], circuit quantum electrodynamics [9], and quantum dots [10], and to control their state through time-dependent controls, such as electro-magnetic pulses or gate voltages. The heat flow across these systems has been measured [11][12][13][14], and recent experimental realizations of QTMs have been reported [15][16][17][18][19][20][21][22].

5While the laws of thermodynamics pose universal constraints on the efficiency of thermal machines, regardless of their classical or quantum nature, they do not pose any restriction on the dynamics of the system, thus on the speed at which it operates. Therefore, it is crucial to study the power to discover potential benefits of using QTMs. However, optimizing the power is a challenging task: having to operate in finite-time, the state can be driven far from equilibrium, requiring us to model the full dynamics of the quantum system. Furthermore, strategies are needed to identify optimally controlled cycles.

6Power maximization of QTMs [4,23] is generally carried out either in specific regimes, or assuming a-priori a specific shape of the control-cycle. Within the slowdriving [24][25][26][27][28][29][30] and fast-driving regime, general strategies have been recently derived [31][32][33]. Beyond these regimes, common strategies consider specific cycle structures [34][35][36][37][38][39], such as the celebrated Otto cycle [40][41][42][43][44][45][46][47][48][49][50][51][52][53][54][55], and optimize specific aspects of the cycle. Shortcuts to adiabaticity [56][57][58][59][60][61][62][63], and variational optimization strategies have also been employed [64][65][66]. The impact of quantum effects on the performance of QTMs is not straightforward. Several studies have found quantum advantages [50,51,55,[67][68][69], while coherenceinduced power losses were proven in linear response for small driving amplitudes [70] and in specific models [42,48,54,64,71].

7In general, there is no guarantee that typical regimes and specific cycles considered in literature are optimal for power maximization. Overcoming this limitation may allow us to unlock quantum advantages in power extraction. This calls for the development of powerful search strategies to tackle power-maximization without relying on specific control sequences or assumptions.

8In this manuscript we propose a Reinforcement Learning (RL) [72] based approach to optimize the performance of QTMs. Specifically, we use a generalization of Soft Actor-Critic methods [73,74] for combined discrete and continuous actions, introduced in the context of robotics and videogames [75,76], to discover thermodynamic cycles that deliver maximum power. RL has received a great deal of attention for its success at mastering complicated tasks beyond human-level such as playing video games [77,78], the board-game Go [79] and for robotic applications [80]. RL has been recently used for accurate quantum state preparation [81][82][83][84], outperforming previous state-of-the-art methods [85,86], to minimize entropy production in closed quantum systems [87], for fault-tolerant quantum computation [88], and machine learning methods have been used for quantum thermometry [89].

9Our RL-based scheme for power maximization of QTMs is generic in that it makes no assumptions on the shape of the control cycle. Rather, it starts from scratch, allowing the RL agent to arbitrarily couple or decouple the quantum system from any bath, and to arbitrarily manipulate the control parameter. We apply our approach to three paradigmatic systems that have been well studied in literature: (i) a benchmark heat engine based on a two-level system, where our approach automatically finds the known maximum power cycle [90].

10(ii) an experimentally realistic refrigerator based on a superconducting qubit coupled to resonant circuits [48] which generates coherence during its cycle. Our RL approach discovers a new and non-intuitive cycle that outperforms previous proposals [48,54,62]. (iii) a heat engine based on a harmonic oscillator [42], where we find a cycle with an elaborate structure that shares qualitative similarities with the Otto cycle, but which performs better thanks to additional features. We complement the study of these systems by analyzing the corresponding efficiency at maximum power.

11The complexity and structure of these cycles demonstrates both the ability of the RL agent to choose actions based on a long-term return, and the complicated non-analytic nature of optimal cycles. Our results also show that the celebrated Otto cycle is not in general optimal for power maximization. Furthermore, we show that the detrimental effect of coherence on the performance of QTMs [71], specifically observed both in the superconducting qubit and harmonic oscillator cases, can be mitigated thanks to carefully crafted cycles.

A. Quantum Thermal Machines

12We describe a QTM by a quantum system (QS), acting as a working medium, that can exchange heat with a hot (H) or cold (C) thermal bath characterized by inverse temperatures β H < β C (Fig. 1). We can control the evolution of the QS and exchange work with it though a set of time-dependent control parameters u(t). In classical thermal machines, the working medium could be a gas in a cylinder, and u(t) could be the time-dependent position of the piston which influences the state of the gas and allows us to exchange energy. In a QTM, the working medium is a quantum system whose Hamiltonian can be parametrized by the control variables u(t) [91].

13Here we study finite-time thermodynamics of QTMs 1. Schematic representation of a quantum thermal machine. A hot (cold) bath at inverse temperature βH (βC), represented by the red (blue) box, can be coupled to the quantum system QS, gray circle, enabling a heat flux JH(t) (JC(t)). The quantum system is controlled by an external agent through a set of control parameters u(t), which allow power exchange P (t), and through a discrete control d(t) = {Hot, Cold, None} which determines which bath (if any) is coupled to the QS.

14within the Markovian regime using the commonly employed master equation [92][93][94][95]. This approach describes the time-evolution of the reduced density matrix of the QS,ρ(t), under the assumption of weak system-bath interaction. Settingh = 1, the master equation reads

15whereĤ[u(t)] is the Hamiltonian of the QS which depends explicitly on time via the control parameters u(t), [·, ·] denotes the commutator, and D

16describes the effect of the coupling between the QS and bath α = H, C. d(t) = {Hot, Cold, None} is an additional discrete control parameter which allows us to choose which bath (if any) is coupled to the QS. We compute the extracted power P (t) and the instantaneous heat flux J α (t) flowing out of bath α in the standard way [23] which guarantees the validity of the first law of thermodynamics ∂U (t)/(∂t) = −P (t) + α J α (t), the internal energy being defined as U = Tr[ρ(t)Ĥ[u(t)]] (see Methods for details). The two main thermal machines we consider are the heat engine and the refrigerator. A heat engine is used to extract work, while a refrigerator is used to extract heat from the cold bath. Therefore, we define

17respectively as the instantaneous power of a heat engine E (since the total heat extracted coincides with the work if the internal energy difference is zero), and as the instantaneous cooling power of a refrigerator R. Our goal is to determine the optimal driving, i.e. to determine the functions u(t) and d(t) that maximize the average power in the long run. We thus define the following exponentially weighted average of the power FIG. 2. Schematic representation of the learning process. A computer agent (blue box) chooses an action ai at time step i based on the current state si of the environment (gray box) through the policy function π(ai|si). The action, which encodes the control (u(t), d(t)), is passed to the environment (lower arrow) which evolves the quantum state si of the machine based on the action ai, and computes the average power during the time step as reward. The new state si+1 and reward ri+1 are returned to the agent (upper arrow), which uses this information to improve π(a|s) using the soft actor-critic algorithm, which learns also the value function Q(s, a). Both π(a|s) and Q(s, a) are parameterized using fully-connected neural networks (NNs). This process is reiterated until convergence of the policy.

18whereγ determines the timescale over which we average. While we do not enforce any periodic structure on the controls u(t) and d(t), we expect the RL agent to automatically discover the optimality of periodically driving the QTM and the corresponding driving period. The intuition is the following: in the short term, we can maximize the power by taking advantage of the state preparation of the system, for example by extracting all the free energy from the system. However, the amount of work that can be extracted this way is bounded, while the work that can be extracted through cycles scales with the number of performed cycles, i.e. with time. Therefore in the long run, i.e. for small enoughγ, we expect the maximization of Eq. (3) to naturally discover thermodynamic cycles and to prevent the exploitation of transient effects. We confirm this hypothesis in all QTMs studied below.

B. Reinforcement Learning for Quantum Thermal Machines

19We formulate the power optimization problem as a discounted, continuing RL task. As we will demonstrate, this approach is able to learn far-from-equilibrium finitetime thermodynamic cycles with high performance.

20RL is a general framework that tackles optimization problems formulated in the following way. As schematically shown in Fig. 2, a computer agent (blue box) must learn to master some task by repeated interactions with some environment (gray box). Discretizing time in time steps ∆t, we denote with s i ∈ S the state of the environment at time t = i∆t, where S is the state space. The agent must choose an action a i ∈ A to perform on the environment based on its current policy (lower orange arrow). A is the action space, and the policy π(a i |s i ) is a function that describes the probability distribution of choosing action a i , given that the environment is in state s i . The environment then evolves its state according to the chosen action, and provides feedback back to the agent by returning the updated state s i+1 and a scalar quantity r i+1 known as the reward (upper orange arrow). This procedure is reiterated for a large number of time steps.

21At every time step t i , the aim of the agent is to use the feedback it receives from the environment to learn an optimal policy that maximizes, in expectation, the return, i.e. the total future reward it receives from the environment, defined as

22where γ ∈ [0, 1) is the discount factor which determines how much we are interested in future rewards, as opposed to immediate rewards. We now turn to the power maximization problem. Discretizing time in steps ∆t, we search for protocols u(t) and d(t) that are constant during each time step. As shown in Fig. 2, we choose as action space A = {(u, d) | u ∈ U, d ∈ {Hot, Cold, None}}, where U is the continuous set of accessible controls, which can account for any experimental limitation, and d is the discrete action, motivated by typical thermodynamic cycles, which determines which bath (if any) is coupled to the QS. We choose the physical quantum states of the QS and the last chosen action as state space, i.e. S = {(ρ, u) |ρ ∈ D, u ∈ U }, where D = {ρ |ρ ≥ 0, Tr[ρ] = 1} is the space of density matrices. Crucially, we choose as reward

23which is the average power of the machine during the time interval [t, t + ∆t]. Plugging Eq. (5) into Eq. (4), we see that the aim of the agent is to maximize the average power P [ν] introduced in Eq. (3), whereγ = − ln γ/∆t (see Methods for details). In the RL notation, γ sets the timescale for the power averaging, with γ → 1 corresponding to long term averaging. Our agent has no prior knowledge of quantum dynamics, nor of thermodynamic cycles: the evolution of the state from s i =ρ(t) to s i+1 =ρ(t + ∆t) and the computation of the rewards r i is performed by the environment. We learn the optimal policy employing the soft actor-critic method, which relies on learning also a value function Q(s, a), generalized to a combination of discrete and continuous actions [73][74][75][76]. In this approach, the policy function π(a|s) plays the role of an "actor" that chooses the actions to perform, while the value function Q(s, a) plays the role of a "critic" that judges the choices made by the actor, thus providing feedback to improve the actor's behavior. Both π(a|s) and Q(s, a) are parameterized using fully-connected neural networks with two hidden layers, and they are determined by minimizing the loss functions in Eqs. (22) and (29) in Methods using the ADAM optimization algorithm [96]. The gradient of the loss functions is computed off-policy, over a batch of past experience which is recorded and stored in a replay buffer, using backpropagation (see Methods for details).

C. Case Studies

24In this section we prove the validity of our RLbased approach by applying it to three different systems, namely a heat engine based on a two-level system, a refrigerator based on a superconducting qubit, and a heat engine based on a quantum harmonic oscillator. While the results presented below were obtained performing a single training, in Methods we show that our RL approach reliably converges to solutions with nearly the same performance across multiple trainings.

25a. Two-level system heat engine. We first benchmark our method on a two-level system for which the optimal control cycle is known:

26where u(t), which determines the energy gap of the twolevel system, is our single control parameter, E 0 is a fixed energy scale andσ z is a Pauli matrix. We consider the qubit to be coupled to fermionic baths with flat density of states (for example, a single-level quantum dot tunnelcoupled to metallic leads), with thermalization timescales fixed by the rates Γ α (see Methods for details).

27Our results are shown in Fig. 3. Fig. 3a shows the running average of the power

28an exponentially weighed average of the past rewards with weight γ, as a function of the time steps. Fig. 3b show the actions chosen by the agent, as a function of the steps, at three different moments during training highlighted by the black dots in Fig. 3a. The position of the segments corresponds to the chosen value of u, while the color represents the discrete action d (see legend). The optimal cycle learned at the end of the training is shown in Fig. 3c. Initially, the agent has no knowledge of the system, and its actions appear random (Fig. 3b, left), producing negative power P [E] γ (Fig. 3a). As expected, by performing random actions the agent is dissipating work into the heat baths, rather than extracting work. With increasing time, the agent gains experience and learns how to control the heat engine: P [E] γ increases, and structure appears in the chosen actions (Fig. 3b, center and right). Eventually the policy converges, and P [E] γ saturates to a finite positive value. The optimal cycle for this model was derived in Ref. [90], and it corresponds to the exact structure discovered by the agent, i.e. a square wave alternating between the hot and the cold bath as fast as possible without spending any time disconnected from the baths. The black dashed line in Fig. 3a shows the corresponding power. Notably, although the frequency of the learned cycle is limited by the choice of ∆t, and although the values of u(t) found by the agent are slightly different respect to the ones predicted by Ref. [90] (the difference is ≈ 0.05), the power it generates nearly coincides with the upper bound. This occurs because there is a manifold of near-optimal solutions.

29We conclude the analysis of the two-level system heat engine by computing the efficiency at maximum power (EMP), i.e. the thermodynamic efficiency of the heat engine, defined as the ratio between the extracted work and the input heat, while the engine is operated at maximum power. We compare the EMP both to the Carnot efficiency η c = 1 − β H /β C and to the Curzon-Ahlborn efficiency η ca = 1 − β H /β C . Despite not being a fundamental upper bound, the latter has received considerable attention in the literature for its simplicity, for being an upper bound to the EMP in various specific models [24,28,97,98], and it has been derived by gen-eral arguments from linear irreversible thermodynamics [99]. Interestingly, we find that the optimal cycle shown in Fig. 3c delivers a large EMP corresponding to 100% of η ca , equivalent to 59% of η c .

30b. Superconducting qubit refrigerator. We now consider a refrigerator based on an experimentally realistic system, i.e. a superconducting qubit coupled to two resonant circuits which behave as heat baths [48]. As opposed to the previous setup, here coherence between the instantaneous eigenstates is generated while driving the system, since [Ĥ(u 1 ),Ĥ(u 2 )] = 0 for u 1 = u 2 . This quantum effect was found to deter the power of this specific setup [48,54,62] and of arbitrary systems in linear response and for small driving amplitudes [70].

31As shown in Refs. [48,54,62], the system Hamiltonian is given byĤ

32where E 0 is a fixed energy scale, ∆ characterizes the minimum gap of the system, and u(t) is our control parameter. In this setup the coupling to the bath is fixed, and cannot be controlled. However, the qubit is resonantly coupled to the baths at different energies. The u-dependent coupling strength to the C (H) bath is described by the function γ

33u ) that, as in Ref. [62], is peaked at u = 0 (u = 1/2) with a resonance width determined by the quality factor Q C (Q H ) (see Methods for details).

34Panels (a), (b) and (c) of Fig. 4 report the results in the same style as in Fig. 3, with the exception that all actions are black since there is no discrete choice to make, while Fig. 4d shows the coupling strength γ The parameters were chosen as in Fig. 7 of Ref. [62]. As previously, the agent begins with random actions in the first steps, and the corresponding running average cooling power P [R] γ is slightly negative, indicating that we are dissipating heat into the cold bath. As the agent gains experience, P [R] γ increases until it saturates to a final positive value obtained with the cycle shown in Fig. 4c (thick lines).

35Interestingly, this setup was partially optimized in Ref. [62]. In their analysis, the authors fix a smoothed trapezoidal cycle u(t) (Fig. 4c, dashed line) which was shown to outperform a sine and a trapezoidal cycle [48]. They find that the cooling power is positive for large cycle periods T , and tends to zero as T → ∞. However, the cooling power becomes negative as T → 0 because the detrimental effect of the generation of coherence increases with the speed of the cycle. As a consequence, there is an intermediate optimal value of T . They find that P [R] ≈ 2.3 × 10 −4 at this optimal choice (dashed line in Fig. 4a,c). Notably, our RL agent discovers a protocol with P [R] ≈ 10.8 × 10 −4 using the same system parameters. This improvement is due to the non-intuitive additional step visible in Fig. 4c the baths at u = 0 and u = 0.5. However, the agent identifies also a third point, around u ≈ 0.13, where it spends ≈ 1/4 of the total cycle time and where the system is essentially decoupled from the bath, thus undergoing unitary evolution (as can be seen by the small values of γ (α) u corresponding to u ≈ 0.13 in Fig. 4d). This additional feature allows us to roughly extract the same amount of heat per cycle, but 5 times faster. Interestingly, we verified that the trapezoidal cycle running at the same speed as the cycle found by the RL agent would yield negative power. As argued in [48,54,62], this power loss is attributed to the generation of coherence during the cycle, so we can interpret the power enhancement achieved by our cycle as a mitigation of such detrimental effect. To confirm this, we rigorously quantify the generation of coherence in both cycles by computing the time-average of the relative entropy of coherence [100]. Indeed, we find that the trapezoidal cycle operated at the same speed as the cycle found by the RL agent generates almost twice as much coherence (see Methods for details).

36We conclude the study of the qubit-based refrigerator by evaluating the coefficient of performance (COP) at maximum power, i.e. the ratio between the heat ex-tracted from the cold bath and the input work, while the system is operated at maximum cooling power. We find that our cycle shown in Fig. 4c as a thick black line delivers a COP at maximum power that is 6% of

37, which is Carnot's upper bound to the COP. While this may appear as a rather low value, we notice that the COP at maximum power of a two-level system coupled to Fermionic of Bosonic baths is zero [90], and that for on-chip cooling applications, the aim is typically to maximize the cooling power regardless of the efficiency of such a process.

38c. Harmonic oscillator heat engine. At last, we consider a heat engine based on a collection of noninteracting particles confined in a harmonic potential [42]. The Hamiltonian is given bŷ

39where m is the mass of the system, w 0 is a fixed frequency andp andq are the momentum and position operators. The control parameter u(t) allows us to change the frequency of the oscillator. As in the qubit heat engine case, we let the agent choose which bath (if any) to couple to the oscillator. Since [Ĥ(u 1 ),Ĥ(u 2 )] = 0 for u 1 = u 2 , also this system exhibits a power loss at finite driving speed [42,71]. The coupling to the baths, characterized by the thermalization rates Γ α , is modeled as in Ref. [42] (see Methods for details). The solid line in Figs. 5a and 5b shows P [E] γ , as a function of the step, for the same system parameters (chosen as in the upper panel of Fig. 6 of Ref. [42]), but setting respectively U = [0.5, 1] and U = [0. 35, 1.5]. In both cases, the power is negative for small steps, while it converges to a positive value as the agent gains experience. The corresponding final cycles learned by the agent are shown in Figs. 5c and 5d as thick lines. These cycles display a quite elaborate structure which demonstrates the ability of the agent to perform planning for a longtime reward. Indeed, while the system is in contact with the cold bath, which happens roughly for 20 time steps, energy is flowing into the bath, thus producing negative rewards. Nonetheless, the agent discovers that this step, required by the second law of thermodynamics, is necessary for power extraction in the long run.

40We now compare the cycle discovered by the agent to the well-known Otto cycle often considered in literature. [42], the agent discovers a cycle that outperforms the optimized Otto cycle (Fig. 5a). If we fur- ther allow the agent to modulate u(t) in a larger interval, we find a cycle with an even larger power (Fig. 5b).

41The protocol discovered by the agent in Fig. 5a resembles the Otto cycle (both are flat for some time at u = u C and u = u H ), yet there are additional features. First, the agent ramps up the control u(t) between u C and u H in a non-linear fashion while in contact with a bath, rather than decoupling the system. Next, there are two strong discontinuities where the system is abruptly disconnected from the baths for a short time (Fig. 5c, green segments). These additional features turn out to enhance the power. At last, we notice that the cycle found by the agent in Fig. 5d is more regular than the one in Fig. 5c, and it further deviates from an Otto cycle. The crucial difference with respect to the Otto cycle therefore seems to be the ramping up of u(t) while in contact with the baths, which probably benefits from simultaneously exchanging heat and modulating u(t), rather than doing them in two separate strokes. As in the two-level case, we evaluate the EMP of the discovered cycles shown in Fig. 5c and 5d. In both cases the EMP is considerably high, corresponding respectively to 60% and 78% of η ca , equivalent to 46% and 59% of η c . Interestingly, the cycle shown in Fig. 5d yields both a higher power and a larger EMP than the cycle displayed in Fig. 5c.

III. DISCUSSION

42We introduced a general framework based on Reinforcement Learning to discover thermodynamic cycles that maximize the power of out-of-equilibrium quantum thermal machines, paving the way for a more systematic use of machine learning in the field of quantum thermodynamics. Using state-of-the-art machine learning techniques, we applied our method to three different paradigmatic setups. Our method found the optimal known solution in the benchmark system, while in the other systems it discovered new unintuitive and elaborate cycles which outperform previously proposed cycles.

43Our results show that the celebrated Otto cycle is not in general optimal for power extraction, and that carefully crafted cycles can mitigate coherence-induced power losses [48,54,70,71] without introducing additional controls as required by Shortcuts to Adiabaticity [56][57][58][59][60][61][62][63]. As opposed to other optimal control techniques, such as the Pontryaghin Minimum Principle [64][65][66], our RL-based approach has the following advantages: it does not require any analytic calculation; it can handle both continuous and discrete controls (such as the choice of the heat bath), and it can naturally find discontinuous and irregular protocols; it can be applied as-is to arbitrarily complicated setups and it could be used to find optimal protocols also in the presence of noise in the controls.

44Future research directions include applications to multi-particle systems, where many-body advantages might be revealed, and a systematic study of the mitigation of coherence-induced power losses. Interesting extensions of our framework include investigating the strong system-bath coupling regime going beyond a master equation approach [101][102][103], optimizing additional thermodynamic quantities, such as minimizing the fluctuations in the power output, and developing of a scheme that can be applied directly to experimental setups that does not require the knowledge of the quantum state.

IV. METHODS

45Physical model. As discussed in the main text, we assume that the state evolves according to the Markovian master Eq. (1), which can be derived, also for nonadiabatic drivings [95], in the weak system-bath coupling regime performing the usual Born-Markov and secular approximation [92][93][94] and neglecting the Lamb-shift contribution. We notice that since the RL agent produces piece-wise constant protocols, we are not impacted by possible inaccuracies of the master equation subject to fast parameter driving [104], provided that ∆t is not smaller than the bath timescale. Without loss of gener-ality, the dissipators can be expressed as [93,94]

46k,u(t) ), (9) where λ α [d(t)] ∈ {0, 1} are functions that determine which bath is coupled the QS, (α) k,u(t) are the Lindblad operators, and γ (α) k,u(t) are the corresponding rates. In particular, λ H (Hot) = 1, λ C (Hot) = 0, while λ H (Cold) = 0, λ C (Cold) = 1, and λ H (None) = λ C (None) = 0. Notice that both the Lindblad operators and the rates can depend on time through the value of the control u(t). Their explicit form depends on the details of the system, i.e. on the Hamiltonian describing the dynamics of the overall system including the bath and the system-bath interaction. Below, we provide the explicit form of (α) k,u(t) and γ (α) k,u(t) used to model the three setups considered in the manuscript. We adopt the standard approach to compute the instantaneous power and heat currents [23]

47In the two-level system heat engine, we consider the following Lindblad operators and corresponding rates (identifying k = ±):

48whereσ + andσ − denote the raising and lowering operators, Γ α is a constant rate which sets the thermalization timescale when the QS is coupled to bath α, and f (x) = [1 + exp(x)] −1 is the Fermi distribution. This choice can be derived, for example, when considering the qubit as a single-level quantum dot tunnel-coupled to metallic leads, with flat density of states, which act as heat baths [105][106][107][108].

49In the superconducting qubit refrigerator, we employ the model first put forward in Ref. [48], and further studied in Refs. [54,62]. In particular, we consider the following Lindblad operators and corresponding rates (identifying k = ±):Â

50where |g u(t) and |e u(t) are, respectively, the instantaneous ground state and excited state of Eq. (7). The corresponding rates are given by γ

51where ∆ u(t) is the instantaneous energy gap of the system, and S α (∆ ) = g α 2

52(13) is the noise power spectrum of bath α. Here ω α , Q α and g α are the base resonance frequency, quality factor and coupling strength of the resonant circuit acting as bath α = H, C (see Refs. [48,62] for details). As in Ref. [62], we choose ω C = 2E 0 ∆ and ω H = 2E 0 ∆ 2 + 1/4, such that the C (H) bath is in resonance with the qubit when u = 0 (u = 1/2). The width of the resonance is governed by Q α . The total coupling strength to bath α, plotted in Fig. 4d, is quantified by

53In the Harmonic oscillator heat engine, following Ref. [42], we describe the coupling to the baths through the Lindblad operatorsÂ

54−,u(t) =â u(t) and corresponding rates γ

55are respectively the (control dependent) lowering and raising operators, Γ α is a constant rate setting the thermalization timescale of the system coupled to bath α, and

56Reinforcement-Learning Algorithm. As discussed in the Results section, the choice of the reward as in Eq. (5) guarantees that the aim of the RL agent is to maximize P [ν] introduced in Eq. (3). To be precise, plugging Eq. (5) into Eq. (4) gives P [ν] (up to an irrelevant constant prefactor) only in the limit of ∆t → 0. However, also for finite ∆t, both quantities are time-averages of the power, so they are equally valid definitions to describe a long-term power maximization.

57We use a generalization of the soft-actor critic (SAC) method, first developed for continuous actions [73,74], to handle a combination of discrete and continuous actions [75,76]. We here present an overview of our implementation of SAC putting special emphasis on the differences with respect to the standard implementation. However, we refer to [73][74][75][76] for additional details. Our method, implemented with PyTorch, is based on modifications and generalizations of the SAC implementation provided by Spinning Up from OpenAI [109]. All code and data to reproduce the experiments is available online (see Data Availability and Code Availability sections).

58The SAC algorithm is based on policy iteration, i.e. it consists of iterating multiple times over two steps: a policy evaluation step, and a policy improvement step.

59In the policy evaluation step, the value function of the current policy is (partially) learned, whereas in the policy improvement step a better policy is learned by making use of the value function. We now describe these steps more in detail.

60In typical RL problems, the optimal policy π * (s|a) is defined as the policy that maximizes the expected reward defined in Eq. (4), i.e.:

61where E π denotes the expectation value choosing actions according to the policy π. The initial state s 0 = s is sampled from µ π , i.e. the steady-state distribution of states that are visited by π. In the SAC method, balance between exploration and exploitation [72] is achieved by introducing an Entropy-Regularized maximization objective. In this setting, the optimal policy π * is given by

62where ε ≥ 0 (usually denoted with α in the RL literature) is a hyper-parameter that balances the trade-off between exploration and exploitation, and

63is the entropy of the probability distribution P . Notice that we replaced the unknown state distribution µ π with B, which is a replay buffer populated during training by storing the observed one-step transitions (s k , a k , r k+1 , s k+1 ). We define the value function Q π (s, a) of a given policy π as Q π (s, a) = E π r 1 + ∞ k=1 γ k r k+1 + εH(π(·|s k )) s 0 = s, a 0 = a , (18) and its recursive Bellman equation reads Q π (s, a) = E a1∼π(·|s1)

64We use a function approximator Q φ (s, a) (e.g. a neural network) to describe the value function of the current policy, where φ represents a collection of learnable parameters. Next, we describe the policy π(a|s). Since we are dealing with a combination of a discrete and continuous actions, we define a = (u, d), where u is the continuous action and d is the discrete action (for simplicity, we describe the case of a single continuous action, though the generalization to multiple variables is straightforward). From now on, all functions of a are also to be considered as functions of u, d. We decompose the joint probability distribution as π θ (u, d|s) = π θD (d|s) · π θ U,d (u|d, s),

65where π θD (d|s) is a function approximator for the marginal probability of taking discrete action d, which depends on learnable parameters θ D , and π θ U,d (u|d, s) is a parameterization of the conditional probability density of choosing action u, given action d, which depends on learnable parameters θ U,d -one set for each discrete action d. We denote with θ the collection of all parameters θ D and θ U,d . Notice that this decomposition allows us to describe correlations between the discrete and the continuous action, which are crucial in our application. We further parameterize π θ U,d (u|d, s) as a squashed Gaussian policy, i.e. as the distribution of the variablẽ

66where µ θ U,d (s) and σ θ U,d (s), representing respectively the mean and standard deviation of the Gaussian distribution, are function approximators which depend on the learnable parameters θ U,d , N (0, 1) is the normal distribution with zero mean and unit variance, and where we assume that U = [u a , u b ].

67We now describe the policy evaluation step. In the SAC algorithm, we learn two value functions Q φi (s, a) described by the learnable parameters φ i , for i = 1, 2. Since Q φi (s, a) should satisfy the Bellman Eq.

68where y(r, s ) = r+ γ E a ∼π θ (·|s ) min j=1,2 Q φtarg,j (s , a ) − ε log π θ (a |s ) . (23) Notice that in Eq. (23) we replaced Q φi with min j=1,2 Q φtarg,j , where φ targ,j , for j = 1, 2, are target parameters which are not updated when minimizing the loss function; instead, they are held fixed during backpropagation, and then they are updated according to polyak averaging, i.e.

69where ρ polyak is a hyperparameter. This change was shown to improve learning [73,74]. In order to evaluate the expectation value in Eq. (23), we use the decomposition in Eq. (20) to write E a ∼π θ (·|s )

70where we denote a = (u , d ). Plugging Eq. (25) into Eq. (23), and approximating the expectation value over u with a single sampled value yields

71We therefore perform a full average over the discrete action, and a single sampling of the continuous action.

72We now turn to the policy improvement step. Given a policy π θ old , Ref. [74] proves that π θnew is a better policy [respect to maximization in Eq. (16)] if we update the policy parameters according to

73where s is any state, D KL denotes the Kullback-Leibler divergence, and Z π θ old is the partition function of the exponential of the value function. Intuitively, this step is the equivalent of making the policy -greedy in the standard RL setting. The idea is to use the minimization in Eq. (27) to define a loss function to perform an update of θ. Noting that the partition function does not impact the gradient, multiplying the Kullback-Leibler divergence by α, and replacing Q π θ old with min j Q φj , we define the loss function as a) . (28) In order to evaluate the expectation value in Eq. (28), we use the previous trick of averaging the discrete action, and performing a single sample of the continuous action using ξ. Recalling Eq. (21), this yields

74To summarize, the SAC algorithm consists of repeating over and over a policy evaluation step, and a policy improvement step. The policy evaluation step consists of a single optimization step to minimize the loss functions L Q (φ i ) (for i = 1, 2), given in Eq. (22), where y(r, s ) is computed using Eq. (26). The policy improvement step consists of a single optimization step to minimize the loss function L π (θ) given in Eq. (29). In both loss functions, the expectation value over the states is approximated with a batch of experience sampled randomly from the replay buffer B.

75Training details. We now provide the details of the algorithm used to learn the four specific cycles described in the main manuscript.

76The value function Q φ (s, u, d) is parameterized the following way. We use a fully connected neural network (NN), with two hidden layers, that takes s and u as input (by stacking them into a single array), and outputs |D| values, where |D| is the number of discrete actions. The i th output corresponds to Q φ (s, u, d = d i ), where {d i } are the possible discrete actions. We use the ReLU activation function in all layers except for the output layer, were we apply the identity (since the value function can take arbitrary positive or negative values). The parameters φ correspond to the weights and biases of the whole network.

77The policy π θ (u, d|s) = π θD (d|s) · π θ U,d (u, |d, s) is parameterized the following way. We use a fully connected NN, with two hidden layers, that takes s as input, and produces 3 · |D| values, corresponding to

78More specifically, we use the ReLU activation in all layers except for the output layer, where we use the identity. However, in order to enforce the normalization i π θD (d i |s) = 1, we apply a soft-max to the corresponding outputs, and instead of outputting σ θ U,d i (s), we output log(σ θ U,d i (s)), which has no constraint on the sign.

79In order to enforce sufficient exploration in the early stage of training, we do the following. For a fixed number of initial steps, we choose random actions sampling them uniformly withing their range. Furthermore, for another fixed number of initial steps, we do not update the parameters to allow the replay buffer to have enough transitions. B is a first-in-first-out buffer, of fixed dimension, from which batches of transitions are randomly sampled to update the NN parameters. After this initial phase, we repeat a policy evaluation and a policy improvement step n updates times every n updates steps. This way, the overall number of updates coincides with the number of actions performed on the environment. The optimization steps are performed using the ADAM optimizer with the standard values of β 1 and β 2 . To favor an exploratory behaviour early in the training, and at the same time to end up with a policy that is approximately deterministic, we schedule ε. In particular, we vary it during each step according to ε(n steps ) = ε 0 exp(−n steps /ε decay ),

80where n steps is the current step number, and ε 0 and ε decay are hyperparameters. All hyperparameters used to produce the cycles in Figs. 3, 4 and 5 are provided in Table I. At last, we discuss the parameterization of the state s. As discussed in the manuscript, we use s = (ρ, u) as state. While u is passed to the NNs as-is, we now detail how we encodedρ in the 3 systems studied in the manuscript.

81In the two-level system heat engine, a closed equation of motion governing the evolution of p(t) ≡ Tr[ρ(t)σ +σ− ] can be derived from the Markovian master equation, and the instantaneous heat flux J α (t) can be expressed solely in terms of p(t) (see Ref. [90] for details). Therefore, we use the single parameter p(t) ∈ [0, 1] to encodeρ. In the superconducting qubit refrigerator, we encodeρ using the following three real parameters: e u(t) |ρ(t)|e u(t) , Re[ g u(t) |ρ(t)|e u(t) ] and Im[ g u(t) |ρ(t)|e u(t) ]. These fully characterize a density matrix of a qubit.

82In the Harmonic oscillator heat engine a closed set of equations of motion can be derived from the Markovian master equation for the following three quantities:

83Furthermore, the heat flux J α (t) can be expressed solely in terms of these quantities (see Ref. [42] for details). We thus use these three quantities to encodeρ. More specifically, since they are not bounded in an obvious way by some system parameter, for numerical stability we usẽ O(t) ≡ log(|O(t)| + δ) and sO(t) = sign(O(t)) instead of O = H, L, D to encode the state, where δ = 10 −20 is a small parameter introduced to prevent numerical divergences. At last, we do not use sH(t) since H(t) is always a positive quantity (being the energy of the harmonic oscillator). Therefore, we encodeρ using the following 5 parameters: (H,L,D, sL, sD). Convergence of the RL approach. The training process presents some degree of stochasticity, such as the initial random steps, and the random sampling of a batch of experience from the replay buffer to compute an approximate gradient of the loss functions. We thus need to evaluate the reliability of our approach.

84In Figs. 6 an 7, we show the training curves for 6 consecutive runs of our method applied to all 4 cases studied in the main text. More specifically, panels (a), (c) and (e) of Fig. 6 correspond to the training of the two-level system heat engine (considered in Fig. 3), while panels (b), (d) and (f) of Fig. 6 correspond to the training of the superconducting qubit refrigerator (considered in Fig. 4). Panels correspond to the training of the Harmonic oscillator in the interval considered in Figs. 5b and 5d. Both Figs. 6 and 7 show, as a function of the step, the running average of the power [panels (a) and (b)], the running average L Q γ of the loss function L Q [panels (c) and (d)] and the running average L π γ of the loss function L π [panels (e) and (f)] computed on the batch of experience used to estimate the gradient of the corresponding loss function. Every curve corresponds to a separate training.

85As we can see in Figs. 6 an 7, in all 4 cases the running average of the reward reliably converges to a solution yielding similar values of the power, and also the running averages of the loss functions display a qualitatively similar behavior. We notice that while L Q is the mean square of the Bellman error [see Eq. (22)], L π is just a function whose gradient provides a better policy, so its value during training is not required to be a decreasing function.

86Generation of coherence. In order to quantify the coherence generated in the instantaneous eigenbasis of the Hamiltonian in the refrigerator based on a superconducting qubit, we evaluated the time average of relative entropy of coherence [100], defined as C(ρ(t)) = S(ρ diag. (t)) − S(ρ(t)), where S(ρ) = −Tr[ρ lnρ] is the Von Neumann entropy, and ρ diag. (t) = g u(t) |ρ(t)|g u(t) · |g u(t) g u(t) | + e u(t) |ρ(t)|e u(t) · |e u(t) e u(t) | (34) is the density matrix, in the instantaneous eigenbasis |g u(t) and |e u(t) , with the off-diagonal terms canceled out. We find that that the time-average of the relative entropy of coherence is ≈ 0.116 in the cycle found by the RL agent, while it is ≈ 0.194 applying the trapezoidal cycle with the same period.

87Otto cycle comparison. In Fig. 5 we compare the performance of an Otto cycle, optimized as in the upper panel of Fig. 6 of Ref. [42], with the cycle discovered by the RL agent. However, Ref. [42] only provides the value of the power of the optimized Otto cycle, not the durations of the four strokes that produce such power. We therefore performed a grid search in the space of these four durations. After identifying the largest power, we ran the Netwon algorithm to further maximize the power. The final cycle we found is the one shown as a dashed lines in Figs. 5c and 5d. The corresponding power, shown as a dashed line in Figs. 5a and 5b, nicely matches with Ref. [42].

DATA AVAILABILITY

88All raw data was generated with the accompanying code and is available in Figshare (https://doi.org/10. 6084/m9.figshare.16822054.v1).

CODE AVAILABILITY

89The code used to generate all results is available on GitHub (https://github.com/PaoloAE/paper_rl_ thermal_machines).

참고문헌 116건

  1. Reinforcement Learning: An Introduction Neurocomputing · Elsevier BV · 2000 10.1016/s0925-2312(00)00324-6
  2. Adiabatic response and quantum thermoelectrics for ac-driven quantum systems Physical review. B./Physical review. B · American Physical Society · 2016 10.1103/physrevb.93.075136
  3. Adam: A Method for Stochastic Optimization 2014
  4. Shortcuts to Adiabaticity Advances in atomic, molecular, and optical physics · Elsevier BV · 2013 101016b9780124080904000025
  5. Concepts and Methods in the Theory of Open Quantum Systems Lecture notes in physics · Springer Science+Business Media · 2003 10.1007/3-540-44874-8_4
  6. Strongly Coupled Quantum Heat Machines The Journal of Physical Chemistry Letters · American Chemical Society · 2015 10.1021/acs.jpclett.5b01404
  7. Quantum-dot Carnot engine at maximum power Physical Review E · American Physical Society · 2010 10.1103/physreve.81.041106
  8. Quantum thermodynamic cycles and quantum heat engines Physical Review E · American Physical Society · 2007 10.1103/physreve.76.031105
  9. Discrete four-stroke quantum heat engine exploring the origin of friction Physical review. E, Statistical physics, plasmas, fluids, and related interdisciplinary topics · American Physical Society · 2002 10.1103/physreve.65.055102
  10. Irreversible performance of a quantum harmonic heat engine New Journal of Physics · IOP Publishing · 2006 10.1088/1367-2630/8/5/083
  11. Efficiency at Maximum Power of Low-Dissipation Carnot Engines Physical Review Letters · American Physical Society · 2010 10.1103/physrevlett.105.150603
  12. Heat production and energy balance in nanoscale engines driven by time-dependent fields Physical Review B · American Physical Society · 2007 10.1103/physrevb.75.245420
  13. The quantum open system as a model of the heat engine Journal of Physics A Mathematical and General · Institute of Physics · 1979 10.1088/0305-4470/12/5/007
  14. Performance of discrete heat engines and heat pumps in finite time Physical review. E, Statistical physics, plasmas, fluids, and related interdisciplinary topics · American Physical Society · 2000 10.1103/physreve.61.4774
  15. On the generators of quantum dynamical semigroups Communications in Mathematical Physics · Springer Science+Business Media · 1976 10.1007/bf01608499
  16. More bang for your buck: Super-adiabatic quantum engines Scientific Reports · Nature Portfolio · 2014 10.1038/srep06208
  17. Boosting work characteristics and overall heat-engine performance via shortcuts to adiabaticity: Quantum and classical systems Physical Review E · American Physical Society · 2013 10.1103/physreve.88.062122
  18. Performance analysis of a two-state quantum heat engine working with a single-mode radiation field in a cavity Physical Review E · American Physical Society · 2011 10.1103/physreve.84.041127
  19. Towards quantum thermodynamics in electronic circuits Nature Physics · Nature Portfolio · 2015 10.1038/nphys3169
  20. Completely positive dynamical semigroups of <i>N</i>-level systems Journal of Mathematical Physics · American Institute of Physics · 1976 10.1063/1.522979
  21. Thermal machines beyond the weak coupling regime New Journal of Physics · IOP Publishing · 2014 10.1088/1367-2630/16/12/125009
  22. Quantum simulations with trapped ions Nature Physics · Nature Portfolio · 2012 10.1038/nphys2252
  23. Heat engines in finite time governed by master equations American Journal of Physics · American Institute of Physics · 1996 10.1119/1.18197
  24. Transitionless quantum driving Journal of Physics A Mathematical and Theoretical · Institute of Physics · 2009 10.1088/1751-8113/42/36/365303
  25. Coherent Dynamics of Coupled Electron and Nuclear Spin Qubits in Diamond Science · American Association for the Advancement of Science · 2006 10.1126/science.1131871
  26. Theory of Coulomb-blockade oscillations in the conductance of a quantum dot Physical review. B, Condensed matter · American Physical Society · 1991 10.1103/physrevb.44.1646
  27. Opportunities for mesoscopics in thermometry and refrigeration: Physics and applications Reviews of Modern Physics · American Physical Society · 2006 10.1103/revmodphys.78.217
  28. Thermoelectric performance of a driven double quantum dot Physical Review B · American Physical Society · 2013 10.1103/physrevb.87.245423
  29. Nonequilibrium fluctuations in quantum heat engines: theory, example, and possible solid state experiments New Journal of Physics · IOP Publishing · 2015 10.1088/1367-2630/17/3/035012
  30. Quantum Optomechanical Heat Engine Physical Review Letters · American Physical Society · 2014 10.1103/physrevlett.112.150602
  31. Efficiency at maximum power: An analytically solvable model for stochastic heat engines EPL (Europhysics Letters) · Institute of Physics · 2007 10.1209/0295-5075/81/20003
  32. Strong coupling of a single photon to a superconducting qubit using circuit quantum electrodynamics Nature · Nature Portfolio · 2004 10.1038/nature02851
  33. Adiabatic Theorems for Generators of Contracting Evolutions Communications in Mathematical Physics · Springer Science+Business Media · 2012 10.1007/s00220-012-1504-1
  34. Thermoelectric efficiency at maximum power in a quantum dot EPL (Europhysics Letters) · Institute of Physics · 2009 10.1209/0295-5075/85/60010
  35. Quantum heat engine power can be increased by noise-induced coherence Proceedings of the National Academy of Sciences · National Academy of Sciences · 2011 10.1073/pnas.1110234108
  36. Efficiency of a Carnot engine at maximum power output American Journal of Physics · American Institute of Physics · 1975 10.1119/1.10023
  37. Theory of open quantum systems The Journal of Chemical Physics · American Institute of Physics · 2002 10.1063/1.1474579
  38. Coherent Manipulation of Coupled Electron Spins in Semiconductor Quantum Dots Science · American Association for the Advancement of Science · 2005 10.1126/science.1116955
  39. Thermodynamic Efficiency at Maximum Power Physical Review Letters · American Physical Society · 2005 10.1103/physrevlett.95.190602
  40. Single-Ion Heat Engine at Maximum Power Physical Review Letters · American Physical Society · 2012 10.1103/physrevlett.109.203006
  41. Quantum Thermodynamics: A Dynamical Viewpoint Entropy · Multidisciplinary Digital Publishing Institute · 2013 10.3390/e15062100
  42. Carnot Cycle at Finite Power: Attainability of Maximal Efficiency Physical Review Letters · American Physical Society · 2013 10.1103/physrevlett.111.050601
  43. Human-level control through deep reinforcement learning Nature · Nature Portfolio · 2015 10.1038/nature14236
  44. A single-atom heat engine Science · American Association for the Advancement of Science · 2016 10.1126/science.aad6320
  45. Simulating a quantum magnet with trapped ions Nature Physics · Nature Portfolio · 2008 10.1038/nphys1032
  46. Quantum supremacy of many-particle thermal machines New Journal of Physics · IOP Publishing · 2016 10.1088/1367-2630/18/7/075019
  47. Markovian quantum master equation beyond adiabatic regime Physical review. E · American Physical Society · 2017 10.1103/physreve.95.012136
  48. The power of a critical heat engine Nature Communications · Nature Portfolio · 2016 10.1038/ncomms11895
  49. ICT - Energy - Concepts Towards Zero - Power Information and Communication Technology InTech eBooks · InTech · 2014 10.5772/55410
  50. Otto refrigerator based on a superconducting qubit: Classical and quantum performance Physical review. B./Physical review. B · American Physical Society · 2016 10.1103/physrevb.94.184503
  51. Quantum thermodynamics with local control Physical review. E · American Physical Society · 2018 10.1103/physreve.97.022142
  52. Quantum Performance of Thermal Machines over Many Cycles Physical Review Letters · American Physical Society · 2017 10.1103/physrevlett.118.050601
  53. The Quantum Harmonic Otto Cycle Entropy · Multidisciplinary Digital Publishing Institute · 2017 10.3390/e19040136
  54. Universal Coherence-Induced Power Losses of Quantum Heat Engines in Linear Response Physical Review Letters · American Physical Society · 2017 10.1103/physrevlett.119.170602
  55. Slow Dynamics and Thermodynamics of Open Quantum Systems Physical Review Letters · American Physical Society · 2017 10.1103/physrevlett.119.050601
  56. Thermoelectric properties of an interacting quantum dot based heat engine Physical review. B./Physical review. B · American Physical Society · 2017 10.1103/physrevb.95.245432
  57. Single-Atom Heat Machines Enabled by Energy Quantization Physical Review Letters · American Physical Society · 2018 10.1103/physrevlett.120.170601
  58. Optimal thermodynamic control in open quantum systems Physical review. A/Physical review, A · American Physical Society · 2018 10.1103/physreva.98.012139
  59. A quantum-dot heat engine operating close to the thermodynamic efficiency limits Nature Nanotechnology · Nature Portfolio · 2018 10.1038/s41565-018-0200-5
  60. Mastering the game of Go without human knowledge Nature · Nature Portfolio · 2017 10.1038/nature24270
  61. Superadiabatic quantum friction suppression in finite-time thermodynamics Science Advances · American Association for the Advancement of Science · 2018 10.1126/sciadv.aar5909
  62. Experimental Demonstration of Quantum Effects in the Operation of Microscopic Heat Engines Physical Review Letters · American Physical Society · 2019 10.1103/physrevlett.122.110601
  63. Speeding up thermalisation via open quantum system variational optimisation The European Physical Journal Special Topics · Springer Science+Business Media · 2018 10.1140/epjst/e2018-00125-6
  64. Strong Coupling Corrections in Quantum Thermodynamics Physical Review Letters · American Physical Society · 2018 10.1103/physrevlett.120.120602
  65. Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1801.01290
  66. Experimental Characterization of a Spin Quantum Heat Engine Physical Review Letters · American Physical Society · 2019 10.1103/physrevlett.123.240601
  67. Tunable photonic heat transport in a quantum heat valve Nature Physics · Nature Portfolio · 2018 10.1038/s41567-018-0199-4
  68. Time-dependent Markovian quantum master equation Physical review. A/Physical review, A · American Physical Society · 2018 10.1103/physreva.98.052129
  69. Spin Heat Engine Coupled to a Harmonic-Oscillator Flywheel Physical Review Letters · American Physical Society · 2019 10.1103/physrevlett.123.080602
  70. Efficiency of Harmonic Quantum Otto Engines at Maximal Power Entropy · Multidisciplinary Digital Publishing Institute · 2018 10.3390/e20110875
  71. Direct Probe of the Seebeck Coefficient in a Kondo-Correlated Single-Quantum-Dot Transistor Nano Letters · American Chemical Society · 2018 10.1021/acs.nanolett.8b04398
  72. Spin quantum heat engines with shortcuts to adiabaticity Physical review. E · American Physical Society · 2019 10.1103/physreve.99.032108
  73. Single-atom energy-conversion device with a quantum load npj Quantum Information · Nature Portfolio · 2020 10.1038/s41534-020-0264-6
  74. Soft Actor-Critic Algorithms and Applications arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1812.05905
  75. Supremacy of incoherent sudden cycles Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.100.085405
  76. Learning to Walk Via Deep Reinforcement Learning 2019 10.15607/rss.2019.xv.011
  77. Quantum absorption refrigerator with trapped ions Nature Communications · Nature Portfolio · 2019 10.1038/s41467-018-08090-0
  78. Swift heat transfer by fast-forward driving in open quantum systems Physical review. A/Physical review, A · American Physical Society · 2019 10.1103/physreva.100.012126
  79. When does reinforcement learning stand out in quantum control? A comparative study on state preparation npj Quantum Information · Nature Portfolio · 2019 10.1038/s41534-019-0201-8
  80. Non-Markov enhancement of maximum power for quantum thermal machines Physical review. A/Physical review, A · American Physical Society · 2019 10.1103/physreva.99.052106
  81. Thermoelectric Conversion at 30 K in InAs/InP Nanowire Quantum Dots Nano Letters · American Chemical Society · 2019 10.1021/acs.nanolett.9b00276
  82. Two-stroke optimization scheme for mesoscopic refrigerators Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.99.224306
  83. Universal quantum control through deep reinforcement learning npj Quantum Information · Nature Portfolio · 2019 10.1038/s41534-019-0141-3
  84. Speeding up a quantum refrigerator via counterdiabatic driving Physical review. B./Physical review. B · American Physical Society · 2019 10.1103/physrevb.100.035407
  85. Deep reinforcement learning for quantum gate control EPL (Europhysics Letters) · Institute of Physics · 2019 10.1209/0295-5075/126/60002
  86. Quantum signatures in the quantum Carnot cycle New Journal of Physics · IOP Publishing · 2020 10.1088/1367-2630/ab6876
  87. Optimal Cycles for Low-Dissipation Heat Engines Physical Review Letters · American Physical Society · 2020 10.1103/physrevlett.124.110606
  88. Global optimization of quantum dynamics with AlphaZero deep exploration npj Quantum Information · Nature Portfolio · 2020 10.1038/s41534-019-0241-0
  89. Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor International Conference on Machine Learning · 2018
  90. Boosting the performance of quantum Otto heat engines Physical review. E · American Physical Society · 2019 10.1103/physreve.100.032144
  91. Maximum power and corresponding efficiency for two-level heat engines and refrigerators: optimality of fast cycles New Journal of Physics · IOP Publishing · 2019 10.1088/1367-2630/ab4dca
  92. Soft Actor-Critic for Discrete Action Settings arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1910.07207
  93. Grandmaster level in StarCraft II using multi-agent reinforcement learning Nature · Nature Portfolio · 2019 10.1038/s41586-019-1724-z
  94. Discrete and Continuous Action Representation for Practical RL in Video Games arXiv (Cornell University) · Cornell University · 2019 10.48550/arxiv.1912.11077
  95. Geometric properties of adiabatic quantum thermal machines Physical review. B./Physical review. B · American Physical Society · 2020 10.1103/physrevb.102.155407
  96. Heat rectification via a superconducting artificial atom Communications Physics · Nature Portfolio · 2020 10.1038/s42005-020-0307-5
  97. Electric field control of radiative heat transfer in a superconducting circuit Nature Communications · Nature Portfolio · 2020 10.1038/s41467-020-18163-8
  98. Reinforcement Learning Approach to Nonequilibrium Quantum Thermodynamics Physical Review Letters · American Physical Society · 2021 10.1103/physrevlett.126.020601
  99. A reinforcement learning approach for quantum state engineering Quantum Machine Intelligence · Springer Science+Business Media · 2020 10.1007/s42484-020-00016-8
  100. Quantum thermodynamics Contemporary Physics · Taylor & Francis · 2016 10.1080/00107514.2016.1201896
  101. Quantifying Coherence Physical Review Letters · American Physical Society · 2014 10.1103/physrevlett.113.140401
  102. Stroboscopic two-stroke quantum heat engines Physical review. A/Physical review, A · American Physical Society · 2020 10.1103/physreva.102.042217
  103. Geometric Optimisation of Quantum Thermodynamic Processes Entropy · Multidisciplinary Digital Publishing Institute · 2020 10.3390/e22101076
  104. Maximum-power heat engines and refrigerators in the fast-driving regime Physical review. A/Physical review, A · American Physical Society · 2021 10.1103/physreva.104.032226
  105. Superadiabatic quantum friction suppression in finite-time thermodynamics Science Advances · American Association for the Advancement of Science · 2018 10.1126/sciadv.aar5909
  106. Adiabatic Theorems for Generators of Contracting Evolutions Communications in Mathematical Physics · Springer Science+Business Media · 2012 10.1007/s00220-012-1504-1
  107. (제목 없음) Anet (University of Antwerp) · University of Antwerp
  108. Quantum supremacy of many-particle thermal machines New Journal of Physics · IOP Publishing · 2016 10.1088/1367-2630/18/7/075019
  109. Equivalence of Quantum Heat Machines, and Quantum-Thermodynamic Signatures Physical Review X · American Physical Society · 2015 10.1103/physrevx.5.031044
  110. Nonequilibrium fluctuations in quantum heat engines: theory, example, and possible solid state experiments New Journal of Physics · IOP Publishing · 2015 10.1088/1367-2630/17/3/035012
  111. When does reinforcement learning stand out in quantum control? A comparative study on state preparation npj Quantum Information · Nature Portfolio · 2019 10.1038/s41534-019-0201-8
  112. Irreversible performance of a quantum harmonic heat engine New Journal of Physics · IOP Publishing · 2006 10.1088/1367-2630/8/5/083
  113. Thermodynamics in the Quantum Regime Fundamental theories of physics · Springer International Publishing · 2018 10.1007/978-3-319-99046-0
  114. Machine classification for probe-based quantum thermometry Physical review. A/Physical review, A · American Physical Society · 2022 10.1103/physreva.105.022413
  115. Quantum Transport Cambridge University Press eBooks · Cambridge University Press · 2009 10.1017/cbo9780511626906
  116. Deleted Work 1955