<<

Digital quantum simulation of open quantum systems using quantum imaginary time evolution

Hirsh Kamakari,1 Shi-Ning Sun,1 Mario Motta,2 and Austin J. Minnich1, ∗

1Division of Engineering and Applied Science, California Institute of Technology, Pasadena, CA 91125, USA 2IBM Quantum, IBM Research Almaden, San Jose, CA 95120, USA (Dated: June 4, 2021) Abstract Quantum simulation on emerging quantum hardware is a topic of intense interest. While many studies focus on computing properties or simulating unitary dynamics of closed sys- tems, open quantum systems are an interesting target of study owing to their ubiquity and rich physical behavior. However, their non-unitary dynamics are also not natural to simulate on digital quantum devices. Here, we report algorithms for the digital quantum simulation of the dynam- ics of open quantum systems governed by a Lindblad equation using adaptations of the quantum imaginary time evolution (QITE) algorithm. We demonstrate the algorithms on IBM Quantum’s hardware with simulations of the spontaneous emission of a two level system and the dissipative transverse field Ising model. Our work advances efforts to simulate the dynamics of open quantum systems on near-term quantum hardware. arXiv:2104.07823v2 [quant-ph] 3 Jun 2021

[email protected]

1 I. INTRODUCTION

The development of quantum algorithms to simulate the dynamics of quantum many- body systems is now a topic of interest owing to advances in quantum hardware [1–3]. While the real-time evolution of closed quantum systems on digital quantum computers has been extensively studied in the context of spin models [4–10], fermionic systems [11, 12], electron- phonon interactions [13], and quantum field theories [14–16], fewer studies have considered the time evolution of open quantum systems, which exhibit rich dynamical behavior due to coupling of the system to its environment [17, 18]. However, this coupling leads to non- unitary evolution which is not naturally simulable on quantum hardware. Early approaches to overcome this challenge included use of the quantum simulators’ in- trinsic decoherence [19] and direct simulation of the environment [20–22]. Theoretical works examined the resources required for efficient quantum simulation of Markovian dynamics [23–25], concluding that arbitrary quantum channels can be efficiently simulated by com- bining elementary quantum channels. Recently, several algorithms have been proposed for the digital quantum simulation of open quantum systems on the basis of the Kraus decom- position of quantum channels [26–31] as well as variational descriptions of general processes to simulate the stochastic Schr¨odingerequation [1,8] and the Lindblad equation [32]. Simulation via Kraus decomposition is convenient when the Kraus operators correspond- ing to the time evolution of the system are known, such as modelling decoherence with amplitude damping or depolarizing channels. However, determining the Kraus operators of a general system requires either computing the full unitary evolution of both the system and environment or casting a into an operator sum representation for the density operator. The latter procedure can be approximated analogously to Trotterization [29, 31] but requires either conditional reset of ancillae qubits or a qubit overhead which scales linearly with the number of time steps in the simulation. Exactly determining the Kraus operators from the Lindblad equation is a classically hard task which is equivalent to solving the master equation [33] and so can only be applied to small systems. Variational approaches [1,8, 34] offer an attractive alternative for simulating open system dynamics, but as in the case of closed systems require an ansatz and a potentially high dimensional classical optimization. The common feature of the above algorithms is that they reformulate non-unitary open

2 system dynamics into unitary dynamics which can be simulated on a quantum computer. A similar approach is used in variational approaches to imaginary time evolution [35] and the quantum imaginary time evolution (QITE) algorithm, which has recently been introduced as a way to prepare ground states and compute thermal averages on near-term devices [36]. QITE has since been used to compute finite-temperature correlation functions of many-body systems [37], scattering in the Ising model [38], and binding energies in quantum chemistry [39, 40] and nuclear [40]. It is therefore natural to consider how QITE might be adapted for open quantum system evolution. Here, we report quantum algorithms to simulate open quantum dynamics using adap- tations of the QITE algorithm and demonstrate them on IBM Quantum hardware. The first algorithm casts the Lindblad equation for the density operator into a Schr¨odinger-type equation with a non-Hermitian Hamiltonian. Time evolution is then achieved by simulating the unitary evolution via Trotterization, corresponding to the Hermitian component of the Hamiltonian and using QITE to simulate the anti-Hermitian component of the Hamiltonian. The second algorithm expresses the density operator in terms of an ansatz which is preserved during both real and imaginary time evolution. We demonstrate these algorithms on IBM Quantum hardware for two cases: the spontaneous emission of a two level system (TLS) in a heat bath at zero temperature, and the dissipative transverse field Ising model (TFIM) on two sites. We observe good agreement between the exact and hardware results, showing that the dynamics of open quantum systems are accessible on near-term quantum hardware.

II. THEORY

The dynamics of a Markovian open quantum system can be described by the Lindblad equation

  dρ X † 1 † = i[H, ρ] + LkρL L Lk, ρ (1) dt − k − 2{ k } k where ρ is the density operator of the system, H is the system’s Hamiltonian, and Lk are operators describing the coupling to the environment. The master equation in Lindblad form is often derived assuming weak coupling between system and environment and absence of memory effects (Born-Markov approximation) [18, 41]. We present two algorithms to simulate the master equation in Lindblad form on a digital

3 a) b) Repeat n times Repeat n times ⇢ e iH1⌧ e H2⌧ | i iH1>⌧ Lk>Lk/2 | i e e L L ⌧ e k⌦ k iH1⌧ L† L /2 e k k | i e Repeat for all k.

FIG. 1: Circuit diagrams for Trotterized time evolution of the density operator with n Trotter steps. a) Time evolution for the vectorized density operator ρ (Algorithm I). | i e−iH1τ is a unitary operator and can be directly implemented on the quantum simulator. The non-unitary term e−H2τ is implemented via QITE. b) Time evolution for the purification-based algorithm (Algorithm II). The inner box needs to be applied for every

Lindblad operator Lk at each time step. Although the time evolution operators act on the doubled system, ψ ψ , the algorithm requires only the system register to be | i ⊗ | i represented on the device. Here / denotes a bundle of qubits. quantum computer. The first quantum algorithm, based on a vectorization of the density operator, is described in Sec.IIA; the second algorithm, which combines a QITE adaptation with an ansatz for the time-dependent density operator, is presented in Sec.IIB.

