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

Quantum Gaussian process regression

Meng-han Chen1    Song Lin2 Corresponding author. Email address: [email protected]    Gong-De Guo1    Jing Li1 1College of Mathematics and Informatics, Fujian Normal University, Fuzhou 350117, China
2Digital Fujian Internet-of-Things Laboratory of Environmental Monitoring, Fujian Normal University, Fuzhou 350117, China
Abstract

In this paper, a quantum algorithm based on gaussian process regression model is proposed. The proposed quantum algorithm consists of three sub-algorithms. One is the first quantum sub-algorithm to efficiently generate mean predictor. The improved HHL algorithm is proposed to obtain the sign of outcomes. Therefore, the terrible situation that results is ambiguous in terms of original HHL algorithm is avoided, which makes whole algorithm more clear and exact. The other is to product covariance predictor with same method. Thirdly, the squared exponential covariance matrices are prepared that annihilation operator and generation operator are simulated by the unitary linear decomposition Hamiltonian simulation and kernel function vectors is generated with blocking coding techniques on covariance matrices. In addition, it is shown that the proposed quantum gaussian process regression algorithm can achieve quadratic faster over the classical counterpart.

Quantum gaussian process regression, non-sparse hamiltonian simulation, harmonic oscillator, quadratic acceleration
pacs:
03.67.Dd, 03.65.Ta, 03.67.Hk
preprint: APS/123-QED

I Introduction

As a subfield at the intersection of computer science and statistics, building a system known as machine learning that is adaptive and able to learn from experience, which has attracted researchers from many fields. However, with the rapid development of information technology, the total amount of global data grows exponentially every year, which makes classical machine learning algorithm will face great challenges in computing performance when processing big data in the future. Quantum computing uses the basic characteristics of quantum mechanics (such as quantum superposition and quantum entanglement) to achieve computing tasks and has a significant speed advantage over classical computing in solving some specific problems [1, 2]. For example, Shor’s quantum factoring algorithm has an exponential acceleration over the classical algorithm [3], posing a serious threat to the security of RSA cryptographic system which is widely used. In recent years, quantum computing has been applied to the field of machine learning. A variety of efficient quantum machine learning algorithms have been proposed, such as quantum clustering analysis [4, 5], quantum neural network [6, 7], quantum classification [8, 9], quantum decision tree [10], quantum association rules [11] and so on. The researches of quantum algorithm and the exploration of the realization method of quantum mechanical properties in the algorithm field can make the further development of artificial intelligence algorithms [12]. Therefore, it is significantly important to combine quantum information with machine learning to come up with more efficient quantum algorithms [13].

One of most positive directions in machine learning is the development of practical Bayesian approaches to solve real challenging problems [14]. Among them, gaussian process is one of most important Bayesian machine learning methods, which is based on a particularly efficient method to place a priori function on the function space. Gaussian process regression was proposed by Carl E. Rasmussen and scholar Christopher K. I. Williams in 1995 [15], aiming at using gaussian process priori to the process regression analysis of data. The model hypothesis includes noise (regression residual) and gaussian process priori. Its solution is carried out according to bayesian inference without limiting the form of its kernel function. It can be used in the fields of time series analysis, image processing and automatic control [16, 17] in terms of convenience. Therefore, this paper attempts to combine gaussian process regression with quantum information and proposes the quantum gaussian process regression.

The rest of this paper is organized as follows. The second section is a review of classical gaussian process regression. The third section introduces quantum gaussian process. The time complexity analysis of quantum algorithm is given in the fourth chapter, The article is ended in the fifth section with a concluding remark.

II A review of classical gaussian process regression

In the simple regression model, a training dataset DD with M\mathit{M} data points (xi,yi)i=1M\left({\vec{x}_{i},y_{i}}\right)_{i=1}^{M} is given, where xi=(xi1,xi2,,xiN)TRN\vec{x}_{i}=\left({x_{i1},x_{i2},...,x_{iN}}\right)^{T}\in R^{N} is a column vector of independent input variables and yiy_{i} is the corresponding scalar of single output variable. The goal of gaussian process regression is to train a linear function y=f(x)+εy=f\left({\vec{x}}\right)+\varepsilon in a limited set of training dataset DD that can fit the relationship between xi\vec{x}_{i} and yiy_{i} as well as possible, where f(x)f\left({\vec{x}}\right) is real value, yy is desired value and εN(0,σM2)\varepsilon\sim{\rm N}\left({0,\sigma_{M}^{2}}\right) is identically distributed gaussian noise which is independent. Once obtained, ff can be used to predict the output f(x)f\left({\vec{x}_{*}}\right) of a new input data x{\vec{x}_{*}}.

A gaussian process regression model is fully specified by a mean function m(x)m\left({\vec{x}}\right) and a covariance function (also known as a kernel) k(x,x)k\left({\vec{x},\vec{x}^{\prime}}\right). In 2005, Rasmussen and Williams [18] pointed that these two functions can be obtained in terms of weight-space view and function-space view, expressions are as follows,

m(x)=E[f(x)],m\left({\vec{x}}\right)=E\left[{f\left({\vec{x}}\right)}\right], (1)
k(x,x)=E[(f(x)m(x))(f(x)m(x))],k\left({\vec{x},\vec{x}^{\prime}}\right)=E\left[{\left({f\left({\vec{x}}\right)-m\left({\vec{x}}\right)}\right)\left({f\left({\vec{x}^{\prime}}\right)-m\left({\vec{x}^{\prime}}\right)}\right)}\right], (2)

where EE denotes expectation value. Thus, gaussian process regression can be written as f(x)gp(m(x),k(x,x))f\left({\vec{x}}\right)\sim gp\left({m\left({\vec{x}}\right),k\left({\vec{x},\vec{x}^{\prime}}\right)}\right). Here, gpgp means gaussian process. Generally, classical gaussian process regression specified covariance function as squared exponential covariance function [18], which is denoted as

cov(f(xp,xq))=k(xp,xq)=exp(12|xpxq|2).{\mathop{\rm cov}}\left({f\left({\vec{x}_{p},\vec{x}_{q}}\right)}\right)=k\left({\vec{x}_{p},\vec{x}_{q}}\right)=\exp\left({-{\textstyle{1\over 2}}\left|{\vec{x}_{p}-\vec{x}_{q}}\right|^{2}}\right). (3)

Therefore, the central goal in gaussian process regression models is to predict the mean value and the covariance value of this distribution, also known as mean predictor f¯{{\bar{f}}}_{\rm{*}} and variance predictor V[f]V\left[{f_{*}}\right]. The deduction is presented in Ref.[18], through deduction, mean predictor and variance predictor can be re-expressed as

