Quantum Bayesian Neural Networks
Abstract
Quantum machine learning promises great speedups over classical algorithms, but it often requires repeated computations to achieve a desired level of accuracy for its point estimates.
Bayesian learning focuses more on sampling from posterior distributions than on point estimation, thus it might be more forgiving in the face of additional quantum noise.
We propose a quantum algorithm for Bayesian neural network inference, drawing on recent advances in quantum deep learning, and simulate its empirical performance on several tasks.
We find that already for small numbers of qubits, our algorithm approximates the true posterior well, while it does not require any repeated computations and thus fully realizes the quantum speedups
1. Introduction
Quantum machine learning generally comes in two flavors: Variational quantum circuits that mimic the training of neural networks (Cerezo et al., 2020), which run on noisy intermediatescale quantum (NISQ) devices (Preskill, 2018), and quantum algorithms aimed at replacing classical training and prediction algorithms for neural networks (Allcock et al., 2020), which run on (future) error-corrected quantum computers.
The latter often use a quantum algorithm for estimating the inner product calculations that occur when training and evaluating neural networks.
This inner product estimation (IPE) can evaluate inner products with lower asymptotic complexity than classical algorithms but does so at lower accuracy.
When evaluating standard neural networks, this lowered accuracy in the inner product calculation has to be corrected by running the quantum algorithm multiple times to get a better estimate.
However, for Bayesian neural networks (BNNs), the goal is not to get the best point estimate of the parameters θ ∗ = arg max θ p ( D | θ ), as it would be in maximum-likelihood learning.
Instead, one wishes to obtain K samples from the Bayesian posterior over the parameters θ given the data D , that is, θ i ∼ p ( θ | D ) ∝ p ( θ ) p
( D | θ ).
These samples can then be used to approximate the posterior predictive for unseen data D ∗ , that is, p
[Equation] D ∗
[Equation]
Since these samples are noisy by stipulation, they might allow for a larger margin of error in the quantum computations.
Ideally, under zero-mean quantum noise with sufficiently small variance, one might achieve meaningful results with just running one single quantum computation per sample, thus realizing the maximum possible quantum speedup.
In this work, we investigate this idea empirically and demonstrate a proof of concept for BNN inference on quantum computers.
We find that already for decently small numbers of qubits, our quantum algorithm approximates the true posterior well with just one computation per sample.
A discussion of related work is deferred to Appendix A.
2. Quantum Bayesian Neural Networks
This paper focuses on reducing the asymptotic runtime of the inference and prediction in
BNNs using quantum algorithms.
The algorithms described in this paper are derived from the quantum deep learning algorithms introduced by Allcock et al.
(2020) for feedforward neural networks.
We will describe the alterations made for BNNs and their consequences in this section.
2.1. Quantum Inner Product Estimation
The main quantum speedups are gained in our algorithm by replacing the classical inner product v ⊤ i v j of two vectors in R d by its quantum estimate.
To this end, we use the modified IPE algorithm, based on the work by Kerenidis et al.
It achieves an asymptotic runtime of
[Equation]
where T is the time to load the input vectors into a superposition quantum state, which becomes T
=
O (polylog( d )) if we assume quantum random access memory (QRAM) or an equivalent quantum memory model (Kerenidis and Prakash, 2016).
ϵ is an error bound on the inner product estimate, which in turn depends on the number of qubits n used in the quantum phase estimation subroutine.
˜ O hides polylogarithmic factors.
Our modification for the usage in BNNs dispenses of median evaluation from the IPE algorithm.
Instead of evaluating the inner product multiple times, we use a single estimate.
Thus, the asymptotic runtime is reduced by a factor of log(1 / ∆), where ∆ ensured a specific probability to attain the error ϵ in the inner product.
Consequently, our IPE algorithm only has a constant probability of estimating the inner product within an error ϵ .
2.1.1. Quantum Noise in the Inner Product Estimation
The periodicity and non-isotropy of the noise seen in Figure 1 stems mostly from the phase estimation subroutine (see Section E.1).
The representation of the inner products in the n available qubits means there are only 2 n possible values available for the inner product estimate.
Also, the IPE algorithm uses probabilistic subroutines to estimate the inner product.
Thus, the best estimate in the 2 n possible values is not attained with certainty.
For a more thorough treatment of the noise characteristics of the IPE algorithm, see Section E.
[Figure]
2.2. Quantum Inference Algorithm for Bayesian Neural Networks
Markov Chain Monte Carlo (MCMC) methods, such as stochastic gradient Langevin dynamics (SGLD), Hamiltonian Monte Carlo (HMC), and No-U-Turn Sampler (NUTS), are guided by gradients and thus they require backpropagation through the BNN.
Current software relies on computing these gradients using automatic differentiation and Jacobianvector products (JVPs).
The JVP of an inner product contains two inner products (see
Section C.2).
These can be replaced with our IPE algorithm to compute estimates of the true gradient.
Our quantum inference algorithm differs only in, for the asymptotic runtime, negligible parts from the quantum training algorithm described by Allcock et al.
For a single backpropagation, O (Ω) inner products have to be calculated, where Ω is the number of neurons in the network.
If we draw K samples from our posterior and our training dataset
D has a cardinality of N = |D| , we need to calculate KN backpropagations.
Thus our quantum inference algorithm for BNNs has an asymptotic runtime of
[Equation]
where R is a variable defined in Equation (4) and can be expected to be reasonably small for practical problems.
The error component 1 ϵ of the IPE depends on the number of qubits n used in the phase estimation subroutine.
For a small qubit number n , 1 ϵ is also small.
The additional factor of √ KN is a computational overhead of storing the weight matrices implicitly (see Section 2.2.1).
A classical inference would incur a runtime of O ( KNP ), where P is the number of weights inside the neural network and for a fully-connected BNN is proportional to Ω 2 .
The quantum algorithm has an advantage over the classical algorithm if √ KN ≪ Ω, that is, for large networks.
2.2.1. Low-Rank Initialization and Implicit Storage of Weight Matrices
2 X
Y
[Figure]
2 X
Y
[Figure]
Y
[Figure]
After a backpropagation through the network, the updated weight matrices need to be stored.
QRAM allows for fast load times into a quantum state, but storing is linear in the input size.
Thus, if we were to store the weight matrices explicitly, we would incur a runtime of O (Ω 2 ) per backpropagation.
This would negate the speedup seen in Section 2.2.
Allcock et al.
(2020) propose to solve this problem via low-rank initialization and implicit storage of the weight matrices.
As a caveat, it should be noted that the low-rank initialization of the weight matrices needs to be compatible with the initialization using the prior p ( θ ).
Moreover, the algorithm for implicit storage of the weight matrices is dependent on the inference algorithm and its feasibility needs to be evaluated on a case-by-case basis.
For our simulations, we operate in a full-rank prior regime.
However, we also present simulation results that show that if we move to a low-rank prior regime, the results are still viable (see Appendix F).
We do assume that the sampler allows for implicit storage of the weight matrices.
It will however be an exciting direction for future work to study how these requirements could be relaxed.
2.3. Quantum Prediction Algorithm for Bayesian Neural Networks
The prediction algorithm presented in this paper follows the same outline as the evaluation algorithm in Allcock et al.
(2020), but
with the modified IPE introduced in Section 2.1.
To get all predictions, the modified evaluation algorithm is executed KM times, where
K is the number of weight samples drawn from the posterior and M is the cardinality of the prediction dataset.
The quantum prediction algorithm for a BNN has an asymptotic runtime of
[Equation]
Here, the additional factor of √ KN is a consequence of storing the weight matrices implicitly during the quantum inference algorithm.
If we were to use classical inference, this factor would disappear.
Again, R e is a variable defined in Equation (5) and can be expected to be reasonably small for practical problems.
The rest of the runtime analysis is analogous to the one in Section 2.2.
A classical algorithm for evaluating a BNN with the same inputs will have an asymptotic complexity of ˜ O ( KMP ).
Similarly to the case of training, the quantum algorithm thus provides a speedup over the classical algorithm if √ KM ≪ Ω, that is, for large networks.
If classical inference is used, the speedup occurs unconditionally.
3. Results
We provide results for a linear regression task and a binary classification task.
The BNN we use in both tasks has two hidden layers with five neurons each.
The results are obtained using a simulation of the IPE algorithm on a classical computer.
We vary the number of qubits ( n ) used in the phase estimation algorithm for the IPE procedure.
We expect a higher accuracy on the inner product estimate for a larger number of qubits.
For both tasks, we compare the fully classical algorithm (i.e., classical inference and classical prediction, CICP ), classical inference with quantum prediction ( CIQP ), quantum inference with classical prediction ( QICP ), and quantum inference with quantum prediction ( QIQP ).
While the QIQP setting promises the largest speedups, the other settings can also be interesting in certain applications.
For instance, CIQP could be used when a predictive model is only trained once (offline), but then used for prediction repeatedly in real-time (online).
3.1. Linear Regression
We see in Figure 2 that our expectation of greater precision for a higher qubit number n holds.
For n = 10 qubits, the results are already comparable to the completely classical case.
We also notice that quantum prediction seems to be more resilient to fewer qubits than quantum inference.
Specifically, if we compare the subfigures Figure 2( f ) and Figure 2( g ), the difference becomes apparent.
Further results are shown in Figure 8 in the Appendix.
In Figure 5 in the Appendix, we see the difference between low-rank initialization (rank 3) and full-rank initialization (rank 5).
We observe that the low-rank initialization still delivers acceptable results for 10 qubits when using quantum prediction.
We also see that quantum inference is more susceptible to low-rank initialization.
Increasing the qubit number likely makes the low-rank initialization almost equivalent to full-rank initialization because higher qubit number simulations approach the classical results.
When looking at the completely classical simulations in Figure 5( a ) and Figure 5( e ), we notice that low- and full-rank initialization are comparable.
3.2. Binary Classification
The binary classification in Figure 3 confirms the results of the linear regression task.
Again, there is greater precision with higher qubit numbers and quantum prediction is more resilient to fewer qubits than quantum inference.
These observations also qualitatively hold for the predictive uncertainties on this task, as shown in Figure 4 in the Appendix.
Further results can be found Figure 9 and Figure 10.
Both Figure 6 and Figure 7 in the Appendix confirm the observations regarding lowrank initialization.
Here too, the low-rank initialization seems to provide sufficient results, especially if one would increase the number of qubits for the phase estimation.
3.3. UCI Datasets
In Figure 11 (in Appendix F), we see the result of simulating the linear regression tasks in the four UCI datasets on our version of a quantum BNN.
The datasets are split 20 times into different training and prediction sets.
The mean of the log-likelihood and the standard error are then used to create the plots.
We simulate the linear regression for five different qubit numbers and 2000 weight samples of the posterior.
Both the Boston dataset in Figure 11( a ) and the Concrete dataset in Figure 11( b ) show us expected results.
The precision of the classical predictions increases with the number of hidden neurons.
With the Boston dataset, the model stops improving after 10 hidden neurons, while the Concrete dataset shows improvements even after 20 hidden neurons per layer.
As expected, the accuracy of the model increases with the number of qubits until it almost reaches classical prediction capabilities with 13 qubits.
For the Energy dataset in Figure 11( d ), the behavior seems unexpected.
The quantum prediction with the smallest number of neurons performs best.
A possible explanation for this behavior is that the accuracy in the classical predictions does not increase with a larger number of hidden layer neurons.
This suggests that the larger models do not capture more features of the data, while still incurring more inner products.
The larger number of inner product calculations might lead to a larger overall error of these models when using quantum
IPE.
The Wine dataset in Figure 11( e ) seems to punish larger models even while using classical prediction.
Thus it does not seem surprising that the quantum prediction also performs worse with the larger models.
4. Conclusion
We have shown that quantum deep learning techniques can be fruitfully combined with
Bayesian neural networks.
In contrast to the standard point estimation setting, when sampling from Bayesian posteriors, one can achieve high fidelity of the samples even without repeating the quantum computations, already at small numbers of qubits.
The promised speedups of the quantum algorithms can thus be realized to their full extent in the Bayesian learning setting.
In future work, it will be exciting to extend these studies to more realistic prediction tasks and potentially speed up the inference even further through the use of quantum MCMC techniques.
Appendix A. Related Work Bayesian neural networks.
Bayesian neural networks (MacKay, 1992; Neal, 1992) have gained popularity recently (Wenzel et al., 2020; Fortuin et al., 2021a,b).
They provide many benefits compared to their non-Bayesian counterparts, including calibrated uncertainties (Ovadia et al., 2019), principled inclusion of prior knowledge (Fortuin, 2021), and automatic model selection (Immer et al., 2021a).
While there has been work on BNN inference using variational methods (Hern´andez-Lobato and Adams, 2015; Blundell et al., 2015;
Swiatkowski et al., 2020; Dusenberry et al., 2020), Laplace approximation (Daxberger et al., 2020;
Immer et al., 2021b), and particle-based methods (Wang et al., 2018;
Hu et al., 2019;
Ciosek et al., 2019; D’Angelo et al., 2021; D’Angelo and Fortuin, 2021), the gold-standard inference methods are still MCMC methods (Izmailov et al., 2021), such as SGLD (Welling and Teh, 2011), GG-MC (Garriga-Alonso and Fortuin, 2021), HMC (Neal et al., 2011), and
NUTS (Hoffman and Gelman, 2014).
We use NUTS sampling, but our algorithm is readily extensible to other inference settings.
Quantum machine learning.
Quantum machine learning has gained a lot of interest in recent years, providing hope to enhance machine learning on a fault-tolerant universal quantum computer.
It builds on several fundamental algorithms such as linear system solving (Harrow et al., 2009), optimization (Kerenidis and Prakash, 2020), recommendation systems (Kerenidis and Prakash, 2016), dimensionality reduction (Lloyd et al., 2014), and many more.
The quantum algorithms for neural networks by Allcock et al.
(2020) and
Kerenidis et al.
(2020) were inspired by Kerenidis et al.
(2018), who defined a fast quantum inner product estimation algorithm.
We also build on this algorithm in our work.
Recently, quantum Bayesian machine learning such as Gaussian Processes (Zhao et al., 2019) or
Boltzmann machines (Wu et al., 2019) have also been explored.
Moreover, Quantum Monte
Carlo algorithms, such as the ones by Montanaro (2015), could be an interesting direction for use in BNNs in future work.
Appendix B. Source Code and Data
The source code and additional data from the simulations presented in this paper is on
GitHub: ANONYMIZED URL .
Appendix C. Method details C.1. R Terms in Quantum Inference and Prediction Algorithm
The R terms appearing in the runtime of both quantum algorithms are a new phenomenon, not observed in classical algorithms.
The variable R in Equation (2) is defined as
[Equation]
where n ℓ is the number of neurons in the ℓ -th layer, the BNN consists of L layers, the weight matrix W ℓ is associated between layers ℓ − 1 and ℓ , W k,ℓ
j is the k -th sample of the j -th row of the weight matrix W ℓ , X [ k,ℓ,j ] is the implicitly stored version of W k,ℓj , a k,n,ℓ is the output for the n -th datapoint of the ℓ -th layer using the k -th weight sample, δ k,n,ℓ is the output for the n -th datapoint of the ℓ -th layer using the k -th weight sample in the backward pass and ∥∥ F is the Frobenius norm.
The variable R e used in Equation (3) is defined as
[Equation]
As argued by Allcock et al.
(2020), both these values are expected to be small for practical parameter regimes, which we also expect to hold for BNNs.
C.2. Jacobian-Vector Product of an Inner Product
The JVP of an inner product contains itself two inner products between vectors:
[Equation]
where t 1 and t 2 are the tangent vectors.
In our simulation, we replace the exact calculation of these inner products with the estimate of the IPE routine.
This gives us an estimate of the JVP (and thus of the gradient), instead of the true JVP value.
This allows for a faster runtime of the backpropagation algorithm.
Appendix D. Preliminaries in Quantum Computing
We present a succinct broad-audience quantum information background necessary for this work.
See the book by Nielsen and Chuang (2002) for a detailed course.
Qubits:
In classical computing, a bit can be either 0 or 1.
From a quantum information perspective, a quantum bit or qubit can be in state | 0 ⟩ or | 1 ⟩ .
We use the braket notation |·⟩ to specify the quantum nature of the bit.
The qubits can be in superposition of both states α | 0 ⟩ + β | 1 ⟩ where α, β ∈ C such that | α | 2 + | β | 2 = 1.
The coefficients α and β are called amplitudes .
The probabilities of observing either 0 or 1 when measuring the qubit are linked to the amplitudes:
[Equation]
As quantum physics teaches us, any superposition is possible before the measurement, which gives special abilities in terms of computation.
With n qubits, 2 n possible binary combinations (e.g. | 01 · · · 1001 ⟩ ) can exist simultaneously, each with its own amplitude.
A n qubits system can be represented as a normalized vector in a 2 n dimensional Hilbert space.
A multi-qubit system is called a quantum register .
If | p ⟩ and | q ⟩ are two quantum states or quantum registers, the whole system can be represented as a tensor product | p ⟩⊗|
q ⟩ , also written as | p ⟩ | q ⟩ or | p, q ⟩ .
Quantum Computation:
As logical gates in classical circuits, qubits or quantum registers are processed using quantum gates.
A quantum gate is a unitary mapping in the
Hilbert space, preserving the unit norm of the quantum state vector.
Therefore, a quantum gate acting on n qubits is a matrix U ∈ C 2 n such that UU † =
U † U
=
I , with U † being the adjoint, or conjugate transpose, of U .
Common single qubit gates include the Hadamard gate 1 √(cid:18) 1 −(cid:19) that maps | 0 ⟩ (cid:55)→ 1 √ 2 ( | 0 ⟩ + | 1 ⟩ ) and | 1 ⟩ (cid:55)→ 1 √ 2 ( | 0 ⟩ − | 1 ⟩ ), creating a quantum superposition, the NOT gate (cid:18) 01(cid:19) that permutes | 0 ⟩ and | 1 ⟩ , or R y rotation gate parametrized by an angle θ , given by (cid:18) cos( θ/ 2) − sin( θ/ 2) sin( θ/ 2) cos( θ/ 2) (cid:19) .
Common two-qubits gates include the CNOT gate   1 0 00 1 00 0 00 0 1  which is a NOT gate applied on the second qubit only if the first one is in state | 1 ⟩ .
The main advantage of quantum gates is their ability to be applied to a superposition of inputs.
Indeed, given a gate U such that U | x ⟩ (cid:55)→ | f ( x ) ⟩ , we can apply it to all possible combinations of x at once U ( 1 C (cid:80) x | x ⟩ ) (cid:55)→ 1 C (cid:80) x | f ( x ) ⟩ .
Appendix E. Error Analysis of the Quantum Inner Product Estimation Algorithm
The inner product estimation routine takes as input two vectors as quantum states | v i ⟩ and | v j ⟩ .
It outputs an estimate of the inner product ⟨ v i | v j ⟩ .
The vectors are amplitude encoded, meaning that | v i ⟩ is defined as
[Equation]
where v i,l is the l -th element of the vector v i and for the dimension d = 2 n has to hold, where n is the number of qubits of state | v i ⟩ .
Note, that amplitude encoding enforces that the vectors v i and v j are normalized.
Thus also for the IPE the input vectors are normalized.
Their norms are stored during the quantum inference and prediction algorithms to unnormalize the inner product estimate after the IPE computation.
This means that the error of the IPE is also multiplied by the norms
∥ v i ∥ and ∥ v j ∥ .
IPE calculates the inner product estimate by preparing a state | ψ ⟩ .
| ψ ⟩ has an amplitude on one of the measurable basis states that is proportional to the inner product ⟨ v i | v j ⟩ .
It then uses amplitude estimation, which was introduced by Brassard et al.
(2002), as a subroutine to compute the value of this amplitude.
Amplitude estimation uses phase estimation as a subroutine, so we will first look at phase estimation and cascade the error backward.
E.1. Phase Estimation
Phase estimation receives as input the following quantum state:
[Equation]
where n is the number of qubits.
The desired output is a good estimate of the phase parameter ω .
In general, the output of the phase estimation algorithm will be a superposition
[Equation]
of all possible integer states | x ⟩ , where x ∈ { 0 , . . .
, 2 n − 1 } .
We are interested in the amplitudes |
α x ( ω ) | 2 which define the output distribution of the phase estimation algorithm.
Let b be the integer in the range 0 to 2 n − 1 such that b 2 n = 0 .b 1 . . .
b n is the best n bit approximation of ω which is less than ω .
Then, the difference δ ≡ ω − b 2 n satisfies 0 ≤ ω ≤ 2 − n .
Applying the phase estimation algorithm, also known as the inverse Quantum
Fourier Transform, yields the state
[Equation]
The amplitude α l of the state | ( b + l )(mod 2 n ) ⟩ is
[Equation]
Here, the second equality stems from the closed-form formula for the geometric series.
The probability to measure the integer b + l mod 2 n is
[Equation]
where we used the fact that | 1 − e 2 ix | 2 = 4 | sin( x ) | 2 .
Note that the distribution in Equation (13) depends (through the variable δ ) on the phase ω , which is the variable that the phase estimation algorithm is trying to estimate.
This means that it will not be possible to predict the exact output distribution of the phase estimation algorithm, since that would require knowledge of ω .
E.2. Amplitude Estimation
The amplitude of the state | ψ ⟩ given by the IPE as an input to the amplitude estimation algorithm is
[Equation]
[Equation]
Phase estimation can obtain an estimate of ω for an amplitude of the form sin 2 ( πω ).
Thus the phase we try to estimate using phase estimation is
[Equation] [Equation]
Using the results from Section E. [Equation] we know that the phase estimate will be
[Equation] [Equation]
where b = argmin i | i 2 n − ω | , i ∈ { 0 , 1 , . . .
, 2 n } , with a probability of
[Equation] [Equation]
The output of the amplitude estimation will be
[Equation]
18) and the final output of the IPE algorithm is
[Equation]
19) as an estimate of the inner product ⟨ v i | v j ⟩ between the vectors v i and v j .
Appendix F. Additional results
The additional results from the simulation of both the linear regression and binary classification task can be found in this section.
Figure 4 shows the standard deviation of the BNN in the binary classification task
[Figure]
Figure 5, Figure 6 and Figure 7 show a comparison between low-rank and full-rank initialization of the linear regression and binary classification task.
Figure 8 are further results for the linear regression task for a larger set of qubits.
Figure 9 and Figure 10 show the mean prediction and standard deviation of the binary classification task respectively, both for a larger set of qubits.
[Figure]
1.0 X
Y ( a ) CICP, FR 1.
1.0 X
Y ( b ) CIQP, FR 1.
1.0 X
Y ( c ) QICP, FR 1.
1.0 X
Y ( d ) QIQP, FR 1.
1.0 X
Y ( e ) CICP, LR 1.
1.0 X
Y ( f ) CIQP, LR 1.
1.0 X
Y ( g ) QICP, LR 1.
1.0 X
Y ( h ) QIQP, LR
2 X
Y ( [Figure] CICP, FR  2 X
Y (
[Figure]
) CIQP, FR  2 X
Y ( c ) QICP, FR  2 X
Y ( d ) QIQP, FR  2 X
Y ( e ) CICP, LR  2 X
Y ( f ) CIQP, LR  2 X
Y ( g ) QICP, LR  2 X
Y ( h ) QIQP, LR
2 X
Y ( a ) CICP, FR  2 X
Y ( b ) CIQP, FR  2 X
Y ( c ) QICP, FR  2 X
Y ( d ) QIQP, FR  2 X
Y ( e ) CICP, LR  2 X
Y ( f ) CIQP, LR  2 X
Y ( g ) QICP, LR  2 X
Y ( h ) QIQP, LR
[Figure]
i
[Figure]
CIQP
[Figure]
l )
[Figure]
n
[Figure]
( m ) QICP, n =
[Figure]
[Figure] [Figure]
Y ( n ) QIQP, n =
[Figure]
[Figure] [Figure]
[Figure]
Y ( o ) CIQP, n =
[Figure]
[Figure]
X [Figure]
Y ( p ) QICP, n =
[Figure] [Figure] [Figure]
Y ( q ) QIQP, n =
[Figure] [Figure]
n
[Figure] [Figure]
[Figure]
CIQP
[Figure] [Figure]
n
[Figure] [Figure]
[Figure]
( h ) QIQP, n =
[Figure]
( i ) CIQP, n =
[Figure] [Figure]
[Figure]
( j ) QICP, n =
[Figure]
[Figure] [Figure]
Y ( k ) QIQP, n =
[Figure] [Figure]
[Figure]
Y ( l ) CIQP, n =
[Figure]
2 X
Y ( m ) QICP, n =  2 X
Y ( n ) QIQP, n =  2 X
Y ( o ) CIQP, n =  2 X
Y ( p ) QICP, n =  2 X
Y ( q ) QIQP, n = shows the expected increase in accuracy for higher qubit numbers n .
2 X
Y ( a ) CICP  2 X
Y ( b ) CIQP, n =  2 X
Y ( c ) QICP, n =  2 X
Y ( d ) QIQP, n =
[Figure]
( e ) Legend  2 X
Y ( f ) CIQP, n =  2 X
Y ( g ) QICP, n =  2 X
Y ( h ) QIQP, n =  2 X
Y ( i ) CIQP, n =  2 X
Y ( j ) QICP, n =  2 X
Y ( k ) QIQP, n =  2 X
Y ( l ) CIQP, n =  2 X
Y ( m ) QICP, n =  2 X
Y ( n ) QIQP, n =  2 X
Y ( o ) CIQP, n =  2 X
Y ( p ) QICP, n =  2 X
Y ( q ) QIQP, n =
I and P stand for Inference and Prediction .
The Figure shows the expected increase in accuracy for higher qubit numbers n .
[Figure]
i
[Figure]
L o g L i
k e li
h
oo d
[Figure]