This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Quantum gradient descent algorithms for nonequilibrium steady states and linear algebraic systems

Jin-Min Liang jmliang@cnu.edu.cn School of Mathematical Sciences, Capital Normal University, Beijing 100048, China    Shi-Jie Wei Beijing Academy of Quantum Information Sciences, Beijing 100193, China State Key Laboratory of Low-Dimensional Quantum Physics and Department of Physics, Tsinghua University, Beijing 100084, China    Shao-Ming Fei feishm@cnu.edu.cn School of Mathematical Sciences, Capital Normal University, Beijing 100048, China Shenzhen Institute for Quantum Science and Engineering, Southern University of Science and Technology, Shenzhen 518055, China
(Received November 12, 2021; accepted December 27, 2021; published online March 21, 2022)
Abstract

The gradient descent approach is the key ingredient in variational quantum algorithms and machine learning tasks, which is an optimization algorithm for finding a local minimum of an objective function. The quantum versions of gradient descent have been investigated and implemented in calculating molecular ground states and optimizing polynomial functions. Based on the quantum gradient descent algorithm and Choi-Jamiolkowski isomorphism, we present approaches to simulate efficiently the nonequilibrium steady states of Markovian open quantum many-body systems. Two strategies are developed to evaluate the expectation values of physical observables on the nonequilibrium steady states. Moreover, we adapt the quantum gradient descent algorithm to solve linear algebra problems including linear systems of equations and matrix-vector multiplications, by converting these algebraic problems into the simulations of closed quantum systems with well-defined Hamiltonians. Detailed examples are given to test numerically the effectiveness of the proposed algorithms for the dissipative quantum transverse Ising models and matrix-vector multiplications.

PACS number(s): 02.30.Mv, 02.60.Pn, 03.67.Lx, 03.65.Yz

Keywords: Quantum simulation, Quantum gradient descent algorithm, Nonequilibrium steady state, Quantum open system

I Introduction

Quantum computers can effectively simulate the dynamics of quantum systems Feynman1982Simulating ; Bacon2010Recent ; Childs2012Hamiltonian , prepare quantum states Xin2019Preparation ; Yang2019Dissipative and solve machine learning tasks Shor1994 ; Grover1996 ; HHL2009 ; QML2017 ; Li2020Efficient ; Ye2021Generic ; Ran2020Tensor , although the related algorithms generally require deep gate sequences. In the past years, rapid advances in the construction of large-scale fault-tolerate universal quantum computers have been made based on, for instance, superconducting qubits Krantz2019A ; Huang2020Superconducting ; Wu2021Strong , photos Slussarenkoa2019Photonic , silicon quantum dots Yang2019Silicon and ultracold trapped ions Blatt2012Quantum ; Bruzewicza2019Trapped .

Currently, we are in an era of noisy intermediate-scale quantum (NISQ) processors that may have limited resources such as a few tens to hundreds of qubits with no error correction capability, shallow circuit depth and short coherence time preskill2018quantum ; larose2019variational ; peruzzo2014variational ; higgott2019variational ; jones2019variational . Such devices have ushered in the era of variational quantum algorithms (VQAs). VQAs aim to tackle complex problems by combining classical computers and NISQ devices benedetti2019parameterized ; wang2020variational ; li2021optimizing ; Liu2021Hybrid ; Liang2021Quantum. Experimental evidence related to VQAs suggests that NISQ devices may improve machine learning performance for image generation Huang2021Experimental , classification havlivcek2019supervised and combinatorial optimization problems Harrigan2021Quantum .

Different from VQAs, the full quantum eigensolver (FQE) finds the ground state of a hermitian Hamiltonian of a closed quantum system wei2020a ; Long2006General on a quantum computer without classical optimizers. In particular, due to the fact that the iterative optimization part utilizes the quantum gradient descent (QGD) algorithm, FQE does not require quantum-classical optimization loops like VQAs and thus can be applied totally on a quantum computer. This significant example implies that QGD as an optimization scheme is of importance in the NISQ era Fan2021Exponential .

Inspired by FQE for chemistry simulation, here we try to find interesting applications of QGD in open quantum systems and linear algebraic systems. In reality, the coupling to the environment is unavoidable for quantum systems and may lead to a rich variety of novel physical phenomena diehl2008quantum ; verstraete2009quantum . When the interaction with the environment is a Markovian one, the open quantum system is governed by the quantum master equation in the Lindblad form breuer2002the ; rotter2009a . As a result, the dynamics of the system give rise to incoherent characteristics such as damping and dephasing process. Such non-unitary evolution thus can not be directly implemented by normal methods designed for the isolated quantum systems rotter2009a .

Aside from simulating open quantum systems on a quantum computer Han2021Experimental ; wei2016duality , the nonequilibrium steady state (NESS) under time-independent dissipation is also a particularly significant topic. The NESS exhibits significant properties in measurement-based quantum computation kraus2008preparation and is topologically nontrivial diehl2011topology . However, with the exponential growth of the Hilbert space with the number of lattice sites, exponentially many complex numbers are required to describe the full density matrix, which in practice is hard to tackle. Although some previous results based on neural networks nagy2019variational ; hartmann2019variational ; vicentini2019variational and variational quantum algorithm framework yoshioka2020variational ; Liu2021Variational have been reported, the study of NESS still requires more investigation.

In this work, we provide an efficient quantum iterative algorithm for determining the NESS with the help of quantum gradient descent (QGD) algorithm. The proposed method is implemented totally on the quantum computer and thus does not require the classical-quantum optimization loop compared with previous works yoshioka2020variational ; Liu2021Variational . The quantum master equation in Lindblad form is mapped into a pure state form described by a stochastic Schro¨\ddot{\textrm{o}}dinger equation with a non-Hermitian Hamiltonian. In this case, the NESS is expressed in terms of a linear equation. We then apply the QGD algorithm to search the ground state of the redefined hermitian Hamiltonian which involves the Liouvillian superoperator associated to the master equation. Although the output NESS is in a vector form of the density matrix, two strategies are proposed to evaluate the expectation value of physical observables for the NESS. It is worth to notice that our QGD is based on the linear combinations of unitaries Long2006General ; wei2020a instead of the quantum simulation of the gradient operator rebentrost2019quantum . Moreover, we find broader applications of QGD in solving linear algebra problems. In particular, we solve the linear systems of equations and matrix-vector multiplications by converting these algebraic problems into hermitian Hamiltonian evolutions. Finally, we numerically test our algorithms with the dissipative quantum transverse Ising model and other toy examples.

II Quantum gradient descent algorithm

As a popular optimization approach, the classical gradient descent (CGD) method plays a particularly significant role in various fields. The CGD iteratively finds a local minimum of the objective function starting from an initial guess by moving along the negative gradient of the objective function. In quantum realm, an appealing paradigm of CGD is to train a variational quantum circuit on the parameter space. These circuits run several times to optimize some objective functions which could associate to the energy of quantum states HardwareVQE2017 ; Parrish2019Quantum or the loss in a quantum machine learning model Lloyd2018Quantum ; Demers2018Quantum . The first quantum version of CGD is based on the quantum simulation of the gradient operator and the quantum phase estimation rebentrost2019quantum . Due to the substantial circuit depth, this algorithm requires more computational resources.

The second type quantum gradient descent algorithm (QGD) li2021optimizing is based on the linear combination of unitary operators, which provides explicitly quantum circuit with amenable circuit depth and firstly demonstrates the process to optimize polynomials on a quantum simulator. Moreover, a generalized QGD gets rid of the homogeneous and even-order constraints in previous work and thus accomplishes the quantum gradient algorithm for general polynomials Gao2021Quantum . In addition, a second-order optimization algorithm Fan2021Exponential inspired by the classical Newton algorithm achieves a faster convergence speed compared with the above work rebentrost2019quantum ; Gao2021Quantum .

In this section, we first summarize the framework of quantum gradient descent (QGD) algorithm with the linear combination of unitary operators Gao2021Quantum ; wei2020a .

Let f(|x):Nf(|x\rangle):\mathbb{C}^{N}\mapsto\mathbb{R} be the objective function to be minimized. Given an initial quantum state |x(0)|x^{(0)}\rangle, one iteratively updates the quantum state by using the negative gradient direction f(x(s))\nabla{f(x^{(s)})} of the objective function. The update process is given by,

|x(s+1):=|x(s)γ|f(x(s)).\displaystyle|x^{(s+1)}\rangle:=|x^{(s)}\rangle-\gamma|\nabla{f(x^{(s)})}\rangle. (1)

The learning rate, γ>0\gamma>0, determines the step length of each iteration. The gradient direction state |f(x(s))|\nabla{f(x^{(s)})}\rangle is specifically formulated by applying a gradient operator 𝒢\mathcal{G} (not necessary unitary) to the state |x(s)|x^{(s)}\rangle,

|x(s+1):=(Iγ𝒢)|x(s)D|x(s).\displaystyle|x^{(s+1)}\rangle:=(I-\gamma\mathcal{G})|x^{(s)}\rangle\equiv D|x^{(s)}\rangle. (2)

The non-unitary operator DD may be either parameter-dependent or parameter-independent in different cases. For example, in calculating the molecular ground energies and electronic structures, the non-unitary operator D=12γH^D=1-2\gamma\hat{H} is a parameter-independent operator, where H^\hat{H} is the Hamiltonian of the system wei2020a .

The gradient iteration can be seen as a state evolution under the non-unitary operator DD. This non-unitary dynamic can not be naturally simulated on quantum devices. However, it is possible to embed the non-unitary operator into a unitary operator in a larger Hilbert space. The basic idea is to denote DD in terms of local operators D^[m]\hat{D}[m]. By adding the ancillary system, one performs a controlled unitary on the state |x(s)|x^{(s)}\rangle to prepare the state |x(s+1)|x^{(s+1)}\rangle. The size of the ancillary system is determined by the number of local terms of the operator DD.

In the following sections, we adapt QGD to prepare the nonequilibrium steady states and handle linear algebra problems, such as the linear equations with hermitian and non-Hermitian matrices and matrix-vector multiplication.

III Simulation of open quantum system with QGD algorithm

III.1 Dynamics of open quantum systems

The dynamics of density matrix, ρN×N\rho\in\mathbb{C}^{N\times N}, N=2nN=2^{n}, is governed by a quantum master equation in the Lindblad form lindbald1976on ,

ρ˙(t)=ρ(t),\displaystyle\dot{\rho}(t)=\mathcal{L}\rho(t), (3)

where \mathcal{L} is the Liouvillian superoperator such that

ρ=i[H,ρ]+𝒟ρ,\displaystyle\mathcal{L}\rho=-i[H,\rho]+\mathcal{D}\rho, (4)

tt is the time and HH is the Hamiltonian operator. The term [H,ρ][H,\rho] describes the unitary part of the dynamics, while 𝒟ρ\mathcal{D}\rho gives the non-unitary time evolution governed by dissipative superoperators,

𝒟ρ=kμk2[2LkρLk{LkLk,ρ}].\displaystyle\mathcal{D}\rho=\sum_{k}\frac{\mu_{k}}{2}\Big{[}2L_{k}\rho L_{k}^{{\dagger}}-\{L_{k}^{{\dagger}}L_{k},\rho\}\Big{]}. (5)