f¯=kT(K+σM2I)1y,{{\bar{f}}}_{{*}}={{\vec{k}}}_{*}^{T}\left({K+\sigma_{M}^{2}I}\right)^{-1}\vec{y}, (4)
V[f]=k(x,x)kT(K+σM2I)1k,V\left[{f_{*}}\right]=k\left({x_{*},x_{*}}\right)-{{\vec{k}}}_{*}^{T}\left({K+\sigma_{M}^{2}I}\right)^{-1}{{\vec{k}}}_{*}, (5)

where k{{\vec{k}}}_{*} is a vector that represents the kernel function of a test point x\vec{x}_{*} and all training points x{\vec{x}}’s; KK denotes a covariance matrix of M×MM\times M dimension, that is calculation between MM training datas; k(x,x)k\left({x_{*},x_{*}}\right) is covariance of test point x\vec{x}_{*} and itself, which is a constant. Taking Eq. (4) as a linear combination of MM kernel functions, each of them is centered on training point, thus, Eq. (4) can be written as

f¯(x)=i=1Mαik(xi,x),\bar{f}\left({\vec{x}_{*}}\right)=\sum\limits_{i=1}^{M}{\alpha_{i}k\left({\vec{x}_{i},\vec{x}_{*}}\right)}, (6)

here α=(K+σM2I)1y\vec{\alpha}=\left({K+\sigma_{M}^{2}I}\right)^{-1}{{\vec{y}}},

Then, we introduce the realization process of gaussian process distribution in classical calculation. Firstly, calculating the Cholesky decomposition of L:=cholesky(K+σM2I)L:=cholesky\left({K+\sigma_{M}^{2}I}\right), thus α=LT\(L\y)\alpha=L^{T}{\rm{\backslash}}\left({{\rm{L\backslash y}}}\right). Finally, mean predictor can be computed by f¯=kTα\bar{f}_{*}={{\vec{k}}}_{{*}}^{T}\vec{\alpha}. Since the calculation of Cholesky factor is numerically stable, runtime is proportional to O(M3)O\left({M^{3}}\right). For V[f]V\left[{f_{*}}\right], let v:=L\k\vec{v}:=L{{\backslash\vec{k}}}_{\rm{*}}, thus V[f]:=k(x,x)vTvV\left[{f_{*}}\right]:=k\left({x_{*},x_{*}}\right)-{\vec{v}}^{T}\vec{v} can be computed with a number of basic arithmetrics. The computation of k(x,x)k\left({x_{*},x_{*}}\right) requires only the time of constant term. Therefore, total runtime is O(M3)O\left({M^{3}}\right). For the current era of big data, the number of input points is huge, consequently, time complexity is quite large. That’s why we want to use quantum information.

III Quantum Gaussian process regression

Observing mean predictor and variance predictor, there is an inverse process. Thus, it is easy to think of using the HHL algorithm [33] as a subroutine to get desired result. Firstly, covariance matrix KK is a real covariance matrix, hence, KK is a real symmetric matrix, namely KK is Hermitian matrix. Writing KK in the spectral decomposition form [20]

K=j=0M1λj|ujuj|,K=\sum\limits_{j=0}^{M-1}{\lambda_{j}\left|{u_{j}}\right\rangle\left\langle{u_{j}}\right|}, (7)

where {λj}j=0M1\left\{{\lambda_{j}}\right\}_{j=0}^{M-1} are the eigenvalues of KK and {|uj}j=0M1\left\{{\left|{u_{j}}\right\rangle}\right\}_{j=0}^{M{\rm{-}}1} are the corresponding eigenvector of {λj}j=0M1\left\{{\lambda_{j}}\right\}_{j=0}^{M-1}. k/k{{{{\vec{k}}}_{*}}\mathord{\left/{\vphantom{{{{\vec{k}}}_{*}}{\left\|{{{\vec{k}}}_{*}}\right\|}}}\right.\kern-1.2pt}{\left\|{{{\vec{k}}}_{*}}\right\|}} can be represented the linear combination of {|uj}j=0M1\left\{{\left|{u_{j}}\right\rangle}\right\}_{j=0}^{M{\rm{-}}1}, that is k/k=j=0M1αj|uj1{{{{\vec{k}}}_{*}}\mathord{\left/{\vphantom{{{{\vec{k}}}_{*}}{\left\|{{{\vec{k}}}_{*}}\right\|}}}\right.\kern-1.2pt}{\left\|{{{\vec{k}}}_{*}}\right\|}}=\sum\limits_{j=0}^{M-1}{\alpha_{j}\left|{u_{j}}\right\rangle_{1}}. Similarly, y/y{{\vec{y}}\mathord{\left/{\vphantom{{\vec{y}}{\left\|{\vec{y}}\right\|}}}\right.\kern-1.2pt}{\left\|{\vec{y}}\right\|}} can also be represented by {|uj}j=0M1\left\{{\left|{u_{j}}\right\rangle}\right\}_{j=0}^{M{\rm{-}}1}, namely y/y=j=0M1βj|uj1{{\vec{y}}\mathord{\left/{\vphantom{{\vec{y}}{\left\|{\vec{y}}\right\|}}}\right.\kern-1.2pt}{\left\|{\vec{y}}\right\|}}=\sum\limits_{j=0}^{M-1}{\beta_{j}\left|{u_{j}}\right\rangle_{1}}. Therefore, the expressions of Eq. (4) and Eq. (5) in the mathematical context are

f¯=αjβjλj+σM2ky,\bar{f}_{\rm{*}}{\rm{=}}\frac{{\alpha_{\rm{j}}\beta_{j}}}{{\lambda_{\rm{j}}+\sigma_{M}^{2}}}\left\|{\vec{k}_{*}}\right\|\left\|{\vec{y}}\right\|, (8)
V[f]=k(x,x)αj2λj+σM2k2.V\left[{f_{*}}\right]=k\left({x_{*},x_{*}}\right)-\frac{{\alpha_{j}^{2}}}{{\lambda_{j}{\rm{+}}\sigma_{M}^{2}}}\left\|{\vec{k}_{*}}\right\|^{2}. (9)

Next, how to get the values of Eq. (8) and Eq. (9) is described by the following quantum steps.

III.1 Preparing quantum state of y{{\vec{y}}} and k{{\vec{k}}}_{*}