A. Algorithm I

The Lindblad equation can be rewritten as a Schr¨odinger-type equation with a non- Hermitian Hamiltonian by transforming the n n density operator ρ into an n2 component × vector ρ by column stacking the density operator [42]. The resulting transformation of the | i Lindblad equation is

" # d ρ > X 1 † 1 > | i = iI H + iH I + (Lk Lk I (LkLk) (Lk Lk) I) ρ (2) dt − ⊗ ⊗ ⊗ − 2 ⊗ − 2 ⊗ | i k where the bar indicates entrywise complex conjugation and ρ = ρ(t) is the vectorized | i | i density operator [42]. Separating Eq.2 into Hermitian and anti-Hermitian parts, the time evolution of the initial state can be written as:

4 n 2  ρ(t) = exp ( i(H1 iH2)t) ρ(0) = [exp ( iH1τ) exp ( H2τ)] ρ(0) + τ n . (3) | i − − | i − − | i O where in the last equality we have Trotterized to first order with time step τ = t/n, and H1 and iH2 are the Hermitian and anit-Hermitian components of the vectorized Hamiltonian, respectively. The first term exp ( iH1τ) is unitary and can implemented on a quantum − simulator via Trotterization and standard quantum simulation techniques [2, 43, 44]. The term exp ( H2τ) is non-unitary and so cannot be directly applied to the quantum register. − Instead, we implement it on a digital quantum simulator via analogy to quantum algorithms for imaginary time evolution [35, 36]. Imaginary time evolution of the Schr¨odinger equation with Hamiltonian H is carried out formally by substituting β = it into the real time propagator e−itH . This technique is typi- −βH cally used to find ground states ψ = limβ→∞ φ(β) / φ(β) , where φ(β) = e φ(0) | i | i ||| i|| | i | i and φ(0) has non-zero overlap with a ground state. If we interpret H2 as the Hamiltonian | i of a system in the extended Hilbert space, exp ( H2τ) is an imaginary time evolution op- − erator generated by H2 and can be implemented by QITE [36]. The full time evolution is then applied as sequence of real and imaginary time evolutions, as shown in Fig. 1a. Once the desired time is reached, measurements of an observable O are obtained by eval- uating the expectation value O(t) = Tr (Oρ(t)) as O† ρ , where O is the vector obtained h i h | i | i from column stacking the matrix representation of O. evolution preserves Tr (ρ) whereas the algorithm preserves Tr (ρ2) = ρ ρ , so the final physical observables are thus h | i given by O 0 = O /Tr (ρ). Therefore, obtaining measurements of observables on the state h i h i requires evaluating both O and Tr (ρ) at each time step. h i Both quantities can be obtained using a Hadamard test circuit [45]. In particular, Tr (ρ) can be evaluated up to a prefactor of 2−n/2P −1/2 as 0 V †U 0 , where U is the circuit that h | | i prepares ρ , V prepares the generalized Bell state β = 2−n/2 P x x , x are the | i | i x | i ⊗ | i | i computational basis states on n qubits, and P is the purity of the initial state. Preparing the 2n qubit Bell state requires n Hadamard and n CNOT gates. Assuming ρ = U 0 | i | i for a unitary U with gate decomposition requiring u1 and u2 single-qubit and CNOT gates, respectively, the measurement of Tr (ρ) requires a circuit with (n + u1) single-qubit gates, O (n + u1) CNOT gates, and (n + u2) CCNOT gates. O O Measurement of k local observables can be carried out similarly. We assume here without − 5 loss of generality that the k local observable O has support on the first k qubits. The − −1/2 P vectorized state can then be written as ρ = P ρx x y y x1x2y1y2 where | i x1,x2,y1,y2 1 2 1 2 | i x1, y1 and x2, y2 are length k and (n k) bit strings, respectively, and P is the purity of the − initial state. Defining the state

† X Ox1y1 O = p x1zy1z , (4) | i 2n−kTr (O†O)| i x1y1z the expectation value of O can be evaluated (up to a prefactor) as

† X Ox1y1 ρx1zy1z Tr (Oρ) O ρ = = p . (5) h | i √2n−k √P 2n−kTr (O†O) P x1y1z The state O† can be prepared as | i " # 1 X UO† Vn−k 0k, 0n−k, 0k, 0n−k = UO† 0k, z, 0k, z (6) √ n−k | i 2 z | i where Vn−k prepares the n k generalized Bell state and U † prepares the 2k qubit state − O

† X Ox1y1 O = p x1y1 . (7) | i Tr (O†O)| i x1y1 We then measure the un-normalized expectation value of O using the Hadamard test. Since the purity is conserved by the algorithm, all observables can be renormalized after the measurement. Assuming a decomposition of U into u1 and u2 single-qubit and CNOT gates, respectively, and V into v1 and v2 single-qubit and CNOT gates, the total overhead for measurement of observables (including the trace evaluation) is (n + u1 + v1) single-qubit O gates, (n + u1 + v1) CNOT gates, and (n + u2 + v2) CCNOT gates. O O

B. Algorithm II

For many physical systems, Algorithm I allows for efficient simulation of the full den- sity operator; however, it requires a doubling of the number of qubits and an overhead of an ancilla and controlled operations for evaluating observables. In particular, the circuit required for measurements is too deep for near-term hardware. We therefore introduce a second algorithm based on the variational ansatz used to obtain the non-equilibrium steady

6 states of Markovian systems [34, 46] that overcomes these limitations. The isomorphism maps a density operator as

X † X ρ = pxU x x U ρ = pxU x U x . (8) | ih | → | i | i ⊗ | i x∈I x∈I

where the x ’s label the n-qubit computational basis states and I is a subset of all 2n possible | i bit-strings. In the rest of the paper the index set I is implied. We note that although we are using an ansatz for this algorithm, any density operator can be represented in this form provided the index set I is large enough. The Lindblad master equation is mapped identically to the vectorization mapping, re- sulting in Eq. (2). The propagator is again Trotterized and each term can be applied term by term. The unitary part of the propagator preserves the ansatz, as