Here each LkL_{k} is the kkth jump operator associated with a dissipative channel occurring at rate μk\mu_{k}. Let us consider the special but quite common case in which the Hamiltonian HH and the jump operator LkL_{k} is usually expressed as the sum of tensor products lloyd1996universal ; mahdian2020hybrid ,

H=ihiH^[i],Lk=jljL^k[j],hi,lj.\displaystyle H=\sum_{i}h_{i}\hat{H}[i],\,~{}~{}L_{k}=\sum_{j}l_{j}\hat{L}_{k}[j],~{}h_{i},l_{j}\in\mathbb{R}. (6)

Under the Choi-Jamiolkowski isomorphism havel2003robust ; yoshioka2019constructing ; kamakari2021digital , ρ=ipi|ΨiΨi||ρ=ipi|Ψi|Ψi\rho=\sum_{i}p_{i}|\Psi_{i}\rangle\langle\Psi_{i}|\rightarrow|\rho\rangle=\sum_{i}p_{i}|\Psi_{i}\rangle\otimes|\Psi_{i}\rangle, Eq. (3) is written as,

|ρ˙(t)=|ρ(t)\displaystyle|\dot{\rho}(t)\rangle=\mathcal{H}|\rho(t)\rangle (7)

with the Liouville operator

\displaystyle\mathcal{H} =i(INHTHIN)+\displaystyle=-i(I_{N}\otimes H^{T}-H\otimes I_{N})+
k=1nμk2(2LkLkINLkTLkLkLkIN),\displaystyle\sum_{k=1}^{n}\frac{\mu_{k}}{2}\Big{(}2L_{k}\otimes L_{k}^{*}-I_{N}\otimes L_{k}^{T}L_{k}^{*}-L_{k}^{{\dagger}}L_{k}\otimes I_{N}\Big{)}, (8)

where LkL_{k}^{*} denotes the complex conjugate of LkL_{k} and INI_{N} is the N×NN\times N identity matrix. In this representation, the time evolution is formally solved as |ρ(t)=et|ρ(0)|\rho(t)\rangle=e^{\mathcal{H}t}|\rho(0)\rangle with the initial state |ρ(0)|\rho(0)\rangle.

III.2 Searching NESS by QGD

The NESS ρss\rho_{\textrm{ss}}, ρ˙ss=ρss=0\dot{\rho}_{\textrm{ss}}=\mathcal{L}\rho_{\textrm{ss}}=0 or |ρss=limt|ρ(t)|\rho_{\textrm{ss}}\rangle=\lim_{t\rightarrow\infty}|\rho(t)\rangle schirmer2010stabilizing ; minganti2018spectral , corresponds to a pure state |ρss|\rho_{\textrm{ss}}\rangle satisfying |ρss=0\mathcal{H}|\rho_{\textrm{ss}}\rangle=0. Since the operator (III.1) is not hermitian, we consider instead the hermitian operator 0\mathcal{H}^{{\dagger}}\mathcal{H}\succeq 0. It is straightforward to see that |ρss|\rho_{\textrm{ss}}\rangle also be the ground state of \mathcal{H}^{{\dagger}}\mathcal{H}. Thus, the objective function is defined as the expectation value of \mathcal{H}^{{\dagger}}\mathcal{H},

f(|ρ)=ρ||ρ.\displaystyle f(|\rho\rangle)=\langle\rho|\mathcal{H}^{{\dagger}}\mathcal{H}|\rho\rangle. (9)

We here use QGD to minimize f(|ρ)f(|\rho\rangle). The QGD iterative process can be regraded as,

|ρ(s+1):\displaystyle|\rho^{(s+1)}\rangle: =|ρ(s)γf(|ρ(s))\displaystyle=|\rho^{(s)}\rangle-\gamma\nabla f(|\rho^{(s)}\rangle)
=|ρ(s)2γ|ρ(s)=D|ρ(s).\displaystyle=|\rho^{(s)}\rangle-2\gamma\mathcal{H}^{{\dagger}}\mathcal{H}|\rho^{(s)}\rangle=D|\rho^{(s)}\rangle. (10)

Therefore, according to Eqs. (6) and (III.1), DD can be expressed as a sum of M=𝒪(poly(n))M=\mathcal{O}(poly(n)) local terms, D=m=0M1dmD^[m]N2×N2D=\sum_{m=0}^{M-1}d_{m}\hat{D}[m]\in\mathbb{C}^{N^{2}\times N^{2}}, where the unitary D^[m]\hat{D}[m] consists of some local Pauli operators. After normalization, we obtain the iterative equation such that

|ρ(s+1)\displaystyle|\rho^{(s+1)}\rangle =1C(s)D|ρ(s)\displaystyle=\frac{1}{\sqrt{C^{(s)}}}D|\rho^{(s)}\rangle
=1C(s)m=0M1dmD^[m]|ρ(s),\displaystyle=\frac{1}{\sqrt{C^{(s)}}}\sum_{m=0}^{M-1}d_{m}\hat{D}[m]|\rho^{(s)}\rangle, (11)

where the normalized constant,

C(s)\displaystyle C^{(s)} =ρ(s)|DD|ρ(s)\displaystyle=\langle\rho^{(s)}|D^{{\dagger}}D|\rho^{(s)}\rangle
=m1,m2=0M1dm1dm2ρ(s)|D^[m1]D^[m2]|ρ(s),\displaystyle=\sum_{m_{1},m_{2}=0}^{M-1}d_{m_{1}}d_{m_{2}}\langle\rho^{(s)}|\hat{D}^{{\dagger}}[m_{1}]\hat{D}[m_{2}]|\rho^{(s)}\rangle, (12)

can be estimated from the expectation value of D^[m1]D^[m2]\hat{D}^{{\dagger}}[m_{1}]\hat{D}[m_{2}]. The Algorithm 1 below and the Fig. (1.a) outline the preparation of NESS with QGD.

Input: the state |Ψ0=|0m~1|ρ(0)2|\Psi_{0}\rangle=|0^{\widetilde{m}}\rangle_{1}|\rho^{(0)}\rangle_{2} and the tolerance error ε\varepsilon.
Output: the state |ρss|\rho_{\textrm{ss}}\rangle satisfying |f(|ρss)|ε|f(|\rho_{\textrm{ss}}\rangle)|\leq\varepsilon.
Step 1. Apply unitary WW on the first register and obtain the entangled state,
|Ψ1=1𝒩Dm=0M1dm|m1|ρ(0)2.|\Psi_{1}\rangle=\frac{1}{\sqrt{\mathcal{N}_{D}}}\sum_{m=0}^{M-1}d_{m}|m\rangle_{1}|\rho^{(0)}\rangle_{2}.
Step 2. Apply the controlled unitary 𝒞m~(D^)=m=0M1|mm|D^[m]\mathcal{C}_{\widetilde{m}}(\hat{D})=\sum_{m=0}^{M-1}|m\rangle\langle m|\otimes\hat{D}[m] on both registers. We obtain
|Ψ2=1𝒩Dm=0M1dm|m1D^[m]|ρ(0)2.|\Psi_{2}\rangle=\frac{1}{\sqrt{\mathcal{N}_{D}}}\sum_{m=0}^{M-1}d_{m}|m\rangle_{1}\hat{D}[m]|\rho^{(0)}\rangle_{2}.
Step 3. Perform m~\widetilde{m} Hadamard gates on the first register. The state of the whole system becomes
|Ψ3=1𝒩DM|0m~1D|ρ(0)2.\displaystyle|\Psi_{3}\rangle=\frac{1}{\sqrt{\mathcal{N}_{D}M}}|0^{\widetilde{m}}\rangle_{1}D|\rho^{(0)}\rangle_{2}.
Readout. Repeat steps 1-3 roughly SS times, and measure the first register. Once we obtain the state |0m~1|0^{\widetilde{m}}\rangle_{1}, the output state is |ρss|ρ(S)|\rho_{\textrm{ss}}\rangle\approx|\rho^{(S)}\rangle if |f(|ρ(S))|ε|f(|\rho^{(S)}\rangle)|\leq\varepsilon is satisfied.
Algorithm 1 The preparation of NESS with QGD

Our QGD algorithm requires two quantum registers, the register 1 and register 2. The input is a tensor product state |Ψ0=|0m~1|ρ(0)2|\Psi_{0}\rangle=|0^{\widetilde{m}}\rangle_{1}|\rho^{(0)}\rangle_{2}, m~=logM\widetilde{m}=\log M. The state |ρ(0)|\rho^{(0)}\rangle is an initial guess state picked from easily prepared states such as |ρ(0)2=|02n2|\rho^{(0)}\rangle_{2}=|0^{2n}\rangle_{2}.

In step 1, we employ the amplitude encoding method to prepare a m~\widetilde{m}-qubit input state m=0M1dm𝒩D|m\sum_{m=0}^{M-1}\frac{d_{m}}{\sqrt{\mathcal{N}_{D}}}|m\rangle, where 𝒩D=m=0M1dm2\mathcal{N}_{D}=\sum_{m=0}^{M-1}d_{m}^{2}. The preparation takes 𝒪(poly(m~))\mathcal{O}(poly(\widetilde{m})) steps if dmd_{m} and 𝒩D\mathcal{N}_{D} can be efficiently computed by classical algorithms Grover2002Creating ; Soklakov2006Efficient . The preparation process can be carried out by applying the following unitary gate on state |0m~|0^{\widetilde{m}}\rangle,

W=[d0/𝒩Dw0,1w0,M1d1/𝒩Dw1,1w1,M1dM1/𝒩Dwd1,1wM1,M1],\displaystyle W=\begin{bmatrix}d_{0}/\sqrt{\mathcal{N}_{D}}&w_{0,1}&\cdots&w_{0,M-1}\\ d_{1}/\sqrt{\mathcal{N}_{D}}&w_{1,1}&\cdots&w_{1,M-1}\\ \cdots&\cdots&\cdots&\cdots\\ d_{M-1}/\sqrt{\mathcal{N}_{D}}&w_{d-1,1}&\cdots&w_{M-1,M-1}\end{bmatrix}, (13)

where the elements {w0,1,,wM1,M1}\{w_{0,1},\cdots,w_{M-1,M-1}\} are arbitrary so long as WW is unitary.

In step 2, we implement the m~\widetilde{m}-qubit-controlled unitary,

𝒞m~(D^)\displaystyle\mathcal{C}_{\widetilde{m}}(\hat{D}) =m=0M1(|mm|D^[m]+q=0,qmM1|qq|IN2)\displaystyle=\prod_{m=0}^{M-1}\Bigg{(}|m\rangle\langle m|\otimes\hat{D}[m]+\sum_{q=0,q\neq m}^{M-1}|q\rangle\langle q|\otimes I_{N^{2}}\Bigg{)}
=m=0M1m~D^,\displaystyle=\prod_{m=0}^{M-1}\wedge_{\widetilde{m}}\hat{D}, (14)

on state |Ψ1|\Psi_{1}\rangle to generate the entangled state

|Ψ2=1𝒩Dm=0M1dm|m1D^[m]|ρ(0)2.\displaystyle|\Psi_{2}\rangle=\frac{1}{\sqrt{\mathcal{N}_{D}}}\sum_{m=0}^{M-1}d_{m}|m\rangle_{1}\hat{D}[m]|\rho^{(0)}\rangle_{2}. (15)

The non-unitary gradient operator DD is realized by an extended unitary gate on a larger Hilbert space.

Without loss of generality, D^[m]\hat{D}[m] can be expressed as D^[m]=IP^1P^JI\hat{D}[m]=I\otimes\hat{P}_{1}\otimes\cdots\otimes\hat{P}_{J}\otimes I, J<2n\quad J<2n, where the Pauli operator P^j{X,Y,Z}\hat{P}_{j}\in\{X,Y,Z\} acts on jjth qubit. The multi-qubit-controlled unitary gate m~D^\wedge_{\widetilde{m}}\hat{D} can be written as

m~D^\displaystyle\wedge_{\widetilde{m}}\hat{D} =|mm|D^[m]+q=0,qmM1|qq|IN2\displaystyle=|m\rangle\langle m|\otimes\hat{D}[m]+\sum_{q=0,q\neq m}^{M-1}|q\rangle\langle q|\otimes I_{N^{2}}
=|mm|(IP^1P^JI)\displaystyle=|m\rangle\langle m|\otimes(I\otimes\hat{P}_{1}\otimes\cdots\otimes\hat{P}_{J}\otimes I)
+q=0,qmM1|qq|IN2\displaystyle+\sum_{q=0,q\neq m}^{M-1}|q\rangle\langle q|\otimes I_{N^{2}}
=j=1J(|mm|(I2j1P^jI22nj)\displaystyle=\prod_{j=1}^{J}\Bigg{(}|m\rangle\langle m|\otimes(I_{2^{j-1}}\otimes\hat{P}_{j}\otimes I_{2^{2n-j}})
+q=0,qmM1|qq|IN2).\displaystyle+\sum_{q=0,q\neq m}^{M-1}|q\rangle\langle q|\otimes I_{N^{2}}\Bigg{)}.

Namely, m~D^\wedge_{\widetilde{m}}\hat{D} can be decomposed into multi-qubit-controlled Pauli operators m~U\wedge_{\widetilde{m}}U, U{P^1,,P^J}U\in\{\hat{P}_{1},\cdots,\hat{P}_{J}\}. Specifically, m~D^\wedge_{\widetilde{m}}\hat{D} can be implemented by 𝒪(MJ)\mathcal{O}(MJ) multiple-qubit-controlled SU(2)\textrm{SU}(2) unitary operators.

Last step, we apply m~\widetilde{m} Hadamard gates on register 1 and the system state now becomes a separable one,

|Ψ3=1𝒩DM|0m~1D|ρ(0)2=1𝒩DM|0m~1|ρ(1)2.\displaystyle|\Psi_{3}\rangle=\frac{1}{\sqrt{\mathcal{N}_{D}M}}|0^{\widetilde{m}}\rangle_{1}D|\rho^{(0)}\rangle_{2}=\frac{1}{\sqrt{\mathcal{N}_{D}M}}|0^{\widetilde{m}}\rangle_{1}|\rho^{(1)}\rangle_{2}.

Suppose that the steps 1-3 are repeated SS times. The final state of the system is given by

|Ψfinal\displaystyle|\Psi_{\textrm{final}}\rangle =1(𝒩DM)S/2|0m~1DS|ρ(0)2\displaystyle=\frac{1}{(\mathcal{N}_{D}M)^{S/2}}|0^{\widetilde{m}}\rangle_{1}D^{S}|\rho^{(0)}\rangle_{2}
=1(𝒩DM)S/2|0m~1|ρ(S)2.\displaystyle=\frac{1}{(\mathcal{N}_{D}M)^{S/2}}|0^{\widetilde{m}}\rangle_{1}|\rho^{(S)}\rangle_{2}. (16)

When the register 1 is in state |0m~|0^{\widetilde{m}}\rangle, the state |ρ(S)|\rho^{(S)}\rangle could be a better approximation of the NESS |ρss|\rho_{\textrm{ss}}\rangle if the |ρ(S)|\rho^{(S)}\rangle satisfies |f(|ρ(S))|ε|f(|\rho^{(S)}\rangle)|\leq\varepsilon. Otherwise, repeat the overall procedures again until the convergence condition is satisfied. The success probability of obtaining |0m~|0^{\widetilde{m}}\rangle is given by

Psuc\displaystyle P_{\textrm{suc}} =Ψfinal|(|0m~0m~|IN)|Ψfinal\displaystyle=\langle\Psi_{\textrm{final}}|(|0^{\widetilde{m}}\rangle\langle 0^{\widetilde{m}}|\otimes I_{N})|\Psi_{\textrm{final}}\rangle
=DS|ρ(0)2(𝒩DM)S,\displaystyle=\frac{\|D^{S}|\rho^{(0)}\rangle\|^{2}}{(\mathcal{N}_{D}M)^{S}}, (17)

which decreases exponentially with respect to the number of iterations. Performing quantum amplitude amplification brassard2000quantum , we have that the number of measurements is at most

2L+1max(Psuc,1Psuc)Θ(1Psuc),\displaystyle\frac{2L+1}{\max(P_{\textrm{suc}},1-P_{\textrm{suc}})}\in\Theta\Big{(}\frac{1}{\sqrt{P_{\textrm{suc}}}}\Big{)}, (18)

where L=π/4θL=\lfloor\pi/4\theta\rfloor and sin2θ=Psuc\sin^{2}\theta=P_{\textrm{suc}}. The final success probability is at least max(Psuc,1Psuc)\max(P_{\textrm{suc}},1-P_{\textrm{suc}}).

Refer to caption
Figure 1: (a) Quantum circuit for preparing the NESS. (b) Quantum circuit for solving linear equations.

III.3 Estimation of expectation values

In addition to focusing on the NESS of open quantum systems, it is also important to provide an efficient scheme to compute expectation values of physical observables. Our algorithm yields a quantum state |ρss|\rho_{\textrm{ss}}\rangle related to the density matrix ρss\rho_{\textrm{ss}}. Note that in our approach the state is normalized, i.e., ρ|ρ=1\langle\rho|\rho\rangle=1. In general, the condition on the trace Tr[ρ]=IN|ρ=1\textrm{Tr}[\rho]=\langle I_{N}|\rho\rangle=1 is not automatically fulfilled. Thus, the expectation value of an arbitrary observable \mathcal{M} must be estimated as,

=Tr[ρss]Tr[ρss]=IN|^|ρssIN|ρss,\displaystyle\langle\mathcal{M}\rangle=\frac{\textrm{Tr}[\mathcal{M}\rho_{\textrm{ss}}]}{\textrm{Tr}[\rho_{\textrm{ss}}]}=\frac{\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle}{\langle I_{N}|\rho_{\textrm{ss}}\rangle}, (19)

with respect to the density matrix ρss\rho_{\textrm{ss}} for a given observable \mathcal{M}. Here, the super-operator ^=IN\hat{\mathcal{M}}=\mathcal{M}\otimes I_{N} and the maximally entangled state

|IN=i=0N11N|i|i=UIN|02n,\displaystyle|I_{N}\rangle=\sum_{i=0}^{N-1}\frac{1}{\sqrt{N}}|i\rangle|i\rangle=U_{I_{N}}|0^{2n}\rangle, (20)

which is prepared by applying the unitary UINU_{I_{N}} on an initial state |02n|0^{2n}\rangle. The quantum circuit of the unitary UINU_{I_{N}} consists of the Hadamard gate HH and CNOT gate, see Fig. (2.b.) In particular, by setting =IN\mathcal{M}=I_{N}, the trace of NESS ρss\rho_{\textrm{ss}} can be calculated by Tr[ρss]=IN|ρss\textrm{Tr}[\rho_{\textrm{ss}}]=\langle I_{N}|\rho_{\textrm{ss}}\rangle.

Refer to caption
Figure 2: (a) The decomposition of a controlled unitary m~U\wedge_{\widetilde{m}}U for any unitary 2×22\times 2 matrix UU. VV is unitary and VV=UVV=U. (b) The unitary UINU_{I_{N}} for preparing the state |IN|I_{N}\rangle.

We propose two strategies to estimate the expectation value (19) from the output state of the algorithm. While the swap test calculates the square of the inner product buhrman2001quantum ; fanizza2020beyond , the magnitude and sign of the inner product are also required in our specific cases.

Strategy 1. Our first strategy calculates the real and imaginary parts separately based on the modified swap test zhao2019quantum or Hadamard test aharonov2008a .

Start with an initial state 12(|0+ζ|1)\frac{1}{\sqrt{2}}(|0\rangle+\zeta|1\rangle) with ζ=1\zeta=1 or ζ=i\zeta=i. We prepare the state |ϕ0=12(|0|IN+ζ|1|ρss)|\phi_{0}\rangle=\frac{1}{\sqrt{2}}(|0\rangle|I_{N}\rangle+\zeta|1\rangle|\rho_{\textrm{ss}}\rangle) by applying the control unitary 1U\wedge_{1}U (see Proposition 1) on the state (1/2)[|0+ζ|1]|02n(1/\sqrt{2})[|0\rangle+\zeta|1\rangle]|0^{2n}\rangle. After applying the Hadamard gate on the first qubit, we obtain the state

|ϕ1=(1/2)[|0(|IN+ζ|ρss)+|1(|INζ|ρss)].|\phi_{1}\rangle=(1/2)[|0\rangle(|I_{N}\rangle+\zeta|\rho_{\textrm{ss}}\rangle)+|1\rangle(|I_{N}\rangle-\zeta|\rho_{\textrm{ss}}\rangle)]. (21)

Now we measure the qubit system in the basis of Pauli operator ZZ. The measurement output is a random variable ={r±=±1}\in\mathbb{Z}=\{r_{\pm}=\pm 1\}, where the output r+r_{+} (r)(r_{-}) corresponds to the measurement output state |0|0\rangle (|1)(|1\rangle). The expectation value of \mathbb{Z} is given by

𝔼()\displaystyle\mathbb{E}(\mathbb{Z}) =P+r++Pr=2P+1\displaystyle=P_{+}r_{+}+P_{-}r_{-}=2P_{+}-1
=ζI|ρss+ζρss|I2.\displaystyle=\frac{\zeta\langle I|\rho_{\textrm{ss}}\rangle+\zeta^{*}\langle\rho_{\textrm{ss}}|I\rangle}{2}. (22)