The specific expression is |y1=j=0M1βj|uj1\left|{{{\vec{y}}}}\right\rangle_{\rm{1}}{\rm{=}}\sum\limits_{j=0}^{M{\rm{-}}1}{\beta_{j}\left|{\vec{u}_{j}}\right\rangle_{1}} and |k1=j=0M1αj|uj1\left|{{{\vec{k}}}_{*}}\right\rangle_{\rm{1}}{\rm{=}}\sum\limits_{j=0}^{M{\rm{-}}1}{\alpha_{j}\left|{\vec{u}_{j}}\right\rangle_{1}}. Ref. [28] pointed that the procedure of preparing quantum state |y1\left|{{{\vec{y}}}}\right\rangle_{\rm{1}} and |k1\left|{{{\vec{k}}}_{*}}\right\rangle_{\rm{1}} is as follows. Firstly, supposing that the quantum oracles OyO_{\vec{y}} and OkO_{\vec{k}_{*}} are provided, which can efficiently access the entries of y\vec{y} and k\vec{k}_{*} in time O(polylogM)O\left({{\text{poly}}\log M}\right) from quantum random access memory (QRAM) and act as Oy:|j1|0a1|j1|yja1O_{\vec{y}}:\left|j\right\rangle_{1}\left|0\right\rangle_{a1}\mapsto\left|j\right\rangle_{1}\left|{y_{j}}\right\rangle_{a1} and Ok:|j1|0b1|j1|kjb1O_{\vec{k}_{*}}:\left|j\right\rangle_{1}\left|0\right\rangle_{b1}\mapsto\left|j\right\rangle_{1}\left|{k_{*j}}\right\rangle_{b1}. Secondly, giving initial state |01|0a1\left|0\right\rangle_{1}\left|0\right\rangle_{a1} and performing the quantum Fourier transform on the first register, which gets j=0M11M|j1|0a1\sum\limits_{j=0}^{M-1}{\frac{1}{{\sqrt{M}}}\left|j\right\rangle_{1}}\left|0\right\rangle_{a1}. The quantum Fourier transform on an orthonormal basis |0,,|N1\left|0\right\rangle,...,\left|{N-1}\right\rangle is defined to be a linear operator with following action on the basis states,

|j1Nk=0N1e2πijk/N|k.\left|j\right\rangle\to\frac{1}{{\sqrt{N}}}\sum\limits_{k=0}^{N-1}{{e^{{{2\pi ijk}\mathord{\left/{\vphantom{{2\pi ijk}N}}\right.\kern-1.2pt}N}}}\left|k\right\rangle}. (10)

Thirdly, applying the oracle OyO_{\vec{y}} on j=0M11M|j1|0a1\sum\limits_{j=0}^{M-1}{\frac{1}{{\sqrt{M}}}\left|j\right\rangle_{1}}\left|0\right\rangle_{a1}, which obtains j=0M11M|j1|yja1\sum\limits_{j=0}^{M-1}{\frac{1}{{\sqrt{M}}}\left|j\right\rangle_{1}}\left|{y_{j}}\right\rangle_{a1}\textbf{}. Then, appending one qubit and performing conditioned rotation on the register a1, which gains state

j=0M11M|j1|yja1(1(yjymax)2|0a2+yjymax|1a2).\sum\limits_{j=0}^{M-1}{\frac{1}{{\sqrt{M}}}\left|j\right\rangle_{1}}\left|{y_{j}}\right\rangle_{a1}\left({\sqrt{1{\rm{-}}\left({\frac{{y_{j}}}{{\left\|{{{\vec{y}}}}\right\|_{\max}}}}\right)^{2}}\left|0\right\rangle_{{\rm{a2}}}{\rm{+}}\frac{{y_{j}}}{{\left\|{{{\vec{y}}}}\right\|_{\max}}}\left|1\right\rangle_{a2}}\right). (11)

Finally, performing inverse oracle operation and measuring the last register in the basis {|0,|1}\left\{{\left|0\right\rangle,\left|1\right\rangle}\right\}, the remainder particles are in the state j=0M1yj|j1ymax\frac{{\sum\limits_{j=0}^{M-1}{y_{j}\left|j\right\rangle_{1}}}}{{\left\|{\vec{y}}\right\|_{\max}}}, which has probability py=j=0M1yj2Mymax2=Ω(1)p_{{y}}=\frac{{\sum\limits_{j=0}^{M-1}{y_{j}^{2}}}}{{M\left\|{{{\vec{y}}}}\right\|_{\max}^{2}}}{\rm{=}}\Omega\left(1\right) (y\vec{y} and k{{\vec{k}}}_{*} are balanced). Thus, we need to perform O(1)O\left(1\right) to get |y\left|{\vec{y}}\right\rangle. Moreover, y2=j=0M1yj2=MPyymax2\left\|{\vec{y}}\right\|^{2}=\sum\limits_{j=0}^{M-1}{y_{j}^{2}}=MP_{y}\left\|{{{\vec{y}}}}\right\|_{\max}^{2} can also be estimated. The total runtime of above operation is O(polylogM)O\left({{\text{poly}}\log M}\right). In a similar way, |k\left|{{{\vec{k}}}_{*}}\right\rangle and k2\left\|{{{\vec{k}}}_{*}}\right\|^{2} can be obtained in time O(polylogM)O\left({{\text{poly}}\log M}\right).

III.2 Preparing UU operator that makes U|k|0=|φ3U\left|{{{\vec{k}}}_{*}}\right\rangle\left|0\right\rangle=\left|{\varphi_{3}}\right\rangle

Step B1 Assuming that covariance matrix KK is prepared (The detailed preparation method will be described in section E). The matrix KK is Hermitian but not necessarily sparse. Thus, the unitary linear decomposition (LCU) approach [24] is adopted to take the exponentiation of matrix. LCU means under the assumptions that the quantum oracle Ok|0logM=i=0M1ki|iO_{\vec{k}}\left|0\right\rangle^{\otimes\left\lceil{\log M}\right\rceil}=\sum\nolimits_{i=0}^{M-1}{\sqrt{k_{i}}}\left|i\right\rangle, which can be efficiently implemented in time O(polylogM)O\left({{\rm{poly}}\log M}\right) and i=0M1ki=1\sum\nolimits_{i=0}^{M-1}{k_{i}=1}\textbf{} is provided. Zhou and Wang [22] proposed that eiKte^{-iKt} can be simulated within spectral-norm error ε\varepsilon in time O(tpolylogMlog(tε)loglog(tε))O\left({\frac{{t{\text{poly}}\log M\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)}}}\right). Noted that the algorithm decomposes KK into MM linear combinations of unitary operators that can be efficiently implemented, that is K=j=0M1kjVjK=\sum\nolimits_{j=0}^{M-1}{k_{j}V_{j}}, where Vj=l=0M1|(lj+1)mod|Ml||,j=1,2,,MV_{j}=\sum\nolimits_{l=0}^{M-1}{\left|{\left({l-j+1}\right)\bmod\left|M\right\rangle\left\langle l\right|}\right|},j=1,2,...,M can be implemented using O(logM)O\left({\log M}\right) one- or two-qubit gates.