>   X X iH> −iH exp iI H + iH I τ pxU x U x = pxe U x e U x (9) − ⊗ ⊗ x | i ⊗ | i x | i ⊗ | i

> and e−iH = eiH for Hermitian H. The remaining terms in the Trotterized propagator are of > † the form exp ( L Lkτ/2) exp ( L Lkτ/2) and exp (Lk Lkτ). The first term preserves − k ⊗ − k ⊗ the ansatz but is non-unitary, while the second term does not preserve the ansatz and is non-unitary. Considering the first of non-unitary terms, as in the original QITE algorithm we seek a set of numbers qx and a Hermitian operator A such that

X X 2 Vk pxU x U x = (px + qx) exp (iA)U x exp ( iA)U x + τ , (10) x | i ⊗ | i x | i ⊗ − | i O

> † where Vk = exp ( τL Lk/2) exp ( τL Lk/2). As shown in AppendixA, we find that − k ⊗ − k

 † >  qx = τpxRe x U L LkU x . (11) − h | k | i

P Decomposing A into a weighted sum of Pauli strings, A = j ajσj, we find that the

coefficients aj satisfy the linear system Sa = b, with

7 X 2  †  X  † †  Sij = pxRe x U (σiσj + σjσi)U x 2 pxpyRe x U σiU y x U σjU y , (12) x h | | i − xy h | | ih | | i ! X 2  † >  X  † † >  bi = τ pxIm x U σiLk LkU x + pxpyIm x U σiU y y U Lk LkU x . − x h | | i xy h | | ih | | i (13) qx, S, and b for the second non-unitary term, exp (Lk Lkτ), take a similar form. The ⊗ P derivation for both terms is given in AppendixA. We note that the total probability x px = P 1 is conserved by the algorithm since x qx = 0 at each time step as shown in Eq. (A19). P † With this ansatz, observables are computed as O = px x U OU x , requiring the h i x h | | i propagation of each x in parallel while storing the px’s. The final observable is computed | i as a classical average over all the propagated states and px. It is important to note that although the ansatz lies in a dilated Hilbert space, all measurements take place on the original system and no entangling operations between the system and ancilla are needed, and so no ancillae qubits are needed. In particular, for each time step measurements on the original Hilbert space are used to determine the Hermitian matrix A. Expectation values of observables on this state are computed using the standard methods [1,2]. The benefits of Algorithm II are that it requires no ancilla qubits, and no Hadamard test is required for measurements of observables. These characteristics, trading quantum for classical resources and simulating large quantum circuits using smaller quantum computers are important for near-term hardware [47–51]. Its main drawback is in the number of measurements required to evolve the system. Specifically, it requires measurement of the † matrix elements x U σiU y for all Pauli strings σi supported on a domain D (measured h | | i in qubits) and all bit strings in x, y I for some subset I of the 2n n-bit strings. This ∈ necessitates running L4D I 2 circuits per time step, where L is the number of Lindblad O | | operators on the domain and I is the number of bit-strings we include in our computation. | | We require that the number of bit strings to include in I scales polynomially or slower with system size in order for the algorithm to be efficient. In practice, this requirement is plausible to satisfy because the domain size D can generally be taken to be smaller for dissipative systems compared to the same system with no dissipation, as dissipation generally reduces a system’s correlation length [52]. Similarly to the original QITE algorithm, we can choose the operator A to act on a restricted domain of the system determined by the correlation

8 TABLE I: Asymptotic number of circuits required per time step per Lindblad operator for both algorithms for an open system on n sites. Here, D is the domain size, and I is is a subset of all n-bit strings for which we measure the corresponding matrix elements.

Algorithm # of qubits Circuits per Lindblad operator

I 2n + 1 (n/D)4D II n (n/D)4D I 2 | |

length. If A acts in some qubit domain D, we need to store the px’s corresponding to the 2D bit strings on this domain. Provided that D scales as (1) with the system size, there O is no exponential classical overhead for Algorithm II. TableI summarizes the asymptotic scaling of the number of circuits required per time step of both algorithms for open quantum system dynamical simulation on n sites.

III. RESULTS

We demonstrate both algorithms on IBM Quantum hardware for two cases: the spon- taneous emission of a two level system (TLS) in a heat bath at zero temperature, and the dissipative transverse field Ising model (TFIM) on two sites. The TLS (n = 1 from Table I) requires three and one physical qubits to simulate with Algorithm I and II, respectively. The TFIM (n = 2 from TableI) requires five and two physical qubits. Considering Algorithm I, neither the TLS nor the two-site dissipative TFIM on 5 qubits have constant depth circuit decompositions; Trotterizing both the real and imaginary time propagators results in a circuit with depth linear in the number of time steps. The resulting circuits are too deep for near-term devices. To overcome this limitation, we recompile the circuits as in Ref. [37]. In all simulations, we correct for readout error using the built-in noise models in Qiskit [53–56]. All measurements reported represent the average of 8192 shots and were repeated three times. When constructing the QITE matrix for Algorithm I, regularizers 1 10−6 and 0.01, for the TLS and TFIM, respectively, were added to the × diagonal terms to increase the condition number of the matrix S. No regularizers were used for Algorithm II. We first present results for the TLS model with the Hamiltonian

9 1.0 (a) (b) exact 1.00 Algorithm I 0.8 Algorithm II 0.75 Re[ρ01], exact

Re[ρ01], Algorithm I 0.6 0.50 Re[ρ01], Algorithm II Tr(ρ2), exact Tr(ρ2), Algorithm I 0.25 Tr(ρ2), Algorithm II 0.4 0.00 Purity,

Excited state0 population .2 0.25 − 0.0 0.50 0 1 2 3 4 5 − 0 1 2 3 4 5 γt γt

FIG. 2: (a) Population of the excited state from numerical simulations obtained in QuTiP [57, 58] (black line), hardware using Algorithm I on ibmq mumbai [59] (blue crosses) and Algorithm II (green circles) on ibmq casablanca [59]. The deviation between the theoretical and experimental curves is largely due to Trotter error. The system approaches 2 a non-equilibrium steady state for γt & 5. (b) Purity, Tr (ρ ), (grey line) and off diagonal term, Re [ρ10], (black line) corresponding to non-diagonal observables obtained in in