If ζ=1\zeta=1, we have 𝔼()=Re[IN|ρss]\mathbb{E}(\mathbb{Z})=\textrm{Re}[\langle I_{N}|\rho_{\textrm{ss}}\rangle]. If ζ=i\zeta=i, then 𝔼()=Im[I|ρss]\mathbb{E}(\mathbb{Z})=\textrm{Im}[\langle I|\rho_{\textrm{ss}}\rangle]. Let P+P_{+} be the probability of measurement outcome r+r_{+}. To estimate the probability P+P_{+}, we perform independent trials of the Bernoulli test. Then sample RR times and record the number R0R_{0} of observed |0|0\rangle. The frequency R0/RR_{0}/R then gives an estimator for P+P_{+} up to a sampling error ε~\tilde{\varepsilon}. From Hoeffding’s inequality hoeffding1963 , we have

P(|2R0R1𝔼()|ε~)2e2Rε~2=δ.\displaystyle P\Bigg{(}\Big{|}\frac{2R_{0}}{R}-1-\mathbb{E}(\mathbb{Z})\Big{|}\geq\widetilde{\varepsilon}\Bigg{)}\leq 2e^{-2R\widetilde{\varepsilon}^{2}}=\delta. (23)

We obtain the number of measurements, R=𝒪(ε~2logδ1)R=\mathcal{O}(\widetilde{\varepsilon}^{-2}\log\delta^{-1}). Therefor we have the following conclusion.

Proposition 1. Let 1U=|00|UIN+|11|Uρss\wedge_{1}U=|0\rangle\langle 0|\otimes U_{I_{N}}+|1\rangle\langle 1|\otimes U_{\rho_{\textrm{ss}}} be the controlled unitary gate with UIN|02n=|INU_{I_{N}}|0^{2n}\rangle=|I_{N}\rangle and Uρss|02n=|ρssU_{\rho_{\textrm{ss}}}|0^{2n}\rangle=|\rho_{\textrm{ss}}\rangle. There exists a quantum algorithm that calculates Re[IN|ρss]\textrm{Re}[\langle I_{N}|\rho_{\textrm{ss}}\rangle] and Im[IN|ρss]\textrm{Im}[\langle I_{N}|\rho_{\textrm{ss}}\rangle] to accuracy ε~\widetilde{\varepsilon} with success probability at least 1δ1-\delta by using 𝒪(ε~2logδ1)\mathcal{O}(\widetilde{\varepsilon}^{-2}\log\delta^{-1}) queries of 1U\wedge_{1}U.

Next we estimate the trace average Tr[ρ]=IN|^|ρ\textrm{Tr}[\mathcal{M}\rho]=\langle I_{N}|\hat{\mathcal{M}}|\rho\rangle.

Proposition 2. Denote the hermitian operator 𝕄=X^\mathbb{M}=X\otimes\hat{\mathcal{M}} and the controlled unitary gate 1U=|00|UIN+|11|Uρss\wedge_{1}U=|0\rangle\langle 0|\otimes U_{I_{N}}+|1\rangle\langle 1|\otimes U_{\rho_{\textrm{ss}}} with UIN|02n=|INU_{I_{N}}|0^{2n}\rangle=|I_{N}\rangle and Uρss|02n=|ρssU_{\rho_{\textrm{ss}}}|0^{2n}\rangle=|\rho_{\textrm{ss}}\rangle. The success probability to calculate IN|^|ρss\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle to accuracy ε~\widetilde{\varepsilon} via measuring the expectation value of 𝕄\mathbb{M} on state |ϕ0=12(|0|IN+ζ|1|ρss)|\phi_{0}\rangle=\frac{1}{\sqrt{2}}(|0\rangle|I_{N}\rangle+\zeta|1\rangle|\rho_{\textrm{ss}}\rangle) is at least 1δ1-\delta by using 𝒪(ε~2logδ1)\mathcal{O}(\widetilde{\varepsilon}^{-2}\log\delta^{-1}) queries of 1U\wedge_{1}U.

Proposition 2 can be proved by noting that

Tr[𝕄|ϕ0ϕ0|]={Re[IN|^|ρss],ζ=1,Im[IN|^|ρss],ζ=i\textrm{Tr}[\mathbb{M}|\phi_{0}\rangle\langle\phi_{0}|]=\left\{\begin{aligned} &\textrm{Re}[\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle],~{}~{}\zeta=1,\\ &\textrm{Im}[\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle],~{}~{}\zeta=i\end{aligned}\right. (24)

due to the structure of the operator 𝕄\mathbb{M}. Therefore, similar to the proof of Proposition 1, the number of measurements is 𝒪(ε~2logδ1)\mathcal{O}(\widetilde{\varepsilon}^{-2}\log\delta^{-1}).

In the last two Propositions we have assumed that the state |ρss|\rho_{\textrm{ss}}\rangle can be prepared by applying a unitary UρssU_{\rho_{\textrm{ss}}} on an initial state |Φ0=|02n|\Phi_{0}\rangle=|0^{2n}\rangle. However, as shown in Algorithm 1, our state |ρss|\rho_{\textrm{ss}}\rangle is prepared via a unitary evolution (denoted as VV) coupling to a measurement operator |0m~0m~|IN|0^{\widetilde{m}}\rangle\langle 0^{\widetilde{m}}|\otimes I_{N}. The overall process corresponds to a non-unitary process,

=(|0m~0m~|IN)V.\displaystyle\mathcal{E}=(|0^{\widetilde{m}}\rangle\langle 0^{\widetilde{m}}|\otimes I_{N})V. (25)

Thus, in order to employ the unitary 1U\wedge_{1}U introduced in the two Propositions, we need to find a unitary UρssU_{\rho_{\textrm{ss}}} to approximate this non-unitary process \mathcal{E}. Here, we propose a variational quantum non-unitary process approximation to find the unitary UρssU_{\rho_{\textrm{ss}}}. Let |Φ0|\Phi_{0}\rangle be an initial system state. The evolved (normalized) state under the non-unitary operator \mathcal{E} is given by |Φ=|Φ0Tr(|Φ0)|\Phi\rangle=\frac{\mathcal{E}|\Phi_{0}\rangle}{\textrm{Tr}(\mathcal{E}|\Phi_{0}\rangle)}. The main idea is to train a parameterized quantum circuit 𝒰(𝜶)\mathcal{U}(\bm{\alpha}), 𝜶=(α1,α2,)\bm{\alpha}=(\alpha_{1},\alpha_{2},\cdots) via minimizing an objective function which quantifies the difference between the states |Φ|\Phi\rangle and 𝒰(𝜶)|Φ0\mathcal{U}(\bm{\alpha})|\Phi_{0}\rangle. 𝒰(𝜶)\mathcal{U}(\bm{\alpha}) consists of single-qubit rotation gates and two-qubit CNOT gates havlivcek2019supervised ; commeau2020variational .

Let us have a detailed analysis on the non-unitary approximation algorithm. Our variational quantum non-unitary process approximation outputs a unitary UρssU_{\rho_{\textrm{ss}}} to approximately construct the non-unitary process \mathcal{E} on a given initial state. A natural objective function is the square of the trace distance between |ρss|\rho_{\textrm{ss}}\rangle and |ρ(𝜶)=𝒰(𝜶)|Φ0|\rho(\bm{\alpha})\rangle=\mathcal{U}(\bm{\alpha})|\Phi_{0}\rangle, i.e.,

F(𝜶)=Tr(O𝒰(𝜶)|ρssρss|𝒰(𝜶)),F(\bm{\alpha})=\textrm{Tr}\Big{(}O\mathcal{U}^{{\dagger}}(\bm{\alpha})|\rho_{\textrm{ss}}\rangle\langle\rho_{\textrm{ss}}|\mathcal{U}(\bm{\alpha})\Big{)},

which can be evaluated by measuring the expectation of the observable O=IN2|Φ0Φ0|O=I_{N^{2}}-|\Phi_{0}\rangle\langle\Phi_{0}| with respect to the state 𝒰(𝜶)|ρss\mathcal{U}(\bm{\alpha})|\rho_{\textrm{ss}}\rangle. It is straightforward to verify that the objective function can be expressed as

F(𝜶)=1|ρss|𝒰(𝜶)|Φ0|2.F(\bm{\alpha})=1-|\langle\rho_{\textrm{ss}}|\mathcal{U}(\bm{\alpha})|\Phi_{0}\rangle|^{2}. (26)

The objective function is faithful if and only if |ρss=𝒰(𝜶)|Φ0|\rho_{\textrm{ss}}\rangle=\mathcal{U}(\bm{\alpha})|\Phi_{0}\rangle.

The parameters 𝜶\bm{\alpha} are trained through a gradient-based optimization method. The optimal parameters can be obtained by updating 𝜶=𝜶ηF(𝜶)\bm{\alpha}=\bm{\alpha}-\eta\nabla F(\bm{\alpha}), where η\eta is the learning rate and F(𝜶)=(1F,2F,)\nabla F(\bm{\alpha})=(\partial_{1}F,\partial_{2}F,\cdots). The gradient information can be computed on a quantum computer via the finite difference formulae,

iF=F(𝜶)αi=F(𝜶+Δαi)F(𝜶Δαi)2Δαi,\partial_{i}F=\frac{\partial F(\bm{\alpha})}{\partial\alpha_{i}}=\frac{F(\bm{\alpha}+\Delta\alpha_{i})-F(\bm{\alpha}-\Delta\alpha_{i})}{2\Delta\alpha_{i}}, (27)

where Δαi\Delta\alpha_{i} is a small perturbation to 𝜶\bm{\alpha}. The minimization 𝜶min=argmin𝜶F(𝜶)\bm{\alpha}_{\textrm{min}}=\textrm{arg}\min_{\bm{\alpha}}F(\bm{\alpha}) gives rise to the optimal unitary Uρss=𝒰(𝜶min)U_{\rho_{\textrm{ss}}}=\mathcal{U}(\bm{\alpha}_{\textrm{min}}).

Strategy 2. Our second strategy provides an directly estimation of (19) from the output |Ψfinal|\Psi_{\textrm{final}}\rangle. Moreover, strategy 2 circumvents local measurement and unitary approximations, thus further reduces the computational complexity.

Proposition 3. Define the hermitian operator 𝕄^=XIM^\hat{\mathbb{M}}=X\otimes I_{M}\otimes\hat{\mathcal{M}} and the controlled unitary 1U~=|00|V+|11|IMUIN\wedge_{1}\widetilde{U}=|0\rangle\langle 0|\otimes V+|1\rangle\langle 1|\otimes I_{M}\otimes U_{I_{N}}, with V|0m~|02n=|ΨfinalV|0^{\widetilde{m}}\rangle|0^{2n}\rangle=|\Psi_{\textrm{final}}\rangle and UIN|02n=|INU_{I_{N}}|0^{2n}\rangle=|I_{N}\rangle. Then we can calculate IN|^|ρss\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle to accuracy ε~\widetilde{\varepsilon} via measuring the expectation value of 𝕄^\hat{\mathbb{M}} on the state

|Φfinal=12(|0|Ψfinal+ζ|1|0m~|IN).|\Phi_{\textrm{final}}\rangle=\frac{1}{\sqrt{2}}(|0\rangle|\Psi_{\textrm{final}}\rangle+\zeta|1\rangle|0^{\widetilde{m}}\rangle|I_{N}\rangle).

The success probability is at least 1δ1-\delta by using 𝒪(ε~2logδ1)\mathcal{O}(\widetilde{\varepsilon}^{-2}\log\delta^{-1}) queries of 1U~\wedge_{1}\widetilde{U}.

Concerning the proof of Proposition 3 it is straightforward to check that the expectation of the observable 𝕄^\hat{\mathbb{M}} is given by

Tr[𝕄^|ΦfinalΦfinal|]={Re[IN|^|ρss](𝒩DM)S/2,ζ=1,Im[IN|^|ρss](𝒩DM)S/2,ζ=i.\textrm{Tr}[\hat{\mathbb{M}}|\Phi_{\textrm{final}}\rangle\langle\Phi_{\textrm{final}}|]=\left\{\begin{aligned} \frac{\textrm{Re}[\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle]}{(\mathcal{N}_{D}M)^{S/2}},~{}~{}\zeta=1,\\ \frac{\textrm{Im}[\langle I_{N}|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle]}{(\mathcal{N}_{D}M)^{S/2}},~{}~{}\zeta=i.\end{aligned}\right. (28)

In particular, by setting ^=IN\hat{\mathcal{M}}=I_{N}, the measurement returns to the quantity Tr[ρss]=IN|ρss\textrm{Tr}[\rho_{\textrm{ss}}]=\langle I_{N}|\rho_{\textrm{ss}}\rangle.

The above strategies do not require the prior knowledge of the spectrum of ρ\rho obtained by quantum phase estimate liang2019quantum and quantum state tomography cramer2010efficient . Thus our approach is experimentally friendly in near-term quantum devices.

III.4 Computational complexity and error analysis

In this section we present the resource complexity and error analysis. The computation complexity contains (1) the gate complexity, the number of the basic quantum gates (single and two qubit gates); (2) the qubit complexity, the number of qubits.

Proposition 4. Concerning the computational complexity of the preparation of |ρss|\rho_{\textrm{ss}}\rangle, the gate complexity of finding the NESS is 𝒪(nMm~2)\mathcal{O}(nM\widetilde{m}^{2}), where MM is the number of decomposition terms of the non-unitary gradient operator DD and m~=logM\widetilde{m}=\log M. The qubit complexity is counted as 𝒪(m~+2n)\mathcal{O}(\tilde{m}+2n) with n=logNn=\log N.

[Proof]. The dominated source of the computational complexity is the controlled unitary 𝒞m~(D^)\mathcal{C}_{\widetilde{m}}(\hat{D}) in Algorithm 1. The unitary 𝒞m~(D^)\mathcal{C}_{\widetilde{m}}(\hat{D}) can be simulated by a sequence of single qubit controlled gate and Toffoli gates barenco1995elementary ; Long2006Mathematical ; Wen2020One ; xin2017quantum ; wei2018efficient . Specifically, performing Algorithm 1 one time requires MM controlled unitary operator m~D^\wedge_{\widetilde{m}}\hat{D}. Thus the circuit depth of obtaining NESS is 𝒪(M)\mathcal{O}(M). Under the Pauli decomposition of DD, the controlled unitary operations m~D^\wedge_{\widetilde{m}}\hat{D} can always be rewritten as 𝒪(n)\mathcal{O}(n) multi-qubit-controlled Pauli operators m~U\wedge_{\widetilde{m}}U, U{X,Y,Z}U\in\{X,Y,Z\}. A general m~U\wedge_{\widetilde{m}}U for any unitary 2×22\times 2 matrix UU can be approximately simulated by a network (Fig. 2.a) including of unitaries 1V\wedge_{1}V, 1V\wedge_{1}V^{{\dagger}} and the Toffoli gate TT barenco1995elementary . The number of basic operators scales to Θ(m~+1)\Theta(\widetilde{m}+1). Furthermore, the Toffoli gate TT on m~1\widetilde{m}-1 qubits can be decomposed into 𝒪(m~1)\mathcal{O}(\widetilde{m}-1) single-qubit and CNOT gates. The unitary operators 1V\wedge_{1}V and 1V\wedge_{1}V^{{\dagger}} can be simulated with a cost 𝒪(1)\mathcal{O}(1). Denote 𝒯m~\mathcal{T}_{\widetilde{m}} the gate complexity of decomposing m~U\wedge_{\widetilde{m}}U. We have the following recurrence relation, 𝒯m~=𝒯m~1+𝒪(1)+𝒪(m~1)\mathcal{T}_{\widetilde{m}}=\mathcal{T}_{\widetilde{m}-1}+\mathcal{O}(1)+\mathcal{O}(\widetilde{m}-1), which implies that 𝒯m~=𝒪(m~2)\mathcal{T}_{\widetilde{m}}=\mathcal{O}(\widetilde{m}^{2}). Hence, the total gate complexity of simulating 𝒞m~(D^)\mathcal{C}_{\widetilde{m}}(\hat{D}) is roughly

𝒯total=𝒪(nMm~2)=𝒪(logNlogN(loglogN)2).\displaystyle\mathcal{T}_{\textrm{total}}=\mathcal{O}(nM\widetilde{m}^{2})=\mathcal{O}(\log N\cdot\log N\cdot(\log\log N)^{2}).

As shown in Fig. (1.a), the register 2 contains 2n2n qubits used to store the NESS and the state |IN|I_{N}\rangle. The ancillary system requires m~\widetilde{m} qubits determined by MM. Thus the total qubit complexity scales to 𝒪(m~+2n)\mathcal{O}(\widetilde{m}+2n). \Box

Proposition 5. Concerning the computational complexity of estimating the expectation value \langle\mathcal{M}\rangle, the gate and the qubit complexity are 𝒪(poly(n)+nMm~2)\mathcal{O}(\textrm{poly}(n)+nM\widetilde{m}^{2}) and 𝒪(2n)\mathcal{O}(2n) (𝒪(nMm~2)\mathcal{O}(nM\widetilde{m}^{2}) and 𝒪(m~+2n)\mathcal{O}(\widetilde{m}+2n)) for strategy 1 (strategy 2), respectively.

[Proof]. For both strategies, it is direct to check that the qubit complexity scales to 𝒪(2n)\mathcal{O}(2n) and 𝒪(m~+2n)\mathcal{O}(\widetilde{m}+2n). The gate complexity for strategy 1 is determined by the parameterized quantum circuit 𝒰(𝜶)\mathcal{U}(\bm{\alpha}^{*}) which requires 𝒪(poly(n))\mathcal{O}(\textrm{poly}(n)) basic quantum gates HardwareVQE2017 ; liang2020variational . Therefore, by using the result of Proposition 4, the total gate complexity for strategy 1 is 𝒪(poly(n)+nMm~2)\mathcal{O}(\textrm{poly}(n)+nM\widetilde{m}^{2}). For strategy 2, we only require to perform the Algorithm 1 to prepare the state |Φfinal|\Phi_{\textrm{final}}\rangle. According to Propositions 3 and 4, we obtain the gate complexity 𝒪(nMm~2)\mathcal{O}(nM\widetilde{m}^{2}). \Box

Now we determine the upper bound of the error after SS time iterations. Suppose that the Algorithm 1 runs accurate enough such that

|f(|ρ~ss)|=|ρ~ss||ρ~ss|ε.\displaystyle|f(|\widetilde{\rho}_{\textrm{ss}}\rangle)|=|\langle\widetilde{\rho}_{\textrm{ss}}|\mathcal{H}^{{\dagger}}\mathcal{H}|\widetilde{\rho}_{\textrm{ss}}\rangle|\leq\varepsilon. (29)

Let |ρss|\rho_{\textrm{ss}}\rangle be the normalized ideal NESS and |ρ~ss=|ρS|\widetilde{\rho}_{\textrm{ss}}\rangle=|\rho^{S}\rangle the actual state.

Proposition 6. Denote τ12=|ϕ1|ρ(0)|2\tau_{1}^{2}=|\langle\phi_{1}|\rho^{(0)}\rangle|^{2} the overlap between an initial state |ρ(0)|\rho^{(0)}\rangle and the state |ϕ1|\phi_{1}\rangle is the largest eigenstate of operator DD. The approximation error ε\varepsilon has an upper bound

κ(1τ12)τ12(δ2δ1)2S\frac{\kappa(1-\tau_{1}^{2})}{\tau_{1}^{2}}\Big{(}\frac{\delta_{2}}{\delta_{1}}\Big{)}^{2S}

scaling with τ12\tau_{1}^{2}, iterations SS, the gap between largest and lowest eigenvalues of \mathcal{H}^{{\dagger}}\mathcal{H}, κ=λmaxλ1\kappa=\lambda_{\textrm{max}}-\lambda_{1}. δ1\delta_{1} and δ2\delta_{2} are the two largest eigenstates of the operator DD.

[Proof]. Consider the eigenvalue decomposition of the hermitian matrix D=r=1N2δr|ϕrϕr|D=\sum_{r=1}^{N^{2}}\delta_{r}|\phi_{r}\rangle\langle\phi_{r}| with the eigenvalues arranged in order, δ1δ2δN2=δmin0\delta_{1}\geq\delta_{2}\geq\cdots\geq\delta_{N^{2}}=\delta_{\textrm{min}}\geq 0. The eigenvalues of \mathcal{H}^{{\dagger}}\mathcal{H} are then λr=(1δr)/2γ\lambda_{r}=(1-\delta_{r})/2\gamma, λ1λ2λN2=λmax\lambda_{1}\leq\lambda_{2}\leq\cdots\leq\lambda_{N^{2}}=\lambda_{\textrm{max}}. We express the initial state |ρ(0)|\rho^{(0)}\rangle in the basis of the eigenvectors {|ϕr}\{|\phi_{r}\rangle\},

|ρ(0)=r=1N2τr|ϕr,r|τr|2=1,|\rho^{(0)}\rangle=\sum_{r=1}^{N^{2}}\tau_{r}|\phi_{r}\rangle,~{}~{}~{}\sum_{r}|\tau_{r}|^{2}=1, (30)

with τr\tau_{r} some coefficients. After applying the non-unitary operator DD to |ρ(0)|\rho^{(0)}\rangle SS times, we have

DS|ρ(0)\displaystyle D^{S}|\rho^{(0)}\rangle =r=1N2τrδrS|ϕr\displaystyle=\sum_{r=1}^{N^{2}}\tau_{r}\delta_{r}^{S}|\phi_{r}\rangle
=δ1Sr=1N2τr(δrδ1)S|ϕr.\displaystyle=\delta_{1}^{S}\sum_{r=1}^{N^{2}}\tau_{r}\Big{(}\frac{\delta_{r}}{\delta_{1}}\Big{)}^{S}|\phi_{r}\rangle. (31)

As limS(δr/δ1)S=0\lim_{S\rightarrow\infty}(\delta_{r}/\delta_{1})^{S}=0 for all rr, for larger SS we can approximate the ground state of \mathcal{H}^{{\dagger}}\mathcal{H} as

|ρss|ρ~ss=|ρS=1C(S)DS|ρ(0),|\rho_{ss}\rangle\approx|\widetilde{\rho}_{ss}\rangle=|\rho^{S}\rangle=\frac{1}{\sqrt{C^{(S)}}}D^{S}|\rho^{(0)}\rangle, (32)

where the normalization constant

C(S)=ρ(0)|DSDS|ρ(0)=δ12Sr=1N2τr2(δrδ1)2S|ϕr.\displaystyle C^{(S)}=\langle\rho^{(0)}|D^{S{\dagger}}D^{S}|\rho^{(0)}\rangle=\delta_{1}^{2S}\sum_{r=1}^{N^{2}}\tau_{r}^{2}\Big{(}\frac{\delta_{r}}{\delta_{1}}\Big{)}^{2S}|\phi_{r}\rangle. (33)

The error satisfies

ε\displaystyle\varepsilon =|f(|ρ~ss)f(|ρss)|\displaystyle=|f(|\widetilde{\rho}_{ss}\rangle)-f(|\rho_{ss}\rangle)|
=|r=2N2τr2(λrλ1)(δr/δ1)2Sr=1N2τr2(δr/δ1)2S|\displaystyle=\Bigg{|}\frac{\sum_{r=2}^{N^{2}}\tau_{r}^{2}(\lambda_{r}-\lambda_{1})(\delta_{r}/\delta_{1})^{2S}}{\sum_{r=1}^{N^{2}}\tau_{r}^{2}(\delta_{r}/\delta_{1})^{2S}}\Bigg{|}
κ|r=2N2τr2(δr/δ1)2Sr=1N2τr2(δr/δ1)2S|\displaystyle\leq\kappa\Bigg{|}\frac{\sum_{r=2}^{N^{2}}\tau_{r}^{2}(\delta_{r}/\delta_{1})^{2S}}{\sum_{r=1}^{N^{2}}\tau_{r}^{2}(\delta_{r}/\delta_{1})^{2S}}\Bigg{|}
κτ12r=2N2τr2(δr/δ1)2S\displaystyle\leq\frac{\kappa}{\tau_{1}^{2}}\sum_{r=2}^{N^{2}}\tau_{r}^{2}(\delta_{r}/\delta_{1})^{2S}
κτ12(δ2/δ1)2Sr=2N2τr2\displaystyle\leq\frac{\kappa}{\tau_{1}^{2}}(\delta_{2}/\delta_{1})^{2S}\sum_{r=2}^{N^{2}}\tau_{r}^{2}
=κ(1τ12)τ12(δ2δ1)2S.\displaystyle=\frac{\kappa(1-\tau_{1}^{2})}{\tau_{1}^{2}}\Bigg{(}\frac{\delta_{2}}{\delta_{1}}\Bigg{)}^{2S}. (34)

Therefore, the approximation error ε\varepsilon has an upper bound 𝒪(κ(1τ12)τ12(δ2/δ1)2S)\mathcal{O}(\frac{\kappa(1-\tau_{1}^{2})}{\tau_{1}^{2}}(\delta_{2}/\delta_{1})^{2S}) scaling with SS, τ12\tau_{1}^{2} and κ=λmaxλ1\kappa=\lambda_{\textrm{max}}-\lambda_{1}. \Box

The above error bound shows that the convergence is geometric with ratio δ2/δ1\delta_{2}/\delta_{1}. This implies that the Algorithm 1 would converge slowly if an eigenvalue is close to the dominant eigenvalue of the operator DD. Hence, one should choose an the initial state |ρ(0)|\rho^{(0)}\rangle with a larger overlap |ϕ1|ρ(0)|2|\langle\phi_{1}|\rho^{(0)}\rangle|^{2}.

The estimation error of the expectation value \langle\mathcal{M}\rangle after SS time iterations is bounded by a function g(ε)g(\varepsilon),

E\displaystyle E =|~|\displaystyle=|\widetilde{\langle\mathcal{M}\rangle}-\langle\mathcal{M}\rangle|
=|I|^|ρ~ssI|ρ~ssI|^|ρssI|ρss|g(ε),\displaystyle=\Bigg{|}\frac{\langle I|\hat{\mathcal{M}}|\widetilde{\rho}_{\textrm{ss}}\rangle}{\langle I|\widetilde{\rho}_{\textrm{ss}}\rangle}-\frac{\langle I|\hat{\mathcal{M}}|\rho_{\textrm{ss}}\rangle}{\langle I|\rho_{\textrm{ss}}\rangle}\Bigg{|}\leq g(\varepsilon), (35)

where ~\widetilde{\langle\mathcal{M}\rangle} denotes the approximation result of \langle\mathcal{M}\rangle. Clearly g(ε)g(\varepsilon) goes to zero if ε=0\varepsilon=0.

IV QGD for linear algebra problems

In this section, we focus on implementing the QGD algorithm to tackle the linear algebra problems such as solving linear equations and preparing the matrix-vector multiplication states. The core of our strategy is to transform these problems to the simulation of a well-defined Hamiltonian system.

IV.1 QGD for linear equations

Given a sparse matrix AN×NA\in\mathbb{R}^{N\times N} and a state vector |b|b\rangle. The problem is to solve the linear equation A|x=|bA|x\rangle=|b\rangle. Here, if AA is not hermitian, one can always transform the problem into an equivalent one with hermitian matrix A~=|01|A+|10|A\tilde{A}=|0\rangle\langle 1|\otimes A+|1\rangle\langle 0|\otimes A^{\dagger}. The solution can be expressed as |x=A1|bA1|b|x\rangle=\frac{A^{-1}|b\rangle}{\|A^{-1}|b\rangle\|}. We define the Hamiltonian Subasi2019Quantum ,

HA=(XA)(I2N|+,b+,b|)(XA),\displaystyle H_{A}=(X\otimes A)(I_{2N}-|+,b\rangle\langle+,b|)(X\otimes A), (36)

where the state |+,b=12(|0+|1)|b|+,b\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)\otimes|b\rangle. It is easy to check that |+,x|+,x\rangle is the ground state of the Hamiltonian HAH_{A} with ground energy 0, HA(|+A1|b)=HA|+,x=0H_{A}(|+\rangle\otimes A^{-1}|b\rangle)=H_{A}|+,x\rangle=0. It is worthwhile to notice that the Hamiltonian HAH_{A} has another different form, HA=A(I|bb|)AH_{A}=A^{{\dagger}}(I-|b\rangle\langle b|)A, as suggested in Xu2020Variational ; LiuWu2021Variational . It can be verified that the solution |x|x\rangle is the unique eigenstate associated with the minimum eigenvalue zero of HAH_{A}.

Concerning the quantum setting in solving the linear equations, let A=i=0KA1aiA[i]A=\sum_{i=0}^{K_{A}-1}a_{i}A[i] be an efficient Pauli decomposition of the matrix AA, where ai>0a_{i}>0, KA=𝒪(poly(n))K_{A}=\mathcal{O}(poly(n)), n=logNn=\log N and A[i]A[i] are Pauli strings. For classically access to the right-hand side vector we also assume that |bb|=i=0Kb1bib[i]|b\rangle\langle b|=\sum_{i=0}^{K_{b}-1}b_{i}b[i] is an efficient Pauli decomposition of the hermitian matrix |bb||b\rangle\langle b|, with bi>0b_{i}>0, Kb=𝒪(poly(n))K_{b}=\mathcal{O}(poly(n)) and b[i]b[i] the Pauli strings. The Hamiltonian HAH_{A} can then be efficiently encoded,

HA=(XA)(I2NX+I22|bb|)(XA).\displaystyle H_{A}=(X\otimes A)(I_{2N}-\frac{X+I_{2}}{2}\otimes|b\rangle\langle b|)(X\otimes A). (37)

In order to search the ground state of Hamiltonian HAH_{A}, we define the objective function as

f(y)=y|HA|y.f(y)=\langle y|H_{A}|y\rangle. (38)

It is clear that the minimum of f(y)f(y) is the desired result with respect to |y=|+|x|y\rangle=|+\rangle\otimes|x\rangle. The gradient of the objective function is given by

f(y)=2HA|y=𝒢A|y.\nabla f(y)=2H_{A}|y\rangle=\mathcal{G}_{A}|y\rangle. (39)

Thus the gradient descent iteration can be regraded as the evolution of |y(t)|y^{(t)}\rangle under the operator HAH_{A},

|y(s+1)\displaystyle|y^{(s+1)}\rangle :=|y(s)γf(|y(s))=DA|y(s),\displaystyle:=|y^{(s)}\rangle-\gamma\nabla{f(|y^{(s)}\rangle)}=D_{A}|y^{(s)}\rangle, (40)

where γ\gamma is the learning rate, DA=I2Nγ𝒢AD_{A}=I_{2N}-\gamma\mathcal{G}_{A}. Hence, the gradient descent iteration can be also viewed as an evolution of |y(s)|y^{(s)}\rangle under the non-unitary operator DAD_{A}. DAD_{A} consists of a polynomial number (with respect to the number of qubits) of tensor products of local Pauli strings, DA=m=0M1dmD^A[m]D_{A}=\sum_{m=0}^{M-1}d_{m}\hat{D}_{A}[m]. DAD_{A} cannot be implemented directly in quantum circuits as it is not unitary. Such non-unitary evolution can be realized in unitary quantum circuits by adding additional qubits Long2006General ; Cao2010Restricted . We use the following four steps to achieve the iterative process, see Fig. (1.b).

Step 1. Prepare the initial state. The register contains a work system and an ancillary system. At first, one picks an initial vector y(0)=(y0(0),y1(0),,y2N1(0))Ty^{(0)}=(y_{0}^{(0)},y_{1}^{(0)},\cdots,y_{2N-1}^{(0)})^{T}. The (n+1)(n+1)-qubit quantum input state |y(0)=i=02N1yi(0)y(0)|i|y^{(0)}\rangle=\sum_{i=0}^{2N-1}\frac{y_{i}^{(0)}}{\|y^{(0)}\|}|i\rangle can be prepared by, for instance, employing the amplitude encoding. This encoding uses (n+1)(n+1)-qubit to represent vector y(0)y^{(0)} and requires resources that are polynomial in the number of qubits, 𝒪(poly(n+1))\mathcal{O}(poly(n+1)) if the norm of y(0)\|y^{(0)}\| can be efficiently computed Grover2002Creating ; Soklakov2006Efficient . Note that the exact decomposition of universal gate preparing a general state |y(0)|y^{(0)}\rangle requires the CNOT gate complexity 𝒪(N)\mathcal{O}(N) Bergholm2005Quantum ; Plesch2011Quantum . Another state preparation approach is the quantum random access memory which consumes 𝒪(poly(n))\mathcal{O}(poly(n)) queries to the oracle that access the element of y(0)y^{(0)} Giovannetti2008Architectures .

In our iteration algorithm, we only need an easily prepared quantum state, i.e., tensor product state |y(0)=|00|y^{(0)}\rangle=|0\cdots 0\rangle. Then we add m~=logM\widetilde{m}=\log M qubits and prepare the state m=0M1dm𝒩DA|m\sum_{m=0}^{M-1}\frac{d_{m}}{\sqrt{\mathcal{N}_{D_{A}}}}|m\rangle by applying the unitary WW given in (13), where 𝒩DA=m=0M1dm2\mathcal{N}_{D_{A}}=\sum_{m=0}^{M-1}d_{m}^{2} is the normalization constant. The state of the whole system now is

|Ψ0=m=0M1dm𝒩DA|m|y(0).\displaystyle|\Psi_{0}\rangle=\sum_{m=0}^{M-1}\frac{d_{m}}{\sqrt{\mathcal{N}_{D_{A}}}}|m\rangle|y^{(0)}\rangle. (41)

Step 2. Implement the non-unitary operator. We apply a series of ancillary controlled operators,

𝒞m~(D^A)\displaystyle\mathcal{C}_{\widetilde{m}}(\hat{D}_{A}) =m=0M1|mm|D^A[m]=m=0M1m~D^A,\displaystyle=\sum_{m=0}^{M-1}|m\rangle\langle m|\otimes\hat{D}_{A}[m]=\prod_{m=0}^{M-1}\wedge_{\widetilde{m}}\hat{D}_{A}, (42)

on the whole state space, where m~D^A=|mm|D^A[m]+q=0,qmM1|qq|IN2\wedge_{\widetilde{m}}\hat{D}_{A}=|m\rangle\langle m|\otimes\hat{D}_{A}[m]+\sum_{q=0,q\neq m}^{M-1}|q\rangle\langle q|\otimes I_{N^{2}}. The whole system state is transformed into

|Ψ1\displaystyle|\Psi_{1}\rangle =𝒞m~(D^A)|Ψ0\displaystyle=\mathcal{C}_{\widetilde{m}}(\hat{D}_{A})|\Psi_{0}\rangle
=m=0M1dm𝒩DA|mD^A[m]|y(0).\displaystyle=\sum_{m=0}^{M-1}\frac{d_{m}}{\sqrt{\mathcal{N}_{D_{A}}}}|m\rangle\otimes\hat{D}_{A}[m]|y^{(0)}\rangle. (43)

The work qubits and the ancilla qubits are now entangled.

Step 3. Combine the states from different subspaces. We perform m~\widetilde{m} Hadamard gates on the ancillary register to combine the states D^A[m]|y(0)\hat{D}_{A}[m]|y^{(0)}\rangle. The system state becomes

|Ψ2\displaystyle|\Psi_{2}\rangle =1𝒩DAM|0m~i=0M1dmD^A[m]|y(0)\displaystyle=\frac{1}{\sqrt{\mathcal{N}_{D_{A}}M}}|0^{\widetilde{m}}\rangle\sum_{i=0}^{M-1}d_{m}\hat{D}_{A}[m]|y^{(0)}\rangle
=1𝒩DAM|0m~DA|y(0)\displaystyle=\frac{1}{\sqrt{\mathcal{N}_{D_{A}}M}}|0^{\widetilde{m}}\rangle D_{A}|y^{(0)}\rangle
=1𝒩DAM|0m~|y(1).\displaystyle=\frac{1}{\sqrt{\mathcal{N}_{D_{A}}M}}|0^{\widetilde{m}}\rangle|y^{(1)}\rangle. (44)

Step 4. Measurement. After repeating the above three steps SS times, the final state of the system is of the form,

|Ψfinal\displaystyle|\Psi_{\textrm{final}}\rangle =1(𝒩DAM)S/2|0m~DAS|y(0)\displaystyle=\frac{1}{(\mathcal{N}_{D_{A}}M)^{S/2}}|0^{\widetilde{m}}\rangle D_{A}^{S}|y^{(0)}\rangle
=1(𝒩DAM)S/2|0m~|y(S).\displaystyle=\frac{1}{(\mathcal{N}_{D_{A}}M)^{S/2}}|0^{\widetilde{m}}\rangle|y^{(S)}\rangle. (45)

Then we measure the former m~\widetilde{m} qubits and obtain the classical bits string {00}\{0\cdots 0\}. The system state collapses to |y(S)|y^{(S)}\rangle which is an approximate solution of |y|y\rangle if |f(y(S))|ε|f(y^{(S)})|\leq\varepsilon. Otherwise, we repeat the overall procedures again until the convergence condition is satisfied. The success probability of obtaining the state |0m~|0^{\widetilde{m}}\rangle is given by

Psuc\displaystyle P_{\textrm{suc}} =Ψfinal|(|0m~0m~|IN)|Ψfinal\displaystyle=\langle\Psi_{\textrm{final}}|(|0^{\widetilde{m}}\rangle\langle 0^{\widetilde{m}}|\otimes I_{N})|\Psi_{\textrm{final}}\rangle
=DAS|y(0)2(𝒩DAM)S,\displaystyle=\frac{\|D_{A}^{S}|y^{(0)}\rangle\|^{2}}{(\mathcal{N}_{D_{A}}M)^{S}}, (46)

which decreases exponentially with respect to the number of iteration steps. Using amplitude amplification brassard2000quantum , we have that 𝒪(Psuc1/2)\mathcal{O}(P_{\textrm{suc}}^{-1/2}) measurements are sufficient. Clearly, the qubit complexity is 𝒪(n+1+m~)\mathcal{O}(n+1+\widetilde{m}).

IV.2 QGD for matrix-vector multiplication

Given an hermitian matrix AN×NA\in\mathbb{R}^{N\times N} and an state |b|b\rangle, our goal is to prepare the normalized state,

|y=A|bA|b.|y\rangle=\frac{A|b\rangle}{\|A|b\rangle\|}. (47)

Defining the Hamiltonian H~A=INA|bb|AA|b2\widetilde{H}_{A}=I_{N}-\frac{A|b\rangle\langle b|A^{{\dagger}}}{\|A|b\rangle\|^{2}} Xu2020Variational , one can easily check that the ground state of H~A\widetilde{H}_{A} with ground energy 0 is the state |y|y\rangle. The expectation value Φ|H~A|Φ\langle\Phi|\widetilde{H}_{A}|\Phi\rangle of H~A\widetilde{H}_{A} with respect to an arbitrary state |Φ|\Phi\rangle satisfies

Φ|H~A|Φ\displaystyle\langle\Phi|\widetilde{H}_{A}|\Phi\rangle =Φ|(INA|bb|AA|b2)|Φ\displaystyle=\langle\Phi|\Big{(}I_{N}-\frac{A|b\rangle\langle b|A^{{\dagger}}}{\|A|b\rangle\|^{2}}\Big{)}|\Phi\rangle (48)
=1|Φ|A|b|2A|b20,\displaystyle=1-\frac{|\langle\Phi|A|b\rangle|^{2}}{\|A|b\rangle\|^{2}}\geq 0, (49)

where the equality holds if and only if state |Φ|\Phi\rangle is the ground eigenstate |y|y\rangle of H~A\widetilde{H}_{A}. Hence, we define the objection function,

f(y)=y|H~A|y.f(y)=\langle y|\widetilde{H}_{A}|y\rangle. (50)

The gradient descent iteration can be regraded as an evolution of |y(s)|y^{(s)}\rangle under the operator H~A\tilde{H}_{A},

|y(s+1)\displaystyle|y^{(s+1)}\rangle :=|y(s)γf(|y(s))=D~A|y(s),\displaystyle:=|y^{(s)}\rangle-\gamma\nabla{f(|y^{(s)}\rangle)}=\widetilde{D}_{A}|y^{(s)}\rangle, (51)

where the non-unitary operator D~A=IN2γH~A\widetilde{D}_{A}=I_{N}-2\gamma\widetilde{H}_{A}. We only need to substitute the Hamiltonian HAH_{A} with H~A\widetilde{H}_{A} and apply the algorithm discussed in last subsection to find the matrix-vector multiplication state |y|y\rangle. But, here, we require n=logNn=\log N qubits to store and prepare |y|y\rangle rather than n+1n+1 qubits.

In order to estimate the normalization constant

A|b2=b|AA|b,\displaystyle\|A|b\rangle\|^{2}=\langle b|A^{{\dagger}}A|b\rangle, (52)

we assume availability of an efficient nn-qubit quantum circuit UbU_{b} such that Ub|0n=|bU_{b}|0^{n}\rangle=|b\rangle Huang2019near . The constant (52) is written as

A|b2\displaystyle\|A|b\rangle\|^{2} =m|am|2b|A[m]A[m]|b\displaystyle=\sum_{m}|a_{m}|^{2}\langle b|A^{{\dagger}}[m]A[m]|b\rangle
=m|am|20n|UbA[m]A[m]Ub|0n,\displaystyle=\sum_{m}|a_{m}|^{2}\langle 0^{n}|U_{b}^{{\dagger}}A^{{\dagger}}[m]A[m]U_{b}|0^{n}\rangle, (53)

where each term can be evaluated via the Hadamard test aharonov2008a or the measurement on the Pauli basis.

V Numerical experiments

In this section we present some examples to illustrate our approaches.

V.1 The dissipative quantum transverse Ising model

The Hamiltonian of the dissipative quantum transverse Ising model is given by

H=J4k1,k2=1nZ(k1)Z(k2)+h2k=1nX(k),\displaystyle H=\frac{J}{4}\sum_{\langle k_{1},k_{2}\rangle=1}^{n}Z^{(k_{1})}Z^{(k_{2})}+\frac{h}{2}\sum_{k=1}^{n}X^{(k)}, (54)

where X(k)X^{(k)} (Z(k))(Z^{(k)}) are the Pauli operator XX (Z)(Z) acting on the kk-th qubit. The first term denotes the nearest-neighbor spin-spin interaction depending only on the zz components with coupling strength JJ. The second term accounts for a local and uniform magnetic field along the transverse direction xx. The site-dependent jump operator (the Lindbald operator) is Lk=σ+(k)L_{k}=\sigma_{+}^{(k)}, LkT=Lk=σ(k)L_{k}^{T}=L_{k}^{{\dagger}}=\sigma_{-}^{(k)} and Lk=LkL_{k}^{*}=L_{k}, where σ±(k)=(X(k)±iY(k))/2\sigma_{\pm}^{(k)}=(X^{(k)}\pm iY^{(k)})/2. Substitute Eq. (54) into Eq. (III.1), we have for n=2n=2,

=\displaystyle\mathcal{H}= i[J4(Z(3)Z(4)Z(1)Z(2))+h2X(3412)]\displaystyle-i\Big{[}\frac{J}{4}\Big{(}Z^{(3)}Z^{(4)}-Z^{(1)}Z^{(2)}\Big{)}+\frac{h}{2}X^{(3412)}\Big{]}
+μ12(2σ+(1)σ+(3)σ(3)σ+(3)σ(1)σ+(1))\displaystyle+\frac{\mu_{1}}{2}\Big{(}2\sigma_{+}^{(1)}\sigma_{+}^{(3)}-\sigma_{-}^{(3)}\sigma_{+}^{(3)}-\sigma_{-}^{(1)}\sigma_{+}^{(1)}\Big{)}
+μ22(2σ+(2)σ+(4)σ(4)σ+(4)σ(2)σ+(2)),\displaystyle+\frac{\mu_{2}}{2}\Big{(}2\sigma_{+}^{(2)}\sigma_{+}^{(4)}-\sigma_{-}^{(4)}\sigma_{+}^{(4)}-\sigma_{-}^{(2)}\sigma_{+}^{(2)}\Big{)},

where X(3412)=X(3)+X(4)X(1)X(2)X^{(3412)}=X^{(3)}+X^{(4)}-X^{(1)}-X^{(2)}.

Refer to caption
Refer to caption
Figure 3: Numerical results of dissipative quantum transverse Ising model. (a) Error and fidelity as functions of the optimization iteration with and without noise channel. The learning rate γ=0.5\gamma=0.5. (b) Different learning rates γ=0.1,0.3,0.5,1,1.7\gamma=0.1,0.3,0.5,1,1.7.

We set J=h=1J=h=1, μ1=μ2=0.1\mu_{1}=\mu_{2}=0.1, and the initial state |ρ(0)=|+4|\rho^{(0)}\rangle=|+\rangle^{\otimes 4} with the learning rate γ=0.5\gamma=0.5, where |+=12(|0+|1)|+\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle). Because of the unavoidable errors in the operations, the non-unitary operator DD should be substituted by the noise dynamical map (D,v0)=D+v0IN2\mathcal{E}(D,v_{0})=D+v_{0}I_{N^{2}}. Consider the noise model modeled by a Gaussian noise with variance σ2=1\sigma^{2}=1 and mean ω=0\omega=0, v0𝒩(ω,σ2)v_{0}\rightarrow\mathcal{N}(\omega,\sigma^{2}). The result error is given by ε=f(|ρ(s))\varepsilon=f(|\rho^{(s)}\rangle). In Fig. 3 we compare the numerical results of that with and without Gaussian noise. When the optimization iterations increase, the error ε\varepsilon converges to the minimal value zero in both situations. It is clear that the noise error converges to zero slower than the ideal error. In particular, ε=3.57×103\varepsilon=3.57\times 10^{-3} and ε=3.65×103\varepsilon=3.65\times 10^{-3} for ideal and Gaussian noise (v0=0.05v_{0}=0.05), respectively, with iteration S=500S=500. Another quantity to evaluate our algorithm is the fidelity F=|ρ(S)|M|ρss|2F=|\langle\rho^{(S)}|M|\rho_{\textrm{ss}}\rangle|^{2}. The inset of in Fig. (3.a) illustrates that the ideal fidelity is 0.994340.99434 which is higher than the Gaussian noise fidelities 0.993490.99349 (v0=0.05v_{0}=0.05) and 0.992530.99253 (v0=0.1v_{0}=0.1), at iteration S=500S=500. Thus, the numerically behavior ensures that our algorithms are robust to Gaussian noise.

Furthermore, we compare our results with the dissipative-system variational quantum eigensolver (dVQE) yoshioka2020variational . In dVQE, the optimization of the loss function G(𝜶)=ρ(0)|U(𝜶)U(𝜶)|ρ(0)G(\bm{\alpha})=\langle\rho^{(0)}|U^{{\dagger}}(\bm{\alpha})\mathcal{H}^{{\dagger}}\mathcal{H}U(\bm{\alpha})|\rho^{(0)}\rangle starts with a same state |ρ(0)|\rho^{(0)}\rangle. The parameterized quantum circuit

U(𝜶,𝜷)=[𝒱(𝜷)𝒱(𝜷)]n=12CNOTn,n+2[𝒰(𝜶)I4],\displaystyle U(\bm{\alpha},\bm{\beta})=\Big{[}\mathcal{V}(\bm{\beta})\otimes\mathcal{V}^{*}(\bm{\beta})\Big{]}\prod_{n=1}^{2}\textrm{CNOT}_{n,n+2}\Big{[}\mathcal{U}(\bm{\alpha})\otimes I_{4}\Big{]},

where

𝒰(𝜶)=\displaystyle\mathcal{U}(\bm{\alpha})= [Ry(α1)Ry(α2)]𝒞1Ry(α3)×\displaystyle\Big{[}R_{y}(\alpha_{1})\otimes R_{y}(\alpha_{2})\Big{]}\mathcal{C}_{1}R_{y}(\alpha_{3})\times
[Ry(α4)Ry(α5)]𝒞1Ry(α6)\displaystyle\Big{[}R_{y}(\alpha_{4})\otimes R_{y}(\alpha_{5})\Big{]}\mathcal{C}_{1}R_{y}(\alpha_{6}) (55)

and

𝒱(𝜷)=\displaystyle\mathcal{V}(\bm{\beta})= [Ry(β1)Rx(β2)Ry(β3)Rx(β4)]𝒞1Z×\displaystyle\Big{[}R_{y}(\beta_{1})R_{x}(\beta_{2})\otimes R_{y}(\beta_{3})R_{x}(\beta_{4})\Big{]}\mathcal{C}_{1}Z\times
[Ry(β5)Rx(β6)Ry(β7)Rx(β8)]𝒞1Z×\displaystyle\Big{[}R_{y}(\beta_{5})R_{x}(\beta_{6})\otimes R_{y}(\beta_{7})R_{x}(\beta_{8})\Big{]}\mathcal{C}_{1}Z\times
[Ry(β9)Rx(β10)Ry(β11)Rx(β12)].\displaystyle\Big{[}R_{y}(\beta_{9})R_{x}(\beta_{10})\otimes R_{y}(\beta_{11})R_{x}(\beta_{12})\Big{]}. (56)

The rotation operator Ry(αi)=eiαi/2YR_{y}(\alpha_{i})=e^{-i\alpha_{i}/2Y}, 𝒞1Z=|00|I2+|00|Z\mathcal{C}_{1}Z=|0\rangle\langle 0|\otimes I_{2}+|0\rangle\langle 0|\otimes Z, and 𝒱(𝜷)\mathcal{V}^{*}(\bm{\beta}) denotes the complex conjugate of 𝒱(𝜷)\mathcal{V}(\bm{\beta}). We apply the classical gradient descent algorithm to optimize the 1818 variational parameters. As shown in Fig. (3.a), our results converge faster than dVQE. The minimal error of dVQE is ε=7.082×103\varepsilon=7.082\times 10^{-3} compared with our results 3.57×1033.57\times 10^{-3} (ideal result) or 3.65×1033.65\times 10^{-3} (Gaussian noise, v0=0.05v_{0}=0.05) at step S=46S=46.

Finally, we perform numerical simulation under different learning rates. As shown in Fig. (3.b), the result error does not converge to the minimal value when γ>1.7\gamma>1.7. So we should choose the proper learning rate in practical situation.

V.2 Example for matrix-vector multiplication

We now consider the linear equation A|x=|bA|x\rangle=|b\rangle with

A=0.9Z(1)Z(2)+0.3692X(2)+0.1112X(1),\displaystyle A=0.9Z^{(1)}Z^{(2)}+0.3692X^{(2)}+0.1112X^{(1)}, (57)

and |b=|0n|b\rangle=|0^{n}\rangle. Let us consider the case of n=3n=3 and the initial state |x(0)=|+n|x^{(0)}\rangle=|+^{n}\rangle with learning rate γ=0.3\gamma=0.3, where |+=12(|0+|1)|+\rangle=\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle). The defined Hamiltonian HAH_{A} is then encoded in a 44-qubit system. As |bb|=18(X+Z)3|b\rangle\langle b|=\frac{1}{8}(X+Z)^{3}, HAH_{A} can be expressed as HA=(XA)(I2N116(X+I)(X+Z)3)(XA)H_{A}=(X\otimes A)(I_{2N}-\frac{1}{16}(X+I)\otimes(X+Z)^{3})(X\otimes A). As a result, the non-unitary operator DAD_{A} also has similarly an Pauli decomposition.

With the growth of the number of iterations, Fig. (4) shows that the error ε\varepsilon of our approach can converges to the local minimum of the objective function. In particular, the fidelity F=0.999F=0.999 and the error ε=1.4475×1015\varepsilon=1.4475\times 10^{-15} when S=20S=20. Even at the presence of Gaussian noise (v0=0.5v_{0}=0.5), our result still approaches the ideal value, ε=4.585×109\varepsilon=4.585\times 10^{-9} and F=0.9999F=0.9999 when S=20S=20. For a comparison we calculate the ground state of HAH_{A} by using VQE peruzzo2014variational . As shown in Fig. (4), our result converges faster than that obtained from the VQE.

Refer to caption
Figure 4: Numerical results of matrix-vector multiplication. The relations among the error ε\varepsilon, the fidelity FF and the number of iterations.

VI Conclusion and Discussion

In conclusion, based on the quantum gradient descent algorithm we have presented a quantum approach for the (nondegenerate) nonequilibrium steady state problem of open quantum systems. Our method is scalable since the gate and the qubit complexity is polynomial functions of the size of open quantum systems. Capturing the characteristic property of NESS, we introduced two strategies to evaluate the expectation value of the interested physical observable associated with the output state given by vector forms of the density matrix ρss\rho_{\textrm{ss}}. Furthermore, we have adapted the quantum gradient descent algorithm to solve linear algebra problems including linear equation and matrix-vector multiplications. The basic idea is to convert the linear algebra problems into the simulation of a closed quantum system with a well-defined Hamiltonian. Our quantum linear solver may also serve as a subroutine in solving the Poisson equations with Dirichlet boundary conditions LiuWu2021Variational . On the one hand, the whole optimization procedures of our methods are implemented on a quantum computer. On the other hand, our approach does not need to perform measurements for the expectation values of the Hamiltonian, neither the classical optimization feedbacks, compared with the recent works yoshioka2020variational ; Liu2021Variational . Thus the computational complexity is substantially reduced. Furthermore, different from that the VQAs optimize the cost function in the parameter space, our algorithms optimize the cost function on the original state space. With the increase of the iteration, our algorithm can always obtain a better approximation of the NESS or ground state. Thus another advantage of our strategies is that the barren plateaus do not appear in the quantum gradient descent procedure.

This work focused on the first-order optimization method, but the second-order optimization method (the Newton method) Li2021Quantum may also be used in the preparation of NESS. Aside from the preparation of NESS, it is possible to simulate the dynamics of quantum open systems on a double-dimension Hilbert space. Our approaches highlight the fact that a non-unitary operator composing of local unitary terms may be implemented on NISQ devices. Motivated by the idea of quantum imaginary time evolution Mcardle2019Variational ; Motta2020Determining , approximate simulation of non-unitary evolutions may be possible with a parameterized quantum circuit. Once the optimal parameters are learned, the non-unitary evolution can be carried out by a low-depth quantum circuit which is amenable for NISQ devices. One of the advantages of this strategy is that no any other ancillary systems are required compared with the existing schemes.


Acknowledgements: We would like to thank Dong Liu and Qiao-Qiao Lv for their helpful suggestions and discussions. This work is supported by NSF of China (Grant No. 12075159, 12171044), Beijing Natural Science Foundation (Z190005), Academy for Multidisciplinary Studies, Capital Normal University, the Academician Innovation Platform of Hainan Province, and Shenzhen Institute for Quantum Science and Engineering, Southern University of Science and Technology (No. SIQSE202001). The National Natural Science Foundation of China under Grants No. 12005015.

References