Step B2 Performing the phase estimation [32] on |k1=j=0M1αj|uj1\left|{{{\vec{k}}}_{*}}\right\rangle_{1}=\sum\limits_{j=0}^{M{\rm{-}}1}{\alpha_{j}\left|{u_{j}}\right\rangle_{1}}, we can obtain

|φ112=j=0M1αj|uj1|λj2.\left|{\varphi_{1}}\right\rangle_{{\rm{12}}}{\rm{=}}\sum\limits_{j=0}^{M{\rm{-}}1}{\alpha_{j}\left|{u_{j}}\right\rangle_{1}}\left|{\lambda_{j}}\right\rangle_{2}. (12)

Step B3 Adding an ancilla qubit |03\left|0\right\rangle_{3} and performing controlled rotation on it controlled on the second register, the state becomes

|φ2123=j=0M1αj|uj1|λj2(1(cλj+σM2)2|03+cλj+σM2|13)\begin{array}[]{l}\left|{\varphi_{2}}\right\rangle_{{\rm{123}}}{\rm{=}}\sum\limits_{j=0}^{M{\rm{-}}1}{\alpha_{j}\left|{u_{j}}\right\rangle_{1}}\left|{\lambda_{j}}\right\rangle_{2}\\ \left({\sqrt{1{\rm{-}}\left({\frac{c}{{\lambda_{j}+\sigma_{M}^{2}}}}\right)^{2}}\left|0\right\rangle_{3}+\frac{c}{{\lambda_{j}+\sigma_{M}^{2}}}\left|1\right\rangle_{3}}\right)\\ \end{array} (13)

Step B4 Performing inverse phase estimation and discarding the second register, we can get

|φ313=j=0M1αj|uj1(1(cλj+σM2)2|03+cλj+σM2|13).\begin{array}[]{l}\left|{\varphi_{3}}\right\rangle_{{\rm{13}}}{\rm{=}}\sum\limits_{j=0}^{M{\rm{-}}1}{\alpha_{j}\left|{u_{j}}\right\rangle_{1}}\\ \left({\sqrt{1{\rm{-}}\left({\frac{c}{{\lambda_{j}+\sigma_{M}^{2}}}}\right)^{2}}\left|0\right\rangle_{3}+\frac{c}{{\lambda_{j}+\sigma_{M}^{2}}}\left|1\right\rangle_{3}}\right)\\ \end{array}. (14)

The above operations are all unitary operations, thus, above processes can be denoted with UU.

III.3 Computing predictive mean value in the quantum context

Step C1 Preparing quantum initial state |01|02(|03|k4+|13|y4)|05\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left({\left|0\right\rangle_{3}\left|{{{\vec{k}}}_{*}}\right\rangle_{4}+\left|1\right\rangle_{3}\left|{{{\vec{y}}}}\right\rangle_{4}}\right)\left|0\right\rangle_{5}. When the third register is |03\left|0\right\rangle_{3}, unitary operation UU on the fourth and fifth register is executed. Otherwise, pauli-X on the fifth register is performed. Thus, the state of system is

|01|02(|03|φ345+|13|y4|15).\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left({\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}+\left|1\right\rangle_{3}\left|{{{\vec{y}}}}\right\rangle_{4}\left|1\right\rangle_{5}}\right). (15)

Step C2 Performing the Hadamard transform on the first register. In the meanwhile, executing pauli-X on the second register. Then, the Hadamard transform on the second register is carried out. In this way, the state becomes

12(|01+|11)(|02|12)(|03|φ345+|13|y4|15).\frac{1}{2}\left({\left|0\right\rangle_{\rm{1}}{\rm{+}}\left|1\right\rangle_{1}}\right)\left({\left|0\right\rangle_{\rm{2}}{\rm{-}}\left|1\right\rangle_{2}}\right)\left({\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}+\left|1\right\rangle_{3}\left|{{{\vec{y}}}}\right\rangle_{4}\left|1\right\rangle_{5}}\right). (16)

Step C3 Doing nothing when the first register is |01\left|0\right\rangle_{1}. Otherwise, performing swap operation [25] on the second and the third register, which obtains

12[|01(|02|03|φ345 + |02|13|y4|15 |12|03|φ345|12|13|y4|15) + |11(|02|03|φ345 + |12|03|y4|15 |02|13|φ345|12|13|y4|15)].\begin{gathered}\frac{1}{2}\left[{\left|0\right\rangle_{1}\left({\left|0\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}{\text{ + }}\left|0\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{y}}\right\rangle_{4}\left|1\right\rangle_{5}}\right.}\right.\hfill\\ {\text{ }}\left.{-\left|1\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}-\left|1\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{y}}\right\rangle_{4}\left|1\right\rangle_{5}}\right)\hfill\\ {\text{ + }}\left|1\right\rangle_{1}\left({\left|0\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}{\text{ + }}\left|1\right\rangle_{2}\left|0\right\rangle_{3}\left|{\vec{y}}\right\rangle_{4}\left|1\right\rangle_{5}}\right.\hfill\\ {\text{ }}\left.{\left.{-\left|0\right\rangle_{2}\left|1\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}-\left|1\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{y}}\right\rangle_{4}\left|1\right\rangle_{5}}\right)}\right].\hfill\\ \end{gathered} (17)

Step C4 Measuring the first register of Eq. (17) with operator M=12(|0|1)(0|1|)M=\frac{1}{2}\left({\left|0\right\rangle-\left|1\right\rangle}\right)\left({\left\langle 0\right|-\left\langle 1\right|}\right), where the inner product of Eq. (14) and |y4|15\left|{\vec{y}}\right\rangle_{4}\left|1\right\rangle_{5} is j=0M1cαjβjλj+σM2\sum\limits_{j=0}^{M-1}{\frac{{c\alpha_{j}\beta_{j}}}{{\lambda_{j}+\sigma_{M}^{2}}}}. Thus, the probability of measurement is p=12(1+j=0M1cαjβjλj+σM2)p=\frac{1}{2}\left({1+\sum\limits_{j=0}^{M-1}{\frac{{c\alpha_{j}\beta_{j}}}{{\lambda_{j}+\sigma_{M}^{2}}}}}\right). Here, cc is a constant. Through measurement, the specific value of j=0M1cαjβjλj+σM2\sum\limits_{j=0}^{M-1}{\frac{{c\alpha_{j}\beta_{j}}}{{\lambda_{j}+\sigma_{M}^{2}}}} is attained. Therefore, predicting mean value in quantum context is achieved.

III.4 Computing predictive covariance value in the quantum context

Step D1 Preparing quantum initial state |01|02(|03|k4+|13|k4)|05\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left({\left|0\right\rangle_{3}\left|{{{\vec{k}}}_{*}}\right\rangle_{4}+\left|1\right\rangle_{3}\left|{{{\vec{k}}}_{*}}\right\rangle_{4}}\right)\left|0\right\rangle_{5}. When the third register is in the state |03\left|0\right\rangle_{3}, unitary operation UU on the fourth register is performed. Otherwise, pauli-X operation is performed on the fifth register. Thus, we can get |01|02(|03|φ345+|13|k4|15)\left|0\right\rangle_{1}\left|0\right\rangle_{2}\left({\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}+\left|1\right\rangle_{3}\left|{{{\vec{k}}}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right).

Step D2 Performing the Hadamard transform on the first register. At the same time, executing pauli-X on the second register. Then the Hadamard transform on the second register is carried out, which results in 12(|01+|11)(|02|12)(|03|φ345+|13|k4|15)\frac{1}{2}\left({\left|0\right\rangle_{\rm{1}}{\rm{+}}\left|1\right\rangle_{1}}\right)\left({\left|0\right\rangle_{\rm{2}}{\rm{-}}\left|1\right\rangle_{2}}\right)\left({\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}+\left|1\right\rangle_{3}\left|{{{\vec{k}}}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right).

Step D3 Doing nothing when the first register is |01\left|0\right\rangle_{1}. Otherwise, performing swap operation for the second and the third register. Thus, the state can be obtained

12[|01(|02|03|φ345 + |02|13|k4|15 |12|03|φ345|12|13|k4|15) + |11(|02|03|φ345 + |12|03|k4|15 |02|13|φ345|12|13|k4|15)].\begin{gathered}\frac{1}{2}\left[{\left|0\right\rangle_{1}\left({\left|0\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}{\text{ + }}\left|0\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{k}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right.}\right.\hfill\\ {\text{ }}\left.{-\left|1\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}-\left|1\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{k}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right)\hfill\\ {\text{ + }}\left|1\right\rangle_{1}\left({\left|0\right\rangle_{2}\left|0\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}{\text{ + }}\left|1\right\rangle_{2}\left|0\right\rangle_{3}\left|{\vec{k}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right.\hfill\\ {\text{ }}\left.{\left.{-\left|0\right\rangle_{2}\left|1\right\rangle_{3}\left|{\varphi_{3}}\right\rangle_{45}-\left|1\right\rangle_{2}\left|1\right\rangle_{3}\left|{\vec{k}_{*}}\right\rangle_{4}\left|1\right\rangle_{5}}\right)}\right].\hfill\\ \end{gathered} (18)

Step D4 Measuring the first register with operator M=12(|0|1)(0|1|)M=\frac{1}{2}\left({\left|0\right\rangle-\left|1\right\rangle}\right)\left({\left\langle 0\right|-\left\langle 1\right|}\right), where the inner product of Eq. (14) and |k4|15\left|{{{\vec{k}}}_{*}}\right\rangle_{4}\left|1\right\rangle_{5} is j=0M1cαj2λj+σM2\sum\limits_{j=0}^{M-1}{\frac{{c^{\prime}\alpha_{j}^{2}}}{{\lambda_{j}+\sigma_{M}^{2}}}}. Thus, the probability of measurement is p=12(1+j=0M1cαj2λj+σM2)p=\frac{1}{2}\left({1+\sum\limits_{j=0}^{M-1}{\frac{{c^{\prime}\alpha_{j}^{2}}}{{\lambda_{j}+\sigma_{M}^{2}}}}}\right). Here, cc’ is a constant. We can get specific value of j=0M1cαj2λj+σM2\sum\limits_{j=0}^{M-1}{\frac{{c^{\prime}\alpha_{j}^{2}}}{{\lambda_{j}+\sigma_{M}^{2}}}} from probability. Therefore, predicting covariance value in quantum context is achieved.

III.5 Preparing covariance matrix KK and kernel function vector k\vec{k}_{*}

In classical gaussian process regression, covariance function is generally cov(f(xp,xq))=k(xp,xq)=exp(12|xpxq|2){\mathop{\rm cov}}\left({f\left({\vec{x}_{p},\vec{x}_{q}}\right)}\right)=k\left({\vec{x}_{p},\vec{x}_{q}}\right)=\exp\left({-{\textstyle{1\over 2}}\left|{\vec{x}_{p}-\vec{x}_{q}}\right|^{2}}\right). Thus, the representation of covariance matrix and kernel function vector are respectively

K=p=0M1q=0M1exp(12|xpxq|2)|pq|K=\sum\limits_{p=0}^{M-1}{\sum\limits_{q=0}^{M-1}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{p}-\vec{x}_{q}}\right|^{2}}\right)}}\left|p\right\rangle\left\langle q\right| (19)
k=p=0M1exp(12|xxp|2)|p.\vec{k}_{*}=\sum\limits_{p=0}^{M-1}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{*}-\vec{x}_{p}}\right|^{2}}\right)}\left|p\right\rangle. (20)

The preparation of quantum initial states has always been difficult in quantum machine learning. And in this paper, it is also a challenge. Inspired by quantum radial basis network [9], coherent state [26, 27] and block coding techniques [29, 30] are utilized to achieve the preparation of initial states. Coherent states play a crucial role in quantum optics and mathematical physics. They are defined in the Fock states {|0,|1,}\left\{{\left|0\right\rangle,\left|1\right\rangle,...}\right\}, which is a basis of the infinitely dimensional Hilbert space H{\rm H}. Let’s a,aa,a^{\dagger} respectively, be the annihilation and creation operators of the harmonic oscillator. Then

a|n=n|n1,a|n=n+1|n+1.a\left|n\right\rangle=\sqrt{n}\left|{n-1}\right\rangle,a^{\dagger}\left|n\right\rangle=\sqrt{n+1}\left|{n+1}\right\rangle. (21)

For any n1n\geq 1, it is easy to see that

|n=(a)nn!|0.\left|n\right\rangle=\frac{{\left({a^{\dagger}}\right)^{n}}}{{\sqrt{n!}}}\left|0\right\rangle. (22)

Let rRr\in R be a real number, its coherent state is defined by

|φr=er2/2k=0rkk!|k.\left|{\varphi_{r}}\right\rangle=e^{-{{r^{2}}\mathord{\left/{\vphantom{{r^{2}}2}}\right.\kern-1.2pt}2}}\sum\limits_{k=0}^{\infty}{\frac{{r^{k}}}{{\sqrt{k!}}}}\left|k\right\rangle. (23)

It is a unit eigenvector of a corresponding to the eigenvalue rr, that is a|φr=r|φra\left|{\varphi_{r}}\right\rangle=r\left|{\varphi_{r}}\right\rangle. From Eq. (19) and Eq. (20), we also have |φr=er2/2era|0=er(aa2)|0\left|{\varphi_{r}}\right\rangle=e^{-{{r^{2}}\mathord{\left/{\vphantom{{r^{2}}2}}\right.\kern-1.2pt}2}}e^{ra^{\dagger}}\left|0\right\rangle=e^{r\left({a^{\dagger}-\frac{a}{2}}\right)}\left|0\right\rangle, thus |φr\left|{\varphi_{r}}\right\rangle is obtained by a unitary operator of dimension infinity.

As for the preparation of |φr\left|{\varphi_{r}}\right\rangle in a finite quantum circuit, we can consider its Taylor approximation:

|φ~rer2/2k=0T1rkk!|k.\left|{\tilde{\varphi}_{r}}\right\rangle\propto e^{-{{r^{2}}\mathord{\left/{\vphantom{{r^{2}}2}}\right.\kern-1.2pt}2}}\sum\nolimits_{k=0}^{T-1}{\frac{{r^{k}}}{{\sqrt{k!}}}\left|k\right\rangle}. (24)

Thus, the upper bound on error square is

||φr|φ~r|2r2TT!.\left|{\left|{\varphi_{r}}\right\rangle-\left|{\tilde{\varphi}_{r}}\right\rangle}\right|^{2}\leq\frac{{r^{2T}}}{{T!}}. (25)

By stirling formula, we can get T!2πT(Te)TT!\approx\sqrt{2\pi T}\left({\frac{T}{e}}\right)^{T}. Now, keeping error within δ\delta. Let’s take Eq. (17) δ2\leqslant\delta^{2}, that is TT only need to satisfy 2log1δ12log2π(T+12)logT2TlogrT2\log\frac{1}{\delta}-\frac{1}{2}\log 2\pi\leqslant\left({T+\frac{1}{2}}\right)\log T-2T\log r-T. Thus, it is easy to get the Taylor approximation of |φr\left|{\varphi_{r}}\right\rangle.

From the previous analysis, |φr\left|{\varphi_{r}}\right\rangle can be obtained by an unitary operator applying to |0\left|0\right\rangle. Because annihilation operators and creation operators are Hermitian, operator er(a12a)e^{r(a^{\dagger}-\frac{1}{2}a)} can be simulated by LCU. It is also shown that er(a12a)e^{r(a^{\dagger}-\frac{1}{2}a)} can simulate it with finite dimensions, which get a similar result. Thus for any vector x=(x1,x2,,xN)T{{\vec{x}=}}\left({x_{1},x_{2},...,x_{N}}\right)^{T}, the definition of coherent state is |φx=|φx(1)|φx(2)|φx(N)\left|{\varphi_{x}}\right\rangle=\left|{\varphi_{x^{(1)}}}\right\rangle\otimes\left|{\varphi_{x^{(2)}}}\right\rangle\otimes\cdots\otimes\left|{\varphi_{x^{(N)}}}\right\rangle, which costs O(NtpolylogNlog(tε)loglog(tε)δ)O\left({\frac{{Nt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}}\right). Now, considering the superposition states of training samples’ coherent states:

|Ψ=1Mp=0M1|pe1|φxpe2.\left|\Psi\right\rangle{\rm{=}}\frac{1}{{\sqrt{M}}}\sum\limits_{p=0}^{M-1}{\left|p\right\rangle_{e1}}\left|{\varphi_{x_{p}}}\right\rangle_{e2}. (26)

Firstly, applying the Fourier transform on |0e1\left|0\right\rangle_{e1}, which results in 1Mp=0M1|pe1\frac{1}{{\sqrt{M}}}\sum\limits_{p=0}^{M-1}{\left|p\right\rangle_{e1}}. Then appending one qubit, which gets 1Mp=0M1|pe1|0e2\frac{1}{{\sqrt{M}}}\sum\limits_{p=0}^{M-1}{\left|p\right\rangle_{e1}\left|0\right\rangle_{e2}}. Finally, applying unitary opeartors to the e2 register, Eq. (26) can be attained in time O(MNtpolylogNlog(tε)loglog(tε)δ)O\left({\frac{{MNt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}}\right).

Then, taking the partial trace on the e2 register of |ΨΨ|\left|\Psi\right\rangle\left\langle\Psi\right| gives rise to the density operator of covariance matrix

ρ=Tr2|ΨΨ| =1Mp,q=0M1exp(12|xpxq|2)|pq|.\begin{gathered}\rho=Tr_{2}\left|\Psi\right\rangle\left\langle\Psi\right|\hfill\\ {\text{ }}=\frac{1}{M}\sum\limits_{p,q=0}^{M-1}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{p}-\vec{x}_{q}}\right|^{2}}\right)\left|p\right\rangle\left\langle q\right|}.\\ \end{gathered} (27)

For covariance vector p=0M1exp(12|xxp|2)|p\sum\limits_{p=0}^{M-1}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{*}-\vec{x}_{p}}\right|^{2}}\right)}\left|p\right\rangle, we put the target vector x{\vec{x}_{*}} into the training dataset D, which make dataset become (xi,yi)i=1M+1\left({\vec{x}_{i},y_{i}}\right)_{i=1}^{M+1}. Here xM+1{\vec{x}_{M+1}} is x{\vec{x}_{*}} and yi=0y_{i}=0. Then, computing new covariance matrix KK^{\prime} that K=1M+1p,q=0Mexp(12|xpxq|2)|pq|K^{\prime}=\frac{1}{{M+1}}\sum\limits_{p,q=0}^{M}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{p}-\vec{x}_{q}}\right|^{2}}\right)}\left|p\right\rangle\left\langle q\right|.

Ref. [29] presented a definition that supposed that KK^{\prime} is an mm-qubit density operator, γ,εR\gamma,\varepsilon^{\prime}\in R^{\dagger} and kNk\in N. Then there is a (m+k)(m+k)-qubit unitary UU^{\prime} is (γ,k,ε)\left({\gamma,k,\varepsilon^{\prime}}\right) -block-encoding of AA so that Aγ(0|kI2m)U(|0kI2m)ε\left\|{A-\gamma\left({\left\langle 0\right|^{\otimes k}\otimes I_{2m}}\right)U^{\prime}\left({\left|0\right\rangle^{\otimes k}\otimes I_{2m}}\right)}\right\|\leq\varepsilon^{\prime}, where \left\|\cdot\right\| is the spectral norm, thus, U=(A)U^{\prime}=\left({\begin{array}[]{*{20}c}{A^{\prime}}&\cdot\\ \cdot&\cdot\\ \end{array}}\right) satisfied AγAε\left\|{A^{\prime}-\gamma A}\right\|\leq\varepsilon. Therefore, A|qA^{\prime}\left|q\right\rangle can be obtained by considering U|0|qU^{\prime}\left|0\right\rangle\left|q\right\rangle. That is U|0|q(A...)(|q0)=(A|q.)=A|q|0+|0U^{\prime}\left|0\right\rangle\left|q\right\rangle\approx\left({\begin{array}[]{*{20}c}A^{\prime}&.\\ .&.\\ \end{array}}\right)\left({\begin{array}[]{*{20}c}{\left|q\right\rangle}\\ 0\\ \end{array}}\right)=\left({\begin{array}[]{*{20}c}{A^{\prime}\left|q\right\rangle}\\ .\\ \end{array}}\right)=A^{\prime}\left|q\right\rangle\left|0\right\rangle+\left|0\right\rangle^{\bot}. Then, a projection measurement is performed in the basis {|0,|1}\left\{{\left|0\right\rangle,\left|1\right\rangle}\right\}, the probability of obtaining measurement outcome A|qA\left|q\right\rangle is tr(A2)tr\left({A^{\prime 2}}\right). Here AA is a density operator, thus tr(A2)1tr\left({A^{2}}\right)\leqslant 1. If AA is a pure state, tr(A2)=1tr\left({A^{2}}\right)=1. Otherwise, tr(A2)<1tr\left({A^{2}}\right)<1. When the eigenvalues of AA are small, we put a coefficient in front of the matrix AA in order to obtain A|qA\left|q\right\rangle with a high probability. Here Gilyén et.al [31] proposed that the block-encoding of AA is (GI)(ISWAP)(GI)\left({G^{\dagger}\otimes I}\right)\left({I\otimes SWAP}\right)\left({G\otimes I}\right), where GG is an unitary operator that get a purification |0|0|Ψ\left|0\right\rangle\left|0\right\rangle\to\left|\Psi\right\rangle by GG appling on |0|0\left|0\right\rangle\left|0\right\rangle. Thus, K|M=1M+1p=0Mexp(12|xMxp|2)|p=1M+1p=0Mexp(12|xxp|2)|pK^{\prime}\left|M\right\rangle=\frac{1}{{M+1}}\sum\limits_{p=0}^{M}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{M}-\vec{x}_{p}}\right|^{2}}\right)}\left|p\right\rangle=\frac{1}{{M+1}}\sum\limits_{p=0}^{M}{\exp\left({-\frac{1}{2}\left|{\vec{x}_{*}-\vec{x}_{p}}\right|^{2}}\right)}\left|p\right\rangle can be obtained. In conclusion, covariance matrix KK and kernel function vector k\vec{k}_{*} can be prepared. Finally, the preparation of |k\left|{\vec{k}_{*}}\right\rangle needs O(MNtpolylogNlog(tε)loglog(tε)δ+T)O\left({\frac{{MNt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}+T}\right). O(T)O\left(T\right) always refer to the complexity of implement the blocking-encoding. Without loss of generality, O(T)=O(logM)O\left(T\right)=O\left({\log M}\right).

IV Runtime analysis of the algorithm

Let us start with discussing the time complexity of whole algorithm. As shown in TABLE 1, a detailed analysis of each step of this algorithm is depicted as follows. In A section, the state |y\left|{\vec{y}}\right\rangle and |k\left|{\vec{k}_{*}}\right\rangle can be generated in time O(polylogM)O\left({{\text{poly}}\log M}\right) with the help of QRAM. Then, matrix exponentiation is performed in Step B1, which can be simulated within δ\delta in time O(tpolylogMlog(tε)loglog(tε))O\left({\frac{{t{\text{poly}}\log M\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)}}}\right). The phase estimation is performed in Step B2, this step by O(1t0)O\left({\frac{1}{{t_{0}}}}\right) in estimating eigenvalue. Generally, λj1κ\lambda_{j}\geqslant\frac{1}{\kappa} (κ\kappa is the conditional number of covariance matrix KK), taking t0=O(κδ)t_{0}=O\left({\frac{\kappa}{{\delta^{\prime}}}}\right) induces a final error of δ\delta^{\prime}. Next, in Step B3, the runtime of controlled rotation is O(log(1δ)log2(κδ)loglog(1δ))O\left({\frac{{\log\left({\frac{1}{{\delta^{\prime}}}}\right)\log^{2}\left({\frac{\kappa}{{\delta^{\prime}}}}\right)}}{{\log\log\left({\frac{1}{{\delta^{\prime}}}}\right)}}}\right), which is relatively negligible compared to the time taken in Step B2. The inverse phase etimation has same time analysis with the phase estimation in Step B4. The Section C and Section D only utilize unitary operations, which is linear in the number of qubits, and the final measurement only account for a constant factor, so the runtime of these two sections is negligible. The aim of Section E is preparing covariance matrix KK and kernel function vector |k\left|{\vec{k}_{*}}\right\rangle. Through coherent state and block-encoding techniques, time complexity are O(MNtpolylogNlog(tε)loglog(tε)δ)O\left({\frac{{MNt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}}\right) and O(MNtpolylogNlog(tε)loglog(tε)δ+logM)O\left({\frac{{MNt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}+{\log M}}\right) respectively. Without loss of generality, letting O(N)=O(logM)O\left(N\right)=O\left({\log M}\right). Therefore, the total runtime of getting predictive mean value and covariance value is O~(tMpolylogMlog(tε)δ)\tilde{O}\left({\frac{{tM{\text{poly}}\log M\log\left({\frac{t}{\varepsilon}}\right)}}{\delta}}\right), where where the tilde indicates that we are neglecting more slowly growing terms. Compared with the runtime O(M3)O\left({M^{3}}\right) of classical computation, which achieves a quadratic acceleration.

Table 1: The time complexity of each step of whole algorithm
Step of Section Time Complexity
Section A O(polylogM)O\left({\text{poly}\log M}\right)
Step B1 O(tpolylogMlog(tε)loglog(tε))O\left({\frac{{t{\text{poly}}\log M\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)}}}\right)
Step B2 O(δk)O\left({\frac{{\delta^{\prime}}}{k}}\right)
Step B3 O(log(1δ)log2(κδ)loglog(1δ))O\left({\frac{{\log\left({\frac{1}{{\delta^{\prime}}}}\right)\log^{2}\left({\frac{\kappa}{{\delta^{\prime}}}}\right)}}{{\log\log\left({\frac{1}{{\delta^{\prime}}}}\right)}}}\right)
Step B4 O(δk)O\left({\frac{{\delta^{\prime}}}{k}}\right)
Sectin E O(MNtpolylogNlog(tε)loglog(tε)δ+logM)O\left({\frac{{MNt{\text{poly}}\log N\log\left({\frac{t}{\varepsilon}}\right)}}{{\log\log\left({\frac{t}{\varepsilon}}\right)\delta}}+{\log M}}\right)

V Conclusion

Gaussian process regression makes sense in real-world applications, especially when problem involves extrapolating from large data sets. However, classical computers cost too much when data sets is large, thus quantum gaussian regression is proposed. In this work, firstly, we avoid the sparse Hamiltonian simulation and apply the LCU Hamiltonian simulation, making it possible to deal with the non-sparse matrix. Secondly, in order to get exact measurement value, that is the sign of results is not ambiguous, the original HHL algorithm [33] is improved, thus, inner product can get a clear symbol. Another innovation point of this paper is the preparation of covariance matrix. In the existing papers on quantum gaussian process regression [34], authors have given the covariance matrix by default. In our paper, the covariance matrix is obtained by annihilation operator and generation operator and the kernel function vector is obtained by applying block coding. Finally, our algorithm has a quadratic acceleration compared with classical counterpart. We hope that our algorithm, especially, the key technologies used in our algorithm, the improved HHL algorithm and the matrix algorithm, will inspire more efficient quantum machine learning algorithms for application in a wider range of fields.

Acknowledgements.
This work was supported by National Natural Science Foundation of China (Grant Nos. 61772134, 61976053 and 62006105), Fujian Province Natural Science Foundation (Grant No. 2018J01776) and Program for New Century Excellent Talents in Fujian Province University.

V.0.1 References

References

  • [1] J. Biamonte, P. Wittek and N. Pancotti, Nat. 549, 195 (2017).
  • [2] A. D. Alhaidari and T. J. Taiwo, Jour. Math. Phys. 58, 022101 (2017).
  • [3] P. W. Shor, J. SIAM, Comput. 26, 1484 (1997).
  • [4] D. Cao, Jour. Quan. Elec. 32, 58 (2015).
  • [5] K. Yu, G. D. Guo, B. B. Cai, Com. Sci. 43, 80 (2016).
  • [6] I. Cong, S. Lukin and D. Mikhail, Nat. Phys. 15, 1273 (2019).
  • [7] E. Farhi and H. Neven, arXiv:1802.06002.
  • [8] M. Zidan, A. H. Abdel-Aty, M. El-Shafei, M. Feraig, Y. Al-Sbou, H. Eleuch and M. Abdel-Aty, Appl. Sci. 9, 1277 (2019).
  • [9] C. Shao, Phys. Rev. A 102, 042418 (2020).
  • [10] Y. Shi, Inform. Process. Lett. 81, 23 (2002).
  • [11] C. H. Yu, F. Gao and Q. L. Wang. Phys. Rev. A. 94, 042311 (2016).
  • [12] C. Silva and J. M. Fonseca, CSOC 2018 (2018).
  • [13] D. Loss, D. P. Divincenzo, Phys. Rev. A, 57, 120 (1998).
  • [14] N. Hak, Soci. Sci. Elec. Pub. (2020).
  • [15] C. Williams, C. E. Rasmussen, NIPS’95, (1995).
  • [16] R. Dürichen, M. A. F. Pimentel, L. Clifton, A. Schweikard and D. A. Clifton, IEEE. Trans. Biomed. Eng. 62, 314 (2015).
  • [17] L. Ling, C. Pan and P. Li, Appl. Mech. Mater. 421, 523 (2013).
  • [18] C. Williams, C. E. Rasmussen, The MIT Press, (2005).
  • [19] A. W. Harrow, A. Hassidim, S. Lloyd, Phy. Rev. LetT. 15, 150502 (2009).
  • [20] M. F. Ochs, R. Stoyanova, F. Ariasmendoza, Jour. Mag. Res. 137, 161 (1999).
  • [21] C. H. Yu, F. Gao, Q. Y. Wen, IEEE Trans. Know. Data Eng. 33, 858 (2021).
  • [22] S. S. Zhou and J. B. Wang, R. Soc. Open Sci. 4, 160906 (2017).
  • [23] D. W. Berry, A. M. Childs, R. Cleve, R. Kothari, and R. D. Somma, Phys. Rev. Lett. 114, 090502 (2015).
  • [24] J. B. Parker, I. Joseph. arXiv:2002.08497.
  • [25] H. Buhrman, R. Cleve and J. Watrous, Phys. Rev. Lett. 87, 167902 (2001).
  • [26] B. C. Sanders, J. Phys. A: Math. Theor. 45, 244002 (2012).
  • [27] K. Fujii, arXiv: quant-ph/0112090 (2001).
  • [28] C. H. Yu, F. Gao and Q. Y. Wen, IEEE. T. Knowl. Data. En. 33, 858 (2021).
  • [29] C. Shao. J. Phys. A: Math. Theor. 53, 045301 (2019).
  • [30] S. Chakraborty, A. Gilyén, S. Jeffery. ICALP 2019. 33 (2019).
  • [31] A. Gilyén, Y. Su, G. H. Low and N. Wiebe, STOC (2019), 193 (2018).
  • [32] K. Dasaratha, B. Golub and N. Hak, arXiv:1801.02042.
  • [33] A. W. Harrow, A. Hassidim, S. Lloyd, Phys. Rev. Lett. 103, 150502 (2009).
  • [34] Z. Zhao, J. K. Fitzsimons, J. F. Fitzsimons, Phys. Rev. A 99, 052331 (2019).