Power and limitations of single-qubit native quantum neural networks
s
Abstract
Quantum neural networks (QNNs) have emerged as a leading strategy to establishapplications in machine learning, chemistry, and optimization.
While the applications of QNN have been widely investigated, its theoretical foundation remains lessunderstood.
In this paper, we formulate a theoretical framework for the expressiveability of data re-uploading quantum neural networks that consist of interleaved encoding circuit blocks and trainable circuit blocks.
First, we prove that single-qubitquantum neural networks can approximate any univariate function by mapping themodel to a partial Fourier series.
We in particular establish the exact correlationsbetween the parameters of the trainable gates and the Fourier coefficients, resolvingan open problem on the universal approximation property of QNN.
Second, wediscuss the limitations of single-qubit native QNNs on approximating multivariatefunctions by analyzing the frequency spectrum and the flexibility of Fourier coefficients.
We further demonstrate the expressivity and limitations of single-qubitnative QNNs via numerical experiments.
We believe these results would improveour understanding of QNNs and provide a helpful guideline for designing powerful
QNNs for machine learning tasks.
Introduction
Quantum computing is a technology that exploits the laws of quantum mechanics to solve complicatedproblems much faster than classical computers.
It has been applied in areas such as breakingcryptographic systems [1], searching databases Grover [2] and quantum simulation [3, 4], in whichit gives a quantum speedup over the best known classical algorithms.
With the fast developmentof quantum hardware, recent results [5–7] have shown quantum advantages in specific tasks.
Anemerging direction is to investigate if quantum computing can offer quantum advantages in artificialintelligence, giving rise to an interdisciplinary area called quantum machine learning [8].
A leading strategy to quantum machine learning uses quantum neural networks (QNNs), which arequantum analogs of artificial neural networks (NNs).
Much progress has been made in applications of
QNN in various topics [9–11], including quantum autoencoder [12, 13], supervised learning [14–17],dynamic learning [18–20], quantum chemistry [21], and quantum metrology [22–24].
Similar to thefield of machine learning, a crucial challenge of quantum machine learning is to design powerful andefficient QNN models for quantum learning tasks, which requires a theoretical understanding of howstructural properties of QNN may affect its expressive power.
The expressive power of a QNN model can be characterized by the function classes that it canapproximate.
Recently, the universal approximation property (UAP) of QNN models has beeninvestigated, which is similar to the universal approximation theorem [25, 26] in machine learningtheory.
The authors of [27] suggested that a QNN model can be written as a partial Fourier series inthe data and proved the existence of a multi-qubit QNN model that can realize a universal function approximator.
The UAP of single-qubit models remains an open conjecture, due to the difficultiesin analyzing the flexibility of Fourier coefficients.
Another work [28] considered hybrid classicalquantum neural networks and obtained the UAP by using the Stone-Weierstrass theorem.
Ref.
[29]proved that even a single-qubit hybrid QNN can approximate any bounded function.
The above results of UAP show that the expressivity of QNNs is strong, but it does not reveal therelationship between the structural properties of a QNN and its expressive ability.
Therefore the UAPmay not be a good guide for constructing QNN models with practical interests.
In particular, it isworth noting that the existence proof in Ref.
[27] is under the assumption of multi-qubit systems,exponential circuit depth, and arbitrary observables, which does not explicitly give the structure of
QNNs.
Meanwhile, Refs.
[28, 29] demonstrated the construction of QNNs in detail, but it is unclearwhether the powerful expressivity comes from the classical part or the quantum part of hybrid models.
Moreover, a systematic analysis of how parameters in the QNN affect the classes of functions that itcan approximate is missing.
The absence of these theoretical foundations hinders the understandingon the expressive power and limitation of QNNs, which makes it highly necessary but challenging todesign effective and efficient QNNs.
To theoretically investigate the expressivity of QNNs, it is important to study the simplest caseof single-qubit QNNs, just like the celebrated universal approximation theorem first showing theexpressivity of depth-2 NNs [25, 26].
In this paper, we formulate an analytical framework thatcorrelates the structural properties of a single-qubit native QNN and its expressive power.
We considerdata re-uploading models that consist of interleaved data encoding circuit blocks and trainable circuitblocks [30].
First, we prove that there exists a single-qubit native QNN that can express any Fourierseries, which is a universal approximator for any square-integrable univariate function.
It solves theopen problem on the UAP of single-qubit QNNs in Ref.
Second, we systematically analyzehow parameters in trainable circuit blocks affect the Fourier coefficients.
The main results on theexpressivity of QNNs are summarized as in Fig.
Third, we discuss potential difficulties for singlequbit native QNNs to approximate multivariate functions.
Additionally, we compare native QNNswith the hybrid version and show the fundamental difference in their expressive power.
We alsodemonstrate the expressivity and limitations of single-qubit native QNNs via numerical experimentson approximating univariate and multivariate functions.
Our analysis, beyond the UAP of QNNs,improves the understanding of the relationship between the expressive power and the structure of
QNNs.
This fundamental framework provides a theoretical foundation for data re-uploading QNNmodels, which is helpful to construct effective and efficient QNNs for quantum machine learningtasks.
We will start by giving some background and defining the native QNN models in the next section,and then analyze the expressivity of single-qubit native QNNs in Section 3.
In Section 4, we discussthe limitation of single-qubit native QNNs and compare native QNNs with hybrid QNNs, whichshows the fundamental difference between their expressive power.
The numerical experiments on theexpressivity and limitations of single-qubit native QNNs are described in Section 5.
Preliminaries2.1 A primer on quantum computing
Quantum state The basic unit of information in quantum computation is one quantum bit , or qubitfor short.
Just like a classical bit has a state in either 0 or 1 , a qubit also has a state.
A single-qubitstate is a unit vector in a 2-dimensional Hilbert space C 2 , which is commonly denoted in Diracnotation | ψ ⟩ = α | 0 ⟩ + β | 1 ⟩ , where | 0 ⟩ = (1 , 0) T and | 1 ⟩
= (0 , 1) T are known as computationalbasis states.
Here | ψ ⟩ denotes a column vector and its conjugate transpose ⟨ ψ | := | ψ ⟩ † is a rowvector.
Then the inner product ⟨ ψ | ψ ⟩ = ∥
ψ ∥ 2 denotes the square of L 2 -norm of | ψ ⟩ .
Note that | ψ ⟩ isa normalized state so ⟨ ψ | ψ ⟩ = | α | 2 + | β | 2 = 1 .
Having this constraint, a single-qubit state can berepresented as a point at surface of a Bloch sphere , written as | ψ ⟩ = cos( θ/ 2) | 0 ⟩ + e iϕ sin( θ/ 2) | 1 ⟩ ,where θ and ϕ are re-interpreted as azimuthal angle and polar angle in spherical coordinates.
Moregenerally, a quantum state of n qubits can be represented as a normalized vector in the n -fold tensorproduct Hilbert space C 2 n .
Quantum gate Quantum gates are basic operations used to manipulate qubits.
Unlike some classicallogical gates, quantum gates are reversible, so they can be represented as unitary transformationsin the Hilbert space.
A unitary matrix U satisfies U † U = UU †
=
I .
A commonly used group ofsingle-qubit quantum gates is the Pauli gates , which can be written as Pauli matrices:
[Equation]
The Pauli X , Y , and Z gates are equivalent to a rotation around the x , y , and z axes of the Blochsphere by π radians, respectively.
A group of more general gates is the rotation operator gates{ R P ( θ ) =
e − i θ 2 P | P ∈ { X, Y, Z }} , which allows the rotating angle around the x , y and z axes ofthe Bloch sphere to be customized.
They can be written in the matrix form as
[Equation]
X (
[Equation] [Equation]
Quantum measurement A measurement is a quantum operation to retrieve classical informationfrom a quantum state.
The simplest measurement is the computational basis measurement; for asingle-qubit state | ψ ⟩ = α | 0 ⟩ + β | 1 ⟩ , the outcome of such a measurement is either | 0 ⟩ with probability| α | 2 or | 1 ⟩ with probability | β | 2 .
Computational basis measurements can be generalized to Paulimeasurements , where Pauli matrices are observables that we can measure.
For example, measuring
Pauli Z is equivalent to the computational basis measurement, since | 0 ⟩ and | 1 ⟩ are eigenvectors of Zwith corresponding eigenvalues ± 1 .
Pauli Z measurement returns +1 if the resulting state is | 0 ⟩ andreturns − 1 if the resulting state is | 1 ⟩ .
We can calculate the expected value of Pauli Z measurementwhen the state is | ψ ⟩ :
[Equation]
Pauli measurements can be extended to the case of multiple qubits by a tensor product of Paulimatrices.
2.2 Data re-uploading quantum neural networks
We consider the data re-uploading QNN model [30], which is a generalized framework of quantummachine learning models based on parameterized quantum circuits [31].
A data re-uploading QNN isa quantum circuit that consists of interleaved data encoding circuit blocks S ( · ) and trainable circuitblocks V ( · ) ,
[Equation]
where x is the input data, θ = ( θ 0 , . .
, θ L ) is a set of trainable parameters, and L denotes thenumber of layers.
It is common to build the data encoding blocks and trainable blocks using the most prevalent parameterized quantum operators { R X , R Y , R Z } .
We define the output of this model asthe expectation value of measuring some observable M ,
[Equation]
Note that some data re-uploading QNNs introduce trainable weights in data pre-processing or postprocessing, which are considered as hybrid QNNs.
For example, the data encoding block defined as
S ( w · x ) is essentially equivalent to feeding data x into a neuron with weight w and then uploadingthe output to an encoding block S ( · ) .
Such a mixing structure makes it hard to tell whether theexpressive power comes from the classical or quantum part.
To solely study the expressive power of
QNNs, we define the concept of native QNN , where all trainable weights are introduced by parametersof tunable quantum gates so that they can be distinguished from a hybrid QNN.
Throughout thispaper, we simply refer to the native QNN as QNN for short unless specified otherwise.
Expressivity of single-qubit QNNs
To better understand the expressive power of QNNs, we start investigating the simplest case ofsingle-qubit models.
Ref.
[27] investigated the expressive power of QNNs using the Fourier seriesformalism.
In this section, we establish an exact correlation between the single-qubit QNN and the
Fourier series in terms of both the frequency spectrum and Fourier coefficients.
Note that we considerone-dimensional input data for now, which corresponds to the class of univariate functions.
A Fourier series is an expansion of a periodic function f ( x ) in infinite terms of a sum of sines andcosines which can be written in the exponential form as
[Equation] [Equation]
where
[Equation]
(7) are the Fourier coefficients.
Here T is the period of function f ( x ) .
The quantities n 2 πT are called thefrequencies , which are multiples of the base frequency 2 πT .
The set of frequency { n 2 πT } n is called thefrequency spectrum of Fourier series.
In approximation theory, a partial Fourier series (or truncated Fourier series)
[Equation]
is commonly used to approximate the function f ( x ) .
A partial Fourier series can be transformed to a
Laurent polynomial P ∈ C [ z, z − 1 ] by the substitution z
= e i 2 πT x , i.e.,
[Equation]
A Laurent polynomial P ∈ F [ z, z − 1 ] is a linear combination of positive and negative powers of thevariable z with coefficients in F .
The degree of a Laurent polynomial P is the maximum absolutevalue of any exponent of z with non-zero coefficients, denoted by deg( P ) .
We say that a Laurentpolynomial P has parity 0 if all coefficients corresponding to odd powers of z are 0 , and similarly Phas parity 1 if all coefficients corresponding to even powers of z are 0 .
Following the pattern of Fourier series, we first consider using R Z ( x ) =
e − ixZ/ 2 to encode the inputx and let R Y ( · ) be the trainable gate.
We can write the QNN as
[Equation]
and the quantum circuit is shown in Fig.
[Equation]
To characterize the expressivity of this kind of basic QNN, we first rigorously show that the QNN
U YZY θ ,L ( x ) can be represented in the form of a partial Fourier series with real coefficients.
Lemma 1 There exists θ =
( θ 0 , θ 1 , . .
, θ L ) ∈ R L +1 such that
[Equation]
if and only if real Laurent polynomials P, Q ∈ R [ e ix/ 2 , e − ix/ 2 ] satisfy1.
deg( P ) =
deg( Q ) ≤ L ,2.
P and Q have parity L (mod 2) ,3.
∀ x ∈ R , | P | 2 + | Q | 2 = 1 .
Lemma 1 decomposes the unitary matrix of the QNN U YZY θ ,L ( x ) into Laurent polynomials with realcoefficients, which can be used to represent a partial Fourier series with real coefficients.
Note thatthe Fourier coefficients have a constraint (cid:80) n | c n | ≤ 1 by the condition 3 in Lemma 1.
The proof of Lemma 1 uses a method of mathematical induction that is in the similar spirit of the proofof quantum signal processing [32–34], which is a powerful subroutine in Hamiltonian simulation [4]and quantum singular value transformation [34].
The forward direction is straightforward by thedefinition of U YZY θ ,L ( x ) in Eq.
The proof of the backward direction is by induction in L wherethe base case L = 0 holds trivially.
For L > 0 , we prove that for any U YZY θ ,L ( x ) where P, Q satisfythe three conditions, there exists a unique block R † Y ( θ k ) R † Z ( x ) such that polynomials ˆ P and ˆ Q in
U YZY θ ,L ( x ) R † Y ( θ k ) R † Z ( x ) satisfy the three conditions for L − 1 .
Lemma 1 explicitly correlates thefrequency spectrum of the Fourier series and the number of layers L of the QNN.
Note that the proofof Lemma 1 also illustrates the exact correspondence between the Fourier coefficients and parametersof trainable gates.
A detailed proof can be found in Appendix A.1.
By Lemma 1, the partial Fourier series corresponding to the QNN U YZY θ ,L ( x ) only has real coefficients.
With the exponential form of Eq.
(6), a Fourier series with real coefficients only has cos( nx ) terms,which means U YZY θ ,L ( x ) can be used to approximate any even function on the interval [ − π, π ] .
Thuswe establish the following proposition, whose proof is deferred to Appendix A.2.
Proposition 2 For any even square-integrable function f : [ − π, π ] → [ − 1 , 1] and for all ϵ > 0 ,there exists a QNN U YZY θ ,L ( x ) such that | ψ ( x ) ⟩
= U YZY θ ,L ( x ) | 0 ⟩ satisfies
[Equation]
Although the above result states that the QNN U YZY θ ,L ( x ) | 0 ⟩ is able to approximate a class of evenfunctions within arbitrary precision, we can see that the main limitation of the expressive powerof QNN U YZY θ ,L ( x ) is the real Fourier coefficients, which may restrict its universal approximationcapability.
To tackle this issue, our idea is to introduce complex coefficients to the corresponding Laurentpolynomials, which can be implemented by adding a trainable Pauli Z rotation operator in each layer.
Specifically, we consider the QNN
[Equation]
where each trainable block is W ( θ j , ϕ j ) :
= R Y ( θ j ) R Z ( ϕ j ) .
The quantum circuit of U WZW θ , ϕ ,L ( x ) isillustrated in Fig.
[Equation]
To characterize the capability of this QNN, we establish the following Lemma which implies
U WZW θ , ϕ ,L ( x ) can express any Fourier partial sum with complex Fourier coefficients.
Lemma 3 There exists θ =
( θ 0 , θ 1 , . .
, θ L ) ∈ R L +1 and ϕ = ( ϕ 0 , ϕ 1 , . .
. , ϕ L
) ∈ R L +1 such that
[Equation]
if and only if Laurent polynomials P, Q ∈ C [ e ix/ 2 , e − ix/ 2 ] satisfy1.
deg( P ) =
deg( Q ) ≤ L ,2.
P and Q have parity L (mod 2) ,3.
∀ x ∈ R , | P | 2 + | Q | 2 = 1 .
Lemma 3 demonstrates a decomposition of the QNN U WZW θ , ϕ ,L ( x ) into Laurent polynomials withcomplex coefficients, which can be used to represent a partial Fourier series with complex coefficientsin form of Eq.
The proof of Lemma 3 is similar to the proof of Lemma 1 and its details areprovided in Appendix A.3.
Again, the proof demonstrates the effect of parameterized gates on thecontrol of Fourier coefficients.
We then prove in the following Theorem 4 that U WZW θ , ϕ ,L ( x ) is able toapproximate any square-integrable function within arbitrary precision, using the well-establishedresult in Fourier analysis.
The detailed proof is deferred to Appendix A.4.
Theorem 4 (Univariate approximation properties of single-qubit QNNs.)
For any univariatesquare-integrable function f : [ − π, π ] →
[ − 1 , 1] and for all ϵ > 0 , there exists a QNN U WZW θ , ϕ ,L ( x )such that | ψ ( x ) ⟩ = U WZW θ , ϕ ,L ( x ) | 0 ⟩ satisfies
[Equation]
Up till now we only let the encoding gate be the R Z ( x ) gate, what if we use other rotation operatorgates to encode the data?
It actually does not matter which one we choose as the encoding gate ifthe trainable gates are universal.
Note that Pauli rotation operators R X ( x ) , R Y ( x ) , R Z ( x ) have twoeigenvalues cos( x/ 2) ± i sin( x/ 2) , and they can be diagonalized as Q † R Z ( x ) Q .
Merging unitaries
Q † and Q to universal trainable gates gives the QNN that uses R Z ( x ) as the encoding gate.
Wehereby define the generic single-qubit QNNs as
[Equation]
where each trainable block is the generic rotation gate
[Equation]
By definition, any L -layer single-qubit QNN, including U WZW θ , ϕ ,L , can be expressed as U UZU θ , ϕ , λ ,L .
Thus
U UZU θ , ϕ , λ ,L is surely a universal approximator.  Limitations of single-qubit QNNs
We have proved that a single-qubit QNN is a universal approximator for univariate functions, itis natural to consider its limitations.
Is there a single-qubit QNN that can approximate arbitrarymultivariate functions?
We answer this question from the perspective of multivariate Fourier series.
Specifically, we consider the generic form of single-qubit QNNs defined in Eq. and upload theclassical data x := ( x [Equation]
1) , x (
[Equation]
, · · · , x
[Equation]
) ∈ R d as
[Equation]
[Equation]
where each x j ∈ x and L ∈ N + .
Without loss of generality, assume that each dimension x ( i ) isuploaded the same number of times, denoted by K .
Naturally, we have Kd =
L .
Further, we rewritethe output of QNNs defined in Eq.
(5) as the following form.
[Equation]
where Ω = {− K, · · · , 0 , · · · , K } d , and the c ω is determined by parameters θ and the observable M .
A detailed analysis can be found in Appendix B. We can see that Eq.
(19) cannot be represented asa K -truncated multivariate Fourier series.
Specifically, by the curse of dimensionality, it requiresexponentially many terms in d to approximate a function in d dimensions.
However, for f θ ,L ( x ) , thedegrees of freedom grow linearly with the number of layers L .
It implies that single-qubit native
QNNs potentially lack the capability to universally approximate arbitrary multivariate functions fromthe perspective of the Fourier series.
Despite the potential limitation of native QNNs in multivariate approximation, it has been proved thata single-qubit hybrid QNN can approximate arbitrary multivariate functions [28, 29].
However, the
UAP of hybrid QNNs is fundamentally different from the native model that we investigated.
Thosehybrid models involve trainable weights either in data pre-processing or post-processing.
Specifically,introducing trainable weights in data pre-processing is equivalent to multiplying each frequency ofthe Fourier series by an arbitrary real coefficient, i.e.
[Equation]
Therefore it enriches the frequency spectrum of native QNNs, which only contain integer multiplesof the fundamental frequency.
It can also be readily extended to the encoding of multi-dimensionaldata x :=
( x (1) , x (2) , · · · , x ( d ) ) as
[Equation]
where w = ( w 1 , . .
. , w d ) is a vector of trainable weights.
Using such an encoding method enables asingle-qubit QNN to approximate any continuous multivariate function [29].
We notice that, althoughthe trainable weights enrich the frequency spectrum of the Fourier series, the capability of hybrid
QNNs to approximate arbitrary multivariate functions is not obtained using the multivariate Fourierseries, but the universal approximation theorem [25, 26] in machine learning theory.
In another word,the multivariate UAP of a hybrid QNN mostly comes from the classical structure, and the QNNserves as an activation function σ ( x ) =
e − ix in the universal approximation theorem.
This fact mightbe able to shed some light on the reason why a hybrid QNN does not provide quantum advantagesover the classical NN.
Numerical experiments
In order to better illustrate the expressive power of single-qubit native QNNs, we supplement thetheoretical results with numerical experiments.
Specifically, we demonstrate the flexibility andapproximation capability of single-qubit native QNNs in Section 5.1.
The limitations of single-qubit
QNNs are illustrated in Section 5.2 through the numerical experiments on approximating multivariatefunctions.
All simulations are carried out with the Paddle Quantum toolkit on the PaddlePaddle Deep
Learning Platform, using a desktop with an 8-core i7 CPU and 32GB RAM.
A damping function [Equation] x is used to demonstrate the approximation performance ofsingle-qubit native QNN models.
The dataset consists of 300 data points uniformly sampled fromthe interval [0 , π ] , from which 200 are selected for the training set and 100 for the test set.
Since the function f ( x ) is an even function, we use the QNN model as defined in Eq.
The parametersof trainable gates are initialized from the uniform distribution on [0 , 2 π ] .
We adopt a variationalquantum algorithm, where a gradient-based optimizer is used to search and update parameters in the
QNN.
The mean squared error (MSE) serves as the loss function.
Here the Adam optimizer is usedwith a learning rate of 0.1.
We set the training iterations to be 100 with a batch size of 20 for allexperiments.
While approximating a function f ( x ) by a truncated Fourier series, the approximation error decreasesas the number of expansion terms increases.
As shown in Lemma 3, the frequency spectrum and
Fourier coefficients will be extended by consecutive repetitions of the encoding gate and trainablegate.
The numerical results in Fig.
4 illustrate that the approximation error decreases as the numberof layers increases, which are consistent with our theoretical analysis.
To further show the flexibility and capability of single-qubit QNNs, we pick a square wave functionas the target function. The training set contains 400 data points sampled from the interval [0 , 20] . The numerical results are illustrated in Fig. By simply repeating 45 layers, the single-qubit QNN
U WZW θ , ϕ ,L ( x ) learns the function hidden beneath the training data.
In particular, the approximationworks well not only for input variables located between the training data but also outside of the region,because the Fourier series has a natural capability in dealing with periodic functions.
5.2 Multivariate function approximation
We numerically demonstrate the limitations of single-qubit native QNNs in approximate multivariatefunctions.
We examine the convergence of the loss as the number of layers of the circuit increasesand compare the outcome with the target function.
Specifically, we consider a bivariate functionf ( x, y ) =
( x 2 + y − 1 .
{+5 π ) 
+}
+ ( x + y 2 − π ) 2 as the target function.
Note that f ( x, y ) is normalizedon the interval [ − π, π ] 2 , i.e., − 1 ≤ f ( x, y ) ≤ 1 .
The training set consists of 400 data points sampled from interval [ − π, π ] 2 .
We use the singlequbit QNN with various numbers of layers defined as Eq.
(18) to learn the target function.
Theexperimental setting is the same as in the univariate function approximation.
In order to reduce theeffect of randomness, the experimental results are averaged over 5 independent training instances.
Fig.
6 shows that the single-qubit native QNN has difficulty in approximating bivariate functions.
The approximation result of QNN as shown in Fig.
6b is quite different from the target function, evenfor a very deep circuit of 40 layers.
Also, the training loss in Fig.
6c does not decrease as the numberof layers increases.
Note that the target function is only bivariate here, the limitations of single-qubitnative QNNs will be more obvious in the case of higher dimensions.
We further propose a possiblestrategy that extends single-qubit QNNs to multiple qubits, which could potentially overcome thelimitations and handle practical classification tasks, see Appendix C for details.
[Figure]
Conclusion and outlook
In this work, we presented a systematic investigation of the expressive power of single-qubit native
QNNs, which are capable to approximate any square-integrable univariate function with arbitraryprecision.
We not only give an existence proof but also analytically show an exact mapping betweennative QNNs and the partial Fourier series from perspectives of both frequency spectrum and Fouriercoefficients, which solves an open problem on the UAP of single-qubit QNNs in Ref. Our proof,inspired by quantum signal processing, explicitly illustrates the correlation between parameters oftrainable gates and the Fourier coefficients. Other than the expressivity, we also discuss the limitationof single-qubit QNNs from the perspective of multivariate Fourier series. Both the expressivityand limitation of single-qubit QNNs are validated by numerical simulations.
We expect our resultsprovide a fundamental framework to the class of data re-uploading QNNs, which serves as insightfulguidance on the design of such QNN models.
Although the expressive power of a single-qubit QNN have been well investigated, it may not bean ideal model in practice due to the potential limitations on approximating multivariate functions.
Moreover, single-qubit models can be efficiently simulated by classical computers and hence cannotbring any quantum advantage.
Therefore one future step is to generalize the framework of single-qubit QNNs to multivariate function approximators. The multi-qubit QNNs with UAP as shown in Ref.
[27]require exponential circuit depth, which is impractical to implement and also does not imply quantumadvantage.
It is of great interest to investigate the efficient implementation of QNNs with universalapproximation properties for multivariate functions.
A recent paper presents a method that extendsquantum signal processing to multivariable [35], which might be applicable to single-qubit QNNs.
Checklist
For all authors...(
a) Do
the main claims
made in the
abstract
and introduction accurately reflect the paper’scontributions and scope? Yes]
(b) Did you describe the limitations of your work?
[Yes] See Section 4 and Section 5.2.
(c) Did you discuss any potential negative societal impacts of your work?
[No]
(d) Have you read the ethics review guidelines and ensured that your paper conforms to
them?
[Yes]
If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results?
[Yes]
(b) Did you include complete proofs of all theoretical results?
[Yes] See Appendix A.
If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main experi-
mental results (either in the supplemental material or as a URL)?
[Yes]
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how theywere chosen)?
[Yes] See Section 5.
(c) Did you report error bars (e.g., with respect to the random seed after running experi-
ments multiple times)?
[No]
(d) Did you include the total amount of compute and the type of resources used (e.g., type
of GPUs, internal cluster, or cloud provider)?
[Yes] See Section 5.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
(a) If your work uses existing assets, did you cite the creators?
[Yes] See Appendix C.
(b) Did you mention the license of the assets?
[Yes] See Appendix C.
(c) Did you include any new assets either in the supplemental material or as a URL?
[N/A]
(d) Did you discuss whether and how consent was obtained from people whose data you’re
using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identifiable
information or offensive content?
[N/A]
If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given to participants and screenshots, if
applicable?
[N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review
Board (IRB) approvals, if applicable?
[N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount
spent on participant compensation?
[N/A]
A Detailed Proofs
A.1 Proof of Lemma
Lemma 1 There exists θ = ( θ 0 , θ 1 , . . , θ L ) ∈ R L +1 such that [Equation]
(S1) if and only if real Laurent polynomials P, Q ∈ R [ e ix/ 2 , e − ix/ 2 ] satisfy1.
deg( P ) =
deg( Q ) ≤ L ,2.
P and Q have parity L (mod 2) ,3.
∀ x ∈ R , | P | 2 + | Q | 2 = 1 .
Proof First we prove the forward direction, i.e. Eq. (S1) implies the three conditions, by inductionon L .
For the base case, if L = 0 , then R Y ( θ 0 ) gives P = cos( θ 0 / 2) and Q = sin( θ 0 / 2) , whichclearly satisfies the conditions.
For the induction step, suppose Eq. (S1) satisfies the three conditions.
Then(cid:20)
[Equation]
where
[Equation] S [Equation]
clearly satisfy the first condition deg( ¯ P ) = deg( ¯ Q ) ≤ L + 1 . They also satisfy the second conditionsince multiplying by e − ix/ 2 or e ix/ 2 alters the parity. The third condition follows from unitarity.
Next we show the reverse by induction on L that the three conditions suffice to construct the QNN in
Eq. (S1).
For the base case, we have L = 0 and deg( P ) =
deg( Q ) = 0 .
Note that P and Q are realpolynomials, i.e. the coefficients must be real numbers, so condition 3 implies that P = cos( θ 0 / 2)and Q = sin( θ 0 / 2) for some θ 0 ∈ R .
Thus the matrix(cid:20)
[Equation]
Q
[Equation]
P
[Equation]
(S
[Equation]
can be written as a QNN U YZY θ , 0 ( x ) =
R Y ( θ 0 ) .
For the induction step, suppose Laurent polynomials P and Q satisfy the three conditions for some
L > 0 .
We first observe that condition 3 implies
[Equation]
where PP ∗ + QQ ∗ is a Laurent polynomial with parity 2 n (mod 2) ≡ 0 .
Let d :=
deg( P ) =
deg( Q ) , then d ≤ L by the first condition.
Since Eq.
{+(S9) holds for all x ∈ R , the leading coefficients must satisfy p d p − d + q d q − d = 
+}
so they cancel.
We choose θ k ∈ R so that
[Equation]
Now we briefly argue that there always exists a θ k satisfies equations above.
If all p d , p − d , q d , q − dare not 0 , simply let tan θ k 2 = − p d q d .
Then consider the case of zero coefficients.
Since deg( P ) =
deg( Q ) =
d , at most two of p d , p − d , q d , q − d could be 0 .
The fact p d p − d + q d q − d = 0 implies thatone of p d , p − d is 0 if and only
if one of q d , q − d is 0 .
If p d = q d = 0 (or p − d = q − d = 0 ), pick θ kso that tan θ k 2 =
q − d p − d (or tan θ k 2 = − p d q d ).
{+If p d = q − d = 0 (or p − d = q d = 0 ), pick θ k so thatsin θ k 2 = 
+}
(or cos θ k 2 = 0 ).
Next, for the θ k that satisfies Eq.
(S10) and Eq.
(S11) simultaneously, we consider
[Equation]
P
[Equation] [Equation]
where
[Equation]
S16)
Since P, Q ∈ R [ e ix/ 2 , e − ix/ 2 ] are Laurent polynomials with degree d , ˆ P ∈ R [ e ix/ 2 , e − ix/ 2 ] mightappear to be a Laurent polynomial with degree d +1 .
In fact it has degree deg( ˆ P ) ≤ d − 1 , because thecoefficient of ( e ix/ 2 ) d +1 term in ˆ P is cos θ k 2 p d
+sin θ k 2 q d = 0 by the choice of θ k , and the coefficientof ( e ix/ 2 ) d term is 0 by condition 2.
Similarly, ˆ Q has leading coefficient cos θ k 2 q − d − sin θ k 2 p − d = 0and has degree deg( ˆ Q ) ≤ d − 1 .
Since d ≤ L , we have deg( ˆ P ) =
deg( ˆ Q ) ≤ L − 1 , hencecondition 1 is satisfied.
From the parity of P and Q , it is easy to see that ˆ P and ˆ Q have parity
L − 1 (mod 2) , thus condition 2 is satisfied.
Condition 3 follows from unitarity.
By the inductionhypothesis, Eq.
(S14) can be written as a QNN in the form of U YZY θ ,L − 1 ( x ) , and therefore the matrix(cid:20) P − Q
[Equation]
(cid:21) (S17) can be written as a QNN in the form of U YZY θ ,L ( x ) .
■
We note that the above proof is in a similar spirit of the proof of quantum signal processing [32–34].
A.2 Proof of Proposition 2
Proposition 2 For any even square-integrable function f : [ − π, π ] → [ − 1 , 1] and for all ϵ > 0 ,there exists a QNN U YZY θ ,L ( x ) such that | ψ ( x ) ⟩
= U YZY θ ,L
[Equation]
|
[Equation]
satisfies
[Equation]
Proof First, it is known that any even square-integrable function f ( x ) can be approximated by atruncated Fourier series [36].
For any ϵ > 0 , there exists a K ∈ N + such that
[Equation]
S19) where f K ( x ) is the K -term partial Fourier series of even function f ( x ) .
Consider the function 547 (cid:113)
[Equation]
, using the property of square-integrable functions again, there exists an L ∈ N + such that
[Equation]
where
[Equation]
{+is the partial Fourier series of the even function (cid:113) 
+}
+ f K [Equation] x )and L (mod 2) = 0 . Next we need toprove
[Equation]
Specifically, g L ( x ) can be written as follows,
[Equation]
where c n = c − n = a n / 2 .
Obviously, g L ∈ R [ e ix/ 2 , e − ix/ 2 ] and conditions of Lemma 1 are satisfied,so Eq.
(S22) holds.
Further, we have
[Equation] [Equation]
, (S25) ≤ ϵ 2 , (S26)
where
∥ g L ( x ) ∥ ≤ 1 and (cid:13)(cid:13)(cid:13)(cid:13)(cid:113) 1+ f K ( x )(cid:13)(cid:13)(cid:13)(cid:13) ≤ 1 .
Finally, combined with inequality (S19), inequality (S18)holds.
■
A.3 Proof of Lemma
Lemma 3 There exists θ =
( θ 0 , θ 1 , . . , θ L ) ∈ R L +1 and ϕ = ( ϕ 0 , ϕ 1 , . . . , ϕ L ) ∈ R L +1 such that
[Equation]
if and only if Laurent polynomials P, Q ∈ C [ e ix/ 2 , e − ix/ 2 ] satisfy1.
deg( P ) =
deg( Q ) ≤ L ,2.
P and Q have parity L (mod 2) ,3.
∀ x ∈ R , | P | 2 + | Q | 2 = 1 .
Proof The entire proof is similar as the proof of Lemma 1, and the only difference is that thecoefficients of Laurent polynomials could be complex rather than real.
First we prove the forwarddirection by induction on L .
For the base case, if L = 0 , then W ( θ 0 , ϕ 0 )
=
R Y ( θ 0 )
R Z ( ϕ 0 ) gives
P = e − i ϕ 02 cos( θ 0 / 2) and Q = e i ϕ 02 sin( θ 0 / 2) , which clearly satisfies the three conditions.
For the induction step, suppose Eq.
(S27) satisfies the three conditions.
Then [Equation]
where
[Equation]
clearly satisfy the first condition deg( ¯ P ) =
deg( ¯ Q
[Equation]
≤ L + 1 .
They also satisfy the second conditionsince multiplying by e − ix/ 2 or e ix/ 2 alters the parity.
The third condition is satisfied because ofunitarity.
Next we show the backward direction by induction on L that the three conditions suffice to constructthe QNN in Eq.
(S27).
First we consider the base case of L = 0 , we have deg( P ) =
deg( Q ) = 0 , theabove condition implies that P = e − iϕ 0 / 2 cos( θ 0 / 2) and Q = e iϕ 0 / 2 sin( θ 0 / 2) for some θ 0 , ϕ 0 ∈ R .
Thus the matrix
[Equation]
can be written as a QNN U WZW θ , ϕ ,L ( x ) = R Y ( θ 0 ) R Z ( ϕ 0 ) .
For the induction step, suppose Laurent polynomials P and Q satisfy the three conditions for some
L > 0 .
We first observe that condition 3 implies
[Equation]
where PP ∗ + QQ ∗ is a polynomial in e ix/ 2 with parity 2 n (mod 2)
= 0 .
Since Eq.
(S35) holds forall x ∈ R , the leading coefficients must satisfy p
d p ∗− d + q d q ∗− d = 0 and p ∗ d p − d + q ∗ d q − d = 0 , whered := deg( P ) =
deg( Q ) .
By the first condition, we have d ≤ L .
We choose θ k , ϕ k ∈ R so that
[Equation]
Now we briefly argue that there always exists θ k and ϕ k satisfy equations above.
If all p d , p − d , q d , q − dare not zero, simply let tan (cid:0) θ k 2 (cid:1)
e − iϕ k = − p
d q d .
Then consider the case of zero coefficients.
Sincedeg( P ) =
deg( Q ) =
d , at most two of p d , p − d , q d , q − d could be 0.
{+The fact p d p ∗− d + q d q ∗− d = 0implies that one of one of p d , p − d is 
+}
if and only if one of q d , q − d is 0.
If p d = q d = 0 (orp − d = q − d = 0 ), pick θ k and ϕ k
so that tan ( θ k 2 ) e iϕ k = q − d p − d .
If p d = q − d = 0 or ( p − d = q d = 0 ),pick θ k so that sin ( θ k 2 ) = 0 (or cos ( θ k 2 ) = 0 ).
Next, for the θ k that we pick, consider
[Equation]
where
[Equation]
Since P, Q ∈ C [ e ix/ 2 , e − ix/ 2 ] are Laurent polynomials with degree d , ˆ P ∈ R [ e ix/ 2 , e − ix/ 2 ] mightappear to be a Laurent polynomial with degree d + 1 .
In fact it has degree deg( ˆ P ) ≤ d − 1 , becausethe coefficient of ( e i x 2 ) d +1 term in ˆ P is cos θ k 2 e i ϕk 2 p d + sin θ k 2 e − i ϕk
2 q d = 0 by the selected θ k andϕ k , and the coefficients of ( e ix 2 ) d term is 0 by condition 2.
Similarly, ˆ Q has leading coefficient− sin θ k 2 e i ϕk 2 p − d
+ cos θ k 2 e − i ϕk 2 q − d = 0 and has degree deg( ˆ Q ) ≤ d − 1 .
Since d ≤ L , we havedeg( ˆ P ) =
deg( ˆ Q ) ≤ L − 1 , hence condition 1 is satisfied.
From the parity of P and Q , it is easyto see that ˆ P and ˆ Q have parity L − 1 (mod 2) , thus condition 2 is satisfied.
Condition 3 followsfrom unitarity.
Thus by the induction hypothesis, Eq.
(S40) can be written as a QNN in the form of
U WZW θ , ϕ ,L − 1 ( x ) , and therefore the matrix
[Equation]
can be written as a QNN in the form of U WZW θ , ϕ ,L ( x ) .
■
A.4 Proof of Theorem
Theorem 4 (Univariate approximation properties of single-qubit QNNs.)
For any univariatesquare-integrable function f : [ − π, π ] →
[ − 1 , 1] and for all ϵ > 0 , there exists a QNN U WZW θ , ϕ ,L ( x )such that | ψ ( x ) ⟩ = U WZW θ , ϕ ,L ( x ) | 0 ⟩ satisfies
[Equation]
Proof Similar as in the proof of Proposition 2, we use the fact that square-integrable functions f
canbe approximated by a truncated Fourier series.
Then, there exists a K ∈ N + such that
[Equation]
where f K ( x ) is the K -term truncated Fourier series of f ( x ) . Consider the function (cid:113) 1+ f K ( x ), usingthe property of square-integrable functions again, there exists an L ∈ N + such that [Equation] where
[Equation]
{+is the partial Fourier series of function (cid:113) 
+}
+ f K ( x )and L (mod 2) = 0 .
Next we need to prove
[Equation]
[Equation]
Specifically, g L ( x ) can be written as follows
[Equation]
Obviously, g L ∈ C [ e ix/ 2 , e − ix/ 2 ] and conditions of Lemma 3 are satisfied, thus Eq.
(S48) holds.
Further, we have
[Equation]
Finally, combined with inequality (S45), the inequality (S44) holds.
■
B Fourier frequency and encoding block
In this section, we show that if the single-qubit native QNN is written in the form of a K -truncatedmultivariate Fourier series, it has a rich Fourier frequency set Ω , but it cannot meet the requirementsof the corresponding Fourier coefficients set C Ω due to the curse of dimensionality.
Specifically, letx :=
( x (1) , x (2) , . . .
, x ( d ) ) ∈ R d and the single-qubit native QNN is defined as follows: [Equation] where x j is a one-dimensional data of x , i.e., x j ∈ { x ( m ) | m = 1 , · · · , d } . The quantum circuit isshown in Fig. S1.
[Equation]
θ ,L ( x ) , where the trainable block is composed of U 3 ( · ) , and the encoding block is R Z ( · ) .
Note that there is no restriction on the encoding order of x ( m ) .
Without loss of generality, assume that each one-dimensional data x ( m ) is uploaded the same numberof times, denoted by K , then we have Kd =
L .
Further, we write V j := U 3 ( θ j , ϕ j , λ j ) for short, thatis [Equation] where λ 0 = 12 and λ 1 = − 12 .
More generally, we have
[Equation]
Next, we reformulate the above equation using x ( m ) instead of x j .
We denote I m ⊂ { 1 , · · · , L } asthe index set of encoding block R Z ( x ( m ) )
and I ′ m = { λ j k | k ∈ I m } , then U θ ,L ( x
[Equation] = [Equation]
where j is bit-strings composed of j l , l = 1 , · · · , L and Λ ( m )
j = (cid:80) λ , λ ∈
I ′ m .
Further, for the initialstate | 0 ⟩ and some observable M , we have [Equation] where Ω = { h j,k := (Λ (1) k − Λ (1) j , · · · , Λ ( d ) k − Λ ( d ) j ) | j, k ∈ { 0 , 1 } L } .
We consider the m -thdimension, [Equation] Since λ = ± 12 , for all λ ∈ I ′ m , we can derive
[Equation] Then the Fourier frequency spectrum is Ω = {− K, · · · , 0 , · · · , K } d . For the Fourier coefficient set
C Ω = { c ω | ω ∈ Ω } , we have [Equation]
) and
[Equation]
If the number of truncation terms K is fixed, as the dimension d increases, the degrees of freedom ofthe set C Ω increase with O ( d ) , so it cannot represent any exponential size Fourier coefficients set.
Thus for all θ ∈ R 3( L +1) , the Eq.
(S55) cannot express an arbitrary k -truncated multivariate Fourierseries.
C Extension to multi-qubit QNNs
We have already shown that single-qubit native QNNs are able to approximate any univariate functionbut possibly could not approximate arbitrary multivariate functions by Fourier series in Section 3and Section 4.
To address this limitation, research into the extension approach of single-qubit native
QNNs is crucial.
For classical NNs, a common approach toward overcoming such limitations is toincrease the width or depth of the networks.
We conjecture that QNNs have similar characteristics. We hereby provide a multi-qubit extension strategy as shown in Fig.
S2, called Parallel-Entanglement ,introducing quantum entanglement by multi-qubit gates such as CNOT gates.
Similar to classical
NNs in which different neurons are connected by trainable parameters to form deep NNs, QNNs canestablish the connection between different qubits through quantum entanglement.
[Equation]
We numerically show that the multi-qubit extension as shown in Fig.
S2 could improve the expressivityof single-qubit QNNs.
Consider the same bivariate function f ( x, y )
= ( x 2 + y − 1 .
5 π )
+( x + y 2 − π ) 2used in Section 5.2, we use a two-qubit QNN of L = 10 and D tr = 3 to approximate the targetfunction f ( x, y ) with the same training setting. The experimental results are shown in Fig.
S3.
Compared with the approximation results of single-qubit QNNs in Fig. 6, we can see that the twoqubit QNN has stronger expressive power than single-qubit models. Moreover, we could build theuniversal trainable block (UTB) using a universal two-qubit quantum gate [37, 38] consisting of
U 3 and CNOT gates.
Specifically, a two-qubit universal trainable block can express any two-qubitunitary matrix.
Using a two-qubit QNN with UTBs yields a better approximation result which isshown in Fig.
S4.
From the numerical results, we could see that the multi-qubit extension couldpotentially overcome the limitations of single-qubit QNNs on approximating multivariate functionsas illustrated in Section 4. [Figure] [Figure]
We further illustrate the ability of Parallel-Entanglement models to address practical problems throughexperiments on the classification task. The public benchmark data sets are used to demonstrate thecapabilities of Parallel-Entanglement models to tackle classification tasks.
[Table] Breast
Cancer
[Table] The performance of the Parallel-Entanglement model on classifying Iris [39], Breast Cancer [40], and
HTRU2 [41] data sets are summarized in Table 1.
Specifically, 100 pieces of data are sampled from the dataset, with 80% of them serving as the training set and 20% serving as the test set. We use the Adam optimizer with a learning rate of 0.1 and a batch size of 40 to train the multi-qubit QNNs.
Inorder to reduce the effect of randomness, the results of classification accuracy are averaged over 10independent training instances.
The Iris data set contains 3 different classes, each class only has four attributes. Obviously, the4-qubit model easily obtains an average accuracy of over 99% with only 1 layer on Iris data.
The
HTRU2 data set only has two categories, and each example has 8 attributes. As a result, an 8qubit QNN is required to complete this task. The average accuracy for binary classification with1 layer achieves above 91% .
We can see that adding the number of layers to 3 and the depth ofeach layer to 2 increases the average accuracy to 98% . Since the Breast Cancer data contains 30features for binary classification, the principal component analysis (PCA) is used to reduce featuredimension.
Here the numerical results of a 4-qubit model are given to illustrate the power of the QNN. Compared to the model using complete information, the QNN model does not perform perfectly.
Butincreasing the number of layers and the depth may improve the test accuracy.
Based on the finding ofthe preceding experiments, it is clear that the Parallel-Entanglement model is capable of handlingpractical classification problems.