QuTiP [57, 58]. Hardware results are shown for Algorithm I (purity, red crosses; Re [ρ10], blue crosses) and for Algorithm II (purity, orange circles; Re [ρ10], green circles). Hardware results for the observable Im [ρ10] agree with the exact solution similarly to Re [ρ10] but are omitted for clarity. For all hardware results for Algorithm I, the error bars are the standard deviation from three runs. The error bars for Alorithm II are smaller than the symbol size.

δ Ω H = σz σx (14) −2 − 2 and the Lindblad operator √γσ−, where σ− is the lowering operator of the system, δ the detuning, Ω the Rabi frequency, and γ the spontaneous emission rate. We consider here the overdamped case where γ is on the order of the other energies in in the system. It was found via numerical simulations that to accurately capture the dynamics only the Pauli strings in the set σx σz, σy σx, σy σz, σz σx needed to be included in the QITE unitary. { ⊗ ⊗ ⊗ ⊗ } We set δ = Ω = γ = 1, and the initial state was chosen to be the excited state. In Fig. 2a,

10 we show the populations of the ground and excited states, with the experimental data aver- aged from three runs on IBM’s ibmq mumbai [59] for Algorithm I and ibmq casablanca [59] for Algorithm II . We see good agreement in all observables, with the deviation between the theoretical and experimental curves largely due to Trotter error as confirmed by numerical simulations and noisy hardware emulations. We observe an initial exponential decay in the population of the excited state due to spontaneous emission into the bath followed by an approach to the non-equilibrium steady steady state (NESS) for γt 1. Damped Rabi  oscillations are visible between these two regimes. The populations in the NESS can be interpreted as a balance between the spontaneous emission due to coupling to the bath and

the absorption and stimulated emission due to the Hamiltonian driving term σx [60]. In the NESS, the combined spontaneous and stimulated emission rates are equal to the absorption rate. In the absence of driving by an external electric field (Ω = 0) the Hamiltonian is di-

agonal in the computational basis, resulting in the off diagonal matrix elements ρ01 = ρ10 approaching zero as the system thermalizes. We see in Fig. 2b that these matrix elements remain non-zero as the NESS is approached, showing that quantum coherence is main- tained even in the presence of damping. Also shown in Fig. 2b is the purity Tr (ρ2), which does not correspond to a time-independent Hermitian observable on the system but can nonetheless be obtained from the density operator representation on the hardware. Time evolution preserves the inner product Tr (ρ2) = ρ ρ on the quantum simulator, but the h | i physical quantity, the normalized purity, Tr (ρ2) /Tr (ρ), is not conserved. Since a with Tr (ρ2) < 1 cannot be represented as a pure state ψ ψ without a Hilbert space | ih | dilation, Fig. 2b highlights the need to represent the full density operator. We next present experimental and numerical results on the 2-site TFIM. The TFIM has the Hamiltonian

X X H = J σ(k)σ(k+1) h σ(k) (15) − z z − x k k

(k) and Lindblad operators √γσ− , with nearest neighbor coupling J, transverse magnetic field h, and decay rate γ. For this model, the number of required Pauli strings could not be reduced by symmetry in Algorithm I. To reduce circuit depth, 16 Pauli strings were randomly selected out of the 256 possible Pauli strings on 4 qubits to implement the QITE unitary.

11 1.0 exact hardware (Algorithm I) 0.5 hardware (Algorithm II)

0.0

0.5 − Average magnetization (a.u.) 1.0 − 0 1 2 3 4 5 γt

−1 P FIG. 3: Average magnetization N Zi for the dissipative transverse field Ising model ih i on 2 sites (5 physical qubits for Algorithm I, 2 physical qubits for Algorithm II) using IBM Quantum’s ibmq guadalupe [59] for Algorithm I (blue symbols) , and ibmq casablanca [59] for Algorithm II (green symbols). Numerical solutions obtained in QuTiP are shown with black lines. The error bars for both algorithms are the standard deviation from 3 hardware runs. Both algorithms capture the open system dynamics for all simulated times. The deviation between the hardware results and the exact result is due to Trotter error, which was confirmed via emulations with smaller Trotter steps.

We chose 16 Pauli strings as a balance between too few Pauli strings, which results in a poor approximation to normalized imaginary time evolution, and too many Pauli strings, which results in a large computational overhead and an ill-conditioned QITE matrix.

Figure3 shows the average magnetization of the dissipative TFIM with the initial state given by both spins in the spin up state and J = h = 1 and γ = 0.1. Oscillations in magnetization are evident due to the relatively large transverse field. We observe qualitative agreement between the theoretical and experimental curves from Algorithm I with a Trotter step γt/n 0.5. Experimental results for Algorithm II are also in good agreement with ∼ the exact curve for all times, showing that the ansatz is able to accurately capture the non-unitary quantum channel induced by the Lindblad operators.

12 We now discuss the relative computational cost required by each algorithm for the TFIM simulations. Algorithm I is able to accurately describe the dissipative dynamics when using only 16 out of the total of 256 Pauli strings. Measuring an observable Tr (Oρ) = O† ρ h | i and Tr (ρ) in Algorithm I requires measuring state overlaps, which can be done using the Hadamard test. This requires an overhead of CNOT and CCNOT gates which scales linearly in the number of time steps and qubits, assuming a fixed allowable error rate due to Trot- terization and decomposition of unitaries into gates. Algorithm II requires measuring the matrix elements of all two-qubit Pauli strings at each time step, requiring 836 circuits per time step, versus only measuring expectation values of 16 operators in the case of Algorithm I, which requires 16 circuits. These measurements are only needed on a domain of fixed size. For larger dissipation rates γ J, h, separate numerical simulations show that the de- ∼ viation between the experimental and theoretical curves are larger when simulated with Algorithm I than Algorithm II. This discrepancy could be due to not including all Pauli strings in the QITE matrix, which results in worse approximations for the non-unitary evo- lution. Increasing the number of Pauli strings, reducing the number of strings via symmetry, or determining a better set of criteria for selecting the strings may allow the simulable dis- sipation rates to be increased. Further investigation is required to determine the optimal approach. Algorithm II is therefore advantageous for systems with higher dissipation rates and limited number of hardware qubits, as it trades physical qubits and multi-qubit con- trolled operations for more measurement circuits.

IV. SUMMARY

We have introduced digital quantum algorithms for the time evolution of open quantum systems described by a Lindblad equation based on quantum imaginary time evolution. Algorithm I uses QITE to implement the non-unitary evolution introduced when the density operator is vectorized, whereas Algorithm II uses an adaptation of QITE to maintain a purification-based ansatz throughout the computation. Calculations for the spontaneous emission of a two level system and the dissipative transverse field Ising model, respectively, were carried out on IBM Quantum’s quantum processors. Good agreement with the exact result was observed in all cases. These algorithms decrease the quantum resources required to simulate open quantum systems governed by Lindblad master equations on near-term

13 quantum hardware.

ACKNOWLEDGMENTS

H. K., S. N. S. and A. J. M. were supported by NSF under Award No. 1839204.

14 [1] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin, S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan, L. Cincio, and P. J. Coles, Variational quantum algorithms (2020), arXiv:2012.09265 [quant-ph]. [2] I. M. Georgescu, S. Ashhab, and F. Nori, Quantum simulation, Rev. Mod. Phys 86, 153 (2014). [3] K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, S. Alperin-Lea, A. Anand, M. Degroote, H. Heimonen, J. S. Kottmann, T. Menke, et al., Noisy intermediate-scale quantum (nisq) algorithms, arXiv preprint arXiv:2101.08448 (2021). [4] B. Fauseweh and J.-X. Zhu, Digital quantum simulation of non-equilibrium quantum many- body systems, arXiv:2009.07375 (2020). [5] A. Smith, M. Kim, F. Pollmann, and J. Knolle, Simulating quantum many-body dynamics on a current digital quantum computer, npj Quantum Inf 5, 1 (2019). [6] A. Chiesa, F. Tacchino, M. Grossi, P. Santini, I. Tavernelli, D. Gerace, and S. Carretta, Quantum hardware simulating four-dimensional inelastic neutron scattering, Nat. Phys 15, 455 (2019). [7] H. Lamm and S. Lawrence, Simulation of nonequilibrium dynamics on a quantum computer, Phys. Rev. Lett 121, 170501 (2018). [8] S. Endo, J. Sun, Y. Li, S. C. Benjamin, and X. Yuan, Variational quantum simulation of general processes, Phys. Rev. Lett 125, 010501 (2020). [9] C. Cirstoiu, Z. Holmes, J. Iosue, L. Cincio, P. J. Coles, and A. Sornborger, Variational fast forwarding for quantum simulation beyond the coherence time, npj 6, 1 (2020). [10] J. Gibbs, K. Gili, Z. Holmes, B. Commeau, A. Arrasmith, L. Cincio, P. J. Coles, and A. Sornborger, Long-time simulations with high fidelity on quantum hardware, arXiv preprint arXiv:2102.04313 (2021). [11] R. Barends, L. Lamata, J. Kelly, L. Garc´ıa-Alvarez,´ A. Fowler, A. Megrant, E. Jeffrey, T. White, D. Sank, J. Mutus, et al., Digital quantum simulation of fermionic models with a superconducting circuit, Nat. Commun 6, 1 (2015).

15 [12] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, A. Bengtsson, S. Boixo, M. Broughton, B. B. Buckley, et al., Observation of separated dynamics of charge and spin in the fermi-hubbard model, arXiv:2010.07965 (2020). [13] A. Macridin, P. Spentzouris, J. Amundson, and R. Harnik, Digital quantum computation of fermion-boson interacting systems, Phys. Rev. A 98, 042312 (2018). [14] S. P. Jordan, K. S. Lee, and J. Preskill, Quantum algorithms for quantum field theories, Science 336, 1130 (2012). [15] D. E. Kharzeev and Y. Kikuchi, Real-time chiral dynamics from a digital quantum simulation, Phys. Rev. Research 2, 023342 (2020). [16] M. Kreshchuk, W. M. Kirby, G. Goldstein, H. Beauchemin, and P. J. Love, Quantum simula- tion of quantum field theory in the light-front formulation, arXiv:2002.04016 (2020). [17] D. A. Lidar, Lecture notes on the theory of open quantum systems, arXiv:1902.00967 (2019). [18] H.-P. Breuer and F. Petruccione, The theory of open quantum systems (Oxford University Press, 2002). [19] C. H. Tseng, S. Somaroo, Y. Sharf, E. Knill, R. Laflamme, T. F. Havel, and D. G. Cory, Quantum simulation with natural decoherence, Phys. Rev. A 62, 032309 (2000). [20] H. Wang, S. Ashhab, and F. Nori, Quantum algorithm for simulating the dynamics of an open quantum system, Phys. Rev. A 83, 062317 (2011). [21] H.-Y. Su and Y. Li, Quantum algorithm for the simulation of open-system dynamics and thermalization, Phys. Rev. A 101, 012328 (2020). [22] M. Cattaneo, G. De Chiara, S. Maniscalco, R. Zambrini, and G. L. Giorgi, Collision models can efficiently simulate any multipartite markovian quantum dynamics, Phys. Rev. Lett 126, 130403 (2021). [23] D. Bacon, A. M. Childs, I. L. Chuang, J. Kempe, D. W. Leung, and X. Zhou, Universal simulation of markovian quantum dynamics, Phys. Rev. A 64, 062302 (2001). [24] R. Sweke, I. Sinayskiy, D. Bernard, and F. Petruccione, Universal simulation of markovian open quantum systems, Phys. Rev. A 91, 062308 (2015). [25] M. Kliesch, T. Barthel, C. Gogolin, M. Kastoryano, and J. Eisert, Dissipative quantum church- turing theorem, Phys. Rev. Lett 107, 5 (2011). [26] S.-J. Wei, D. Ruan, and G.-L. Long, Duality quantum algorithm efficiently simulates open quantum systems, Sci. Rep 6, 30727 (2016).

16 [27] Z. Hu, R. Xia, and S. Kais, A quantum algorithm for evolving open quantum dynamics on quantum computing devices, Sci. Rep 10, 3301 (2020). [28] J. Hubisz, B. Sambasivam, and J. Unmuth-Yockey, Quantum algorithms for open lattice field theory, arXiv:2012.05257 (2020). [29] Z. Hu, K. Head-Marsden, D. A. Mazziotti, P. Narang, and S. Kais, A general quantum al- gorithm for open quantum dynamics demonstrated with the fenna-matthews-olson complex, arXiv preprint arXiv:2101.05287 (2021). [30] K. Head-Marsden, S. Krastanov, D. A. Mazziotti, and P. Narang, Capturing non-markovian dynamics on near-term quantum computers, Phys. Rev. Research 3, 013182 (2021). [31] L. Del Re, B. Rost, A. F. Kemper, and J. K. Freericks, Driven-dissipative on a lattice: Simulating a fermionic reservoir on a quantum computer, Phys. Rev. B 102, 125112 (2020). [32] T. Haug and K. Bharti, Generalized quantum assisted simulator, arXiv preprint arXiv:2011.14737 (2020). [33] E. Andersson, J. D. Cresser, and M. J. W. Hall, Finding the kraus decomposition from a master equation and vice versa, J. Mod. Opt 54, 1695–1716 (2007). [34] N. Yoshioka, Y. O. Nakagawa, K. Mitarai, and K. Fujii, Variational quantum algorithm for nonequilibrium steady states, Phys. Rev. Research 2, 043289 (2020). [35] S. McArdle, T. Jones, S. Endo, Y. Li, S. C. Benjamin, and X. Yuan, Variational ansatz-based quantum simulation of imaginary time evolution, npj Quantum Inf 5, 75 (2019). [36] M. Motta, C. Sun, A. T. K. Tan, M. J. O’Rourke, E. Ye, A. J. Minnich, F. G. S. L. Brand˜ao, and G. K.-L. Chan, Determining eigenstates and thermal states on a quantum computer using quantum imaginary time evolution, Nat. Phys 16, 205–210 (2020). [37] S.-N. Sun, M. Motta, R. N. Tazhigulov, A. T. Tan, G. K.-L. Chan, and A. J. Minnich, Quantum computation of finite-temperature static and dynamical properties of spin systems using quantum imaginary time evolution, PRX Quantum 2, 010317 (2021). [38] K. Yeter Aydeniz, G. Siopsis, and R. C. Pooser, Scattering in the ising model with the quantum lanczos algorithm, New J. Phys 23, 043033 (2021). [39] N. Gomes, F. Zhang, N. F. Berthusen, C.-Z. Wang, K.-M. Ho, P. P. Orth, and Y. Yao, Efficient step-merged quantum imaginary time evolution algorithm for quantum chemistry, J. Chem. Theory Comput 16, 6256–6266 (2020).

17 [40] K. Yeter-Aydeniz, R. C. Pooser, and G. Siopsis, Practical quantum computation of chemical and nuclear energy levels using quantum imaginary time evolution and lanczos algorithms, npj Quantum Inf 6, 63 (2020). [41] G. Lindblad, On the generators of quantum dynamical semigroups, Comm. Math. Phys 48, 119 (1976). [42] T. F. Havel, Robust procedures for converting among lindblad, kraus and matrix representa- tions of quantum dynamical semigroups, J. Math. Phys 44, 534 (2003). [43] M. A. Nielsen and I. Chuang, Quantum computation and quantum information (2002). [44] S. Lloyd, Universal quantum simulators, Science 273, 1073–1078 (1996). [45] R. Somma, G. Ortiz, J. E. Gubernatis, E. Knill, and R. Laflamme, Simulating physical phe- nomena by quantum networks, Phys. Rev. A 65, 042323 (2002). [46] S. Endo, Z. Cai, S. C. Benjamin, and X. Yuan, Hybrid quantum-classical algorithms and quantum error mitigation, J. Phys. Soc. Japan 90, 032001 (2021). [47] S. Bravyi, G. Smith, and J. A. Smolin, Trading classical and quantum computational resources, Phys. Rev. X 6, 021043 (2016). [48] T. Peng, A. W. Harrow, M. Ozols, and X. Wu, Simulating large quantum circuits on a small quantum computer, Phys. Rev. Lett. 125, 150504 (2020). [49] T. Gujarati, A. Eddins, S. Bravyi, C. Hadfield, A. Mezzacapo, M. Motta, and S. Sheldon, Reducing circuit size in the variational quantum eigensolver–part 1: Theory, Bulletin of the American Physical Society (2021). [50] A. Eddins, T. Gujarati, S. Bravyi, C. Hadfield, A. Mezzacapo, M. Motta, and S. Sheldon, Reducing circuit size in the variational quantum eigensolver–part 2: Experiment, Bulletin of the American Physical Society (2021). [51] A. Eddins, T. Gujarati, S. Bravyi, C. Hadfield, A. Mezzacapo, M. Motta, and S. Sheldon, In preparation (2021). [52] M. J. Kastoryano and J. Eisert, Rapid mixing implies exponential decay of correlations,J. Math. Phys 54, 102201 (2013). [53] G. Aleksandrowicz, T. Alexander, P. Barkoutsos, L. Bello, Y. Ben-Haim, D. Bucher, F. Cabrera-Hern´andez,J. Carballo-Franquis, A. Chen, C. Chen, et al., Qiskit: An open-source

framework for quantum computing, https://doi.org/10.5281/zenodo.2562110 (2019), ac- cessed: 2021-03-16.

18 [54] K. Temme, S. Bravyi, and J. M. Gambetta, Error mitigation for short-depth quantum circuits, Phys. Rev. Lett 119, 180509 (2017). [55] A. Kandala, K. Temme, A. D. C´orcoles,A. Mezzacapo, J. M. Chow, and J. M. Gambetta, Error mitigation extends the computational reach of a noisy quantum processor, Nature 567, 491 (2019). [56] S. Bravyi, S. Sheldon, A. Kandala, D. C. Mckay, and J. M. Gambetta, Mitigating measurement errors in multi-qubit experiments, arXiv:2006.14044 (2020). [57] J. Johansson, P. Nation, and F. Nori, Qutip 2: A python framework for the dynamics of open quantum systems, Comp. Phys. Comm 184, 1234 (2013). [58] J. R. Johansson, P. D. Nation, and F. Nori, Qutip: An open-source python framework for the dynamics of open quantum systems, Comp. Phys. Comm 183, 1760 (2012). [59] ibmq mumbai v1.4.11, ibmq guadalupe v1.2.14, and ibmq casablanca v1.2.14, IBM Quantum Team, Retrieved from https://quantum-computing.ibm.com (2020), accessed: 2021-03-16. [60] R. Loudon, The quantum theory of light (OUP Oxford, 2000). [61] R. M. Parrish, E. G. Hohenstein, P. L. McMahon, and T. J. Mart´ınez,Quantum computation of electronic transitions using a variational quantum eigensolver, Phys. Rev. Lett 122, 230401 (2019).

19 Appendix A: Derivation of the QITE linear system for Algorithm II

Here we derive the QITE linear systems which need to be solved to obtain the time P evolution of the density operator ansatz. Consider ρ = pxT x T x , with T unitary. | i x | i ⊗ | i The complex time propagator is the same as in the vectorization method,

" # ! > X 1 † 1 > X(t) = exp iI H + iH I + (Lk Lk I (LkLk) (Lk Lk) I) t . − ⊗ ⊗ ⊗ − 2 ⊗ − 2 ⊗ k (A1) Trotterizing results in

X(t) = n ( "  >  † !# )  >   Y Lk Lkτ LkLkτ exp iH τ exp ( iHτ) exp exp exp (Lk Lkτ) ⊗ − − 2 ⊗ − 2 ⊗ k + τ 2n O (A2) with τ = t/n. Using the identity exp ( iA) = exp (iA>) for A Hermitian and exp (B) = − exp (B) for arbitrary B, the propagator can be rewritten as

( )n Y 2  X(t) = [U U] [Vk Vk]Wk + τ n (A3) ⊗ ⊗ O k

> > with U := exp (iH τ), Vk := exp ( L Lkτ/2), and Wk := exp (Lk Lkτ). It is imme- − k ⊗ P diate that evolution with U U preserves the ansatz, as (U U) pxT x T x = ⊗ ⊗ x | i ⊗ | i P px(UT ) x (UT ) x . The term V V also preserves the ansatz, but is an imaginary x | i ⊗ | i ⊗ > time evolution with Hamiltonian Lk Lk/2, and so requires a modified QITE algorithm, de- > scribed below, for implementing exp ( L Lkτ/2)T x . Due to the non-unitarity of Vk, we − k | i expect that in addition to a unitary evolution of the state, the weights px will also evolve

in time. The final term, Wk = exp (Lk Lkτ), does not preserve the ansatz, and we use ⊗ a modified version of QITE, described below, to effectively apply Wk while preserving the form of ansatz.

20 1. Implementing Vk Vk via a QITE adaptation ⊗

Under real time evolution by the non-unitary operator Vk Vk, the evolution of ρ can ⊗ | i be expressed as

X X 2 Vk Vk pxT x T x = (px + qx) exp (iA)T x exp ( iA)T x + O(τ ), (A4) ⊗ x | i ⊗ | i x | i ⊗ − | i

> with qx R and A a Hermitian operator with A = (τ). Defining B := (1/2)Lk Lk, we ∈ k k2 O then have, to first order in τ, X X exp ( τB) exp ( τB) pxT x T x = (px + qx) exp (iA)T x exp ( iA)T x . − ⊗ − x | i ⊗ | i x | i ⊗ − | i (A5) Expanding both sides to first order in τ and discarding higher order terms results in X τ px(BT x T x + T x BT x ) = − | i ⊗ | i | i ⊗ | i x (A6) X X qxT x T x + i px(AT x T x T x AT x ). x | i ⊗ | i x | i ⊗ | i − | i ⊗ | i Taking the inner product of Eq. (A6) with y T † y T > results in h | ⊗ h | X † > † > τ px( y T BT x y T T x + y T T x y T BT x ) = − x h | | ih | | i h | | ih | | i X † > X † > † > qx y T T x y T T x + i px( y T AT x y T T x y T T x y T AT x ). x h | | ih | | i x h | | ih | | i − h | | ih | | i (A7)

† > Using the identities y T T x = y T T x = δxy for T unitary results in h | | i h | | i † > † > τpy( y T BT y + y T BT y ) = qy + ipy( y T AT y y T AT y ). (A8) − h | | i h | | i h | | i − h | | i Because A is Hermitian, we additionally have y T †AT y = y T >AT y so that the last h | | i h | | i two terms on the right-hand side cancel, resulting in

 †  qy = 2τpyRe y T BT y (A9) − h | | i

With the qx’s determined, we can now determine the operator A. Rearranging Eq. (A6), we first isolate the terms containing A: X i px(AT x T x T x AU x ) = | i ⊗ | i − | i ⊗ | i x (A10) X X τ px(BT x T x + T x BT x ) qxT x T x . − x | i ⊗ | i | i ⊗ | i − x | i ⊗ | i

21 We define the right hand side as X X Φ = τ px(BT x T x + T x BT x ) qxT x T x . (A11) | i − x | i ⊗ | i | i ⊗ | i − x | i ⊗ | i P We then decompose A into a sum over Pauli strings with domain size D, A = j ajσj, where the σj are Pauli strings acting on at most D qubits, aj R and aj = (τ) for all j. ∈ O Substituting into the left hand side of Eq. (A10) yields X X i pxaj(σjT x T x T x σjT x ) = aj vj = Φ , (A12) x,j | i ⊗ | i − | i ⊗ | i j | i | i P ∗ ∗ ∗ where we have defined the vectors vj := px(σjT x T x T x σ T x ). Denoting | i x | i⊗ | i− | i⊗ j | i by f the function 2 X X ∗ X ∗ f(a) = Φ i aj vj = Φ Φ + i (a vj Φ aj Φ vj ) + a ak vj vk ), (A13) | i − | i h | i j h | i − h | i j h | i j j jk

the optimal coefficients aj are determined by minimizing f. This results in the set of equations ∂f X 0 = = Im [ v Φ ] + a Re [ v v ] . (A14) ∂a k j k j k − h | i j h | i

Defining the matrix Sjk := Re [ vj vk ] and the vector bj := Im [ vj Φ ], the optimal coeffi- h | i h | i cients a are the solution to the linear system Sa = b.

Using the definition’s of vj and Φ , we calculate calculate the matrix elements of S as | i | i X 2  †  X  † †  Sjk = Re [ vj vk ] = pxRe x T (σjσk + σkσj)T x 2 pxpyRe x T σjT y x T σkT y , h | i x h | | i − xy h | | ih | | i (A15) and the elements of b as ! X 2  †  X  † † †  bj = 2τ pxIm x T σjBT x + pxpyIm x T σjT y y T B T x . (A16) − x h | | i xy h | | ih | | i

2. Implementing Wk via a QITE adaptation

The real time evolution corresponding to Wk = exp (τLk Lk) can be determined com- ⊗ pletely analogously to that of Vk Vk above. The resulting equations are ⊗  2 q = τ P p y T †L T x  y x x k  h | | i Sjk = Re [ vj vk ] (A17)  h | i  bj = Im [ vj Φ ] h | i

22 where Sa = b gives the optimal Pauli strings. The matrix elements for S are the same, as the vectors vj are identical in both cases. Since Φ has a different form, the elements of b | i | i are modified and given by

X h † † † i bj = Im [ vj Φ ] = 2τ pxpyIm x T σjLkT y y T LkT x . (A18) h | i xy h | | ih | | i

3. Conservation of Probability

P The trace of the density operator, given by Tr (ρ) = x px = 1, is preserved by time evo- lution generated by the Lindblad equation. Here we show that time evolution via Algorithm

II also maintains the trace. The trace is preserved if the sum of all qx’s is zero at each time step. This requires summing the contributions to the qx’s from both the Vk and Wk terms as follows:

! X X h † † i X † 2 qy = τpyRe y T LkLkT y + τ px y T LkT x y y − h | | i x h | | i

X † † X X † † † = τ py y T LkLkT y + τ px x T LkT y y T LkT x − y h | | i x y h | | ih | | i

 †  X † † (A19) = τTr ρLkLk + τ px x T LkLkT x − x h | | i  †   †  = τTr ρL Lk + τTr ρL Lk − k k = 0

4. Measuring Observables

The result of the above real and imaginary time evolution, the weights px(t) and the Hermitian operator A(t) can be used to calculate the expectation value of any observ- able. Inverting the Choi-Jamio lkowski isomorphism gives us the density operator ρ(t) =

23 P † px(t)T (t) x x T (t). Observables O are then calculated as x | ih | X † O(t) = Tr (Oρ(t)) = px(t) y OT (t) x x T (t) y h i xy h | | ih | | i

X † = px x T y y OT x xy h | | ih | | i ! (A20) X † X = px x T y y OT x x h | y | ih | | i

X † = px(t) x T (t)OT (t) x . x h | | i

Beyond a certain number of qubits, storing all the px(t)’s is not possible, and a stochastic sampling approach is needed. Locality conditions suggest one possible approach to efficient sampling, described at the end of section (A 5), which converges faster than uniform random sampling.

5. Measuring Matrix Elements

To obtain the coefficients qx and ai, we need to measure various matrix elements. In P general, we can decompose any operator into a sum over Pauli strings, X = j xiσi. Since P x X y = xi x σi y , we then need to measure x σi y for all Pauli strings σi. This can h | | i j h | | i h | | i be done using the following identities: x + y x + y x y x y 2Re [ x X y ] = h | h |X | i | i h | − h |X | i − | i, (A21) h | | i √2 √2 − √2 √2 x + i y x i y x i y x + i y 2Im [ x X y ] = h | h |X | i − | i h | − h |X | i | i. (A22) h | | i √2 √2 − √2 √2 In general, the state ( x + ip y )/√2, with p 0, 1, 2, 3 , requires a quantum circuit | i | i ∈ { } comprising m CNOT gates and having depth m + 1, where m is the Hamming distance

between the binary strings x, y [61]. Indeed, one can find an index k such that xk = yk. 6 Without loss of generality, one can assume that xk = 1 (otherwise, just invert the roles of x, y and replace p with p mod 4). One can then define the sets S = l : xl = 1, l = k , − { 6 } ⊗n T = l : xl = yl, l = k . Finally, starting from a register of n qubits prepared in 0 , { 6 6 } | i the desired state is obtained by: (i) applying a product of X gates on qubits in the set Q S, l∈S Xl, (ii) applying to qubit k the gate gp = H,SH,ZH,ZSH, for p = 0, 1, 2, 3, respectively, and (iii) applying a product of CNOT gates to qubits in T controlled by qubit Q k, l∈S ckXl.

24 For local observables the state preparation is simpler, as described in the following. Con- (k) (k) sider a k-qubit observable X In−k, with X acting non-trivially on k qubits out of a ⊗ total of n qubits. Then

(k) (k) x X In−k y = x1, . . . , xk, xk+1, . . . , xn X In−k y1, . . . , yk, yk+1, . . . , yn (A23) h | ⊗ | i h | ⊗ | i (k) = δx ,y δx ,y x1, . . . , xk X y1, . . . , yk . (A24) k+1 k+1 ··· n n h | | i Thus we need only to prepare the states

x1, . . . , xk, xk+1, . . . , xn + y1, . . . , yk, xk+1, . . . , xn | i | i = √2 (A25) x1, . . . , xk + y1, . . . , yk | i | i xk+1, . . . , xn . √2 ⊗ | i Since k is typically small, only 1 or 2 qubits in most cases and independent of the system size, this state can be efficiently prepared. The form of Eq. (A25) suggests a stochastic sampling method to determine which px’s to store classically. For simplicity we describe the case of qubits in a line, and the indices 1, . . . , n labelling the sites with the observable acting on the first k qubits. The general case is similar. Since the matrix elements will depend more heavily on qubits 1, . . . , k + m for some cutoff m, we can sample with higher frequency on the first k + m qubits and with lower frequency on the rest. In addition, in many cases we expect the dissipation channels Lk to reduce long range correlations, further increasing the convergence rate of local sampling.

25