Experimental Evaluation of Quantum Machine Learnin
Experimental Evaluation of Quantum Machine Learnin
This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.
Digital Object Identifier 10.1109/ACCESS.2017.DOI
ABSTRACT Machine learning and quantum computing are both areas with considerable progress in recent
years. The combination of these disciplines holds great promise for both research and practical applications.
Recently there have also been many theoretical contributions of quantum machine learning algorithms
with experiments performed on quantum simulators. However, most questions concerning the potential of
machine learning on quantum computers are still unanswered such as How well do current quantum machine
learning algorithms work in practice? How do they compare with classical approaches? Moreover, most
experiments use different datasets and hence it is currently not possible to systematically compare different
approaches.
In this paper we analyze how quantum machine learning can be used for solving small, yet practical
problems. In particular, we perform an experimental analysis of kernel-based quantum support vector
machines and quantum neural networks. We evaluate these algorithm on 5 different datasets using different
combinations of quantum feature maps. Our experimental results show that quantum support vector
machines outperform their classical counterparts on average by 3 to 4% in accuracy both on a quantum
simulator as well as on a real quantum computer. Moreover, quantum neural networks executed on a
quantum computer further outperform quantum support vector machines on average by up to 5% and
classical neural networks by 7%.
VOLUME 4, 2022 1
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
space through controllable entanglement and interference. dimension 2n . The basis vectors can be written as:
In addition, we study various implementations of QNNs
based on different quantum circuits. One of the open re- |b1 ⟩ ⊗ ... ⊗ |bn ⟩ = |b1 b2 ...bn ⟩ (1)
search questions is how do design optimal quantum circuits
both for QSVMs as well as QNNs such that the quantum
with bk ∈ {0, 1}. Here, |b1 b2 ...bn ⟩ is a basis vector in
algorithm shows the best learning behavior for practical n
H 2 . A general vector (or state, as it is called in quantum
machine learning problems. In order to address this question,
mechanics) is a linear combination of these basis states:
we will perform an experimental evaluation of kernel-based
QSVMs as well as QNNs for classification problems using n X
five different datasets. |Q⟩ ∈ H 2 : |Q⟩ = cb0 b1 ...bn |b1 b2 ...bn ⟩ (2)
This paper makes the following contributions: bk ∈{0,1}
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
qA ⊗ qB = (cA A B B
0 |0⟩ + c1 |1⟩) ⊗ (c0 |0⟩ + c1 |1⟩)
= (cA B A B
0 c0 |0⟩ ⊗ |0⟩ + c0 c1 |0⟩ ⊗ |1⟩ +
FIGURE 1: Example of a simple quantum circuit with three
cA B A B
1 c0 |1⟩ ⊗ |0⟩ + c1 c1 |1⟩ ⊗ |1⟩ (4)
qubits. "H" refers to the Hadamard gate and "+" to a con-
describes the tensor product of two independent qubits. The trolled X-gate. Finally, the states of qubits q0 and q1 are
state of a two-qubit register is given by measured.
|Q⟩ = (c00 |00⟩ + c01 |01⟩ + c10 |10⟩ + c11 |11⟩) (5)
(QSVMs) [14], [25], while others are based on neural net-
For a general choice of c00 , c01 , c10 , c11 with |c00 |2 +|c01 |2 + works [2], [6], [12], [18], [22], [28], [34] and can be referred
|c10 |2 + |c11 |2 = 1 the equations c00 = cA B
0 c0 , c01 = to as quantum neural networks (QNNs).
A B A B A B
c0 c1 , c10 = c1 c0 , c11 = c1 c1 cannot be solved un- Let us start with analyzing QSVMs in more detail. [14]
der the normalization constraints |cA 2 A 2
0 | + |c1 | = 1 and propose a variational quantum circuit to classify data sim-
|cB
0 |2
+ |cB 2
1 | = 1. ilar to SVMs. This approach uses a variational circuit that
Physically, there is in general no way to interpret the generates a separating hyperplane in the quantum feature
entangled state of a quantum register in terms of a collection space. A further approach proposed by the same authors is
of individual qubits. called quantum kernel estimator, which is used to estimate
In order to manipulate qubits, quantum circuits are used. the kernel function and optimize a classifier. To evaluate the
These circuits are similar to their classical counterparts but approach, a synthetic data set is used that contains 20 data
they contain additional logical operators and gates. One of points per label. In our experiments we also use this data set.
the gates is the Hadamard gate which brings qubits in a One of the first study to demonstrate that quantum neural
superposition. networks show an advantage over their classical counter parts
Another important type of operator are the controlled is presented in [2]. The authors evaluate two different feature
Pauli-gates. Single qubits can be visualized as points on maps for the quantum neural network. One feature map is
a two-dimensional sphere, the so called Bloch-sphere. The based on the circuit introduced in [14]. The second circuit
Bloch-sphere is embedded into a three-dimensional space uses parameterized RY-gates, which are followed by CNOT-
with coordinate axis x, y, z. Note well that these coordinates gates that are applied between every pair of qubits in the
have no direct relation to the actual physical space, but circuit. Finally, another set of parameterized RY-gates are
are primarily a consequence of a specific representation of used. The QNN is evaluated both on a quantum simulator
qubits (a more detailed historical analysis of the origin of the as well as on a real quantum computer using the Iris data set
Bloch-sphere would tell a somewhat different story, which is, that we also use in our experiments.
however, not of relevance in the context here). A quanvolutional neural network architecture is proposed
Controlled manipulation of qubits can then be understood in [16]. The basic idea is to replace a convolutional filter of a
as rotations around the x, y, z-axis, and consequently, these CNN with a quanvolutional layer that transforms input data
gates are also called controlled X-, Y- and Z-gates. As it turns with a random quantum circuit. The approach is evaluated
out, since these rotations of one qubit depend on the state of with image data on a quantum simulator. Our approach,
another qubit, the application of such a controlled gate leads however, is evaluated on various numerical data sets both on
to quantum entanglement. Mathematically, all quantum gates a quantum simulator as well as on real quantum hardware.
can be considered as unitary matrix operations. [8] introduce a hybrid classical-quantum approach called
An example of a simple quantum circuit is given in Figure Quantum Short Long-Term Memory. The idea is to replace
1. The circuit consists of three qubits q0 , q1 and q2 . First, parts of classical RNN with a variational quantum circuit.
all qubits are initialized with the ground state 0. Then, the The approach is evaluated on a quantum simulator but not
Hadamard-gate is applied on qubit q1 , followed by controlled on real quantum hardware.
X-gate operation with qubit q2 and a controlled X-gate oper- In this paper we evaluate existing approaches based on
ation between qubits q0 and q1 , followed by a Hadamard- QSVMs and QNNs. Previous algorithms have mostly been
gate applied on qubit q0 . Finally, the qubits q0 and q1 are evaluated either only on a qunatum simular or on a single
measured. data set. Hence, comparability of the algorithms as well as
generalizability of the approaches to other data sets has not
III. RELATED WORK been demonstrated in depth. In our paper, we evaluate various
Over the last years, several different approaches of quantum quantum machine learning approaches on 5 different data
machine learning algorithms [7] have been proposed. Some sets both on a quantum simulator as well as on real quantum
approaches are based on quantum support vector machines hardware.
VOLUME 4, 2022 3
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
The major question we study in this paper is how well corresponding decision function uses the kernel function to
these algorithms perform on small, yet real machine learning classify ⃗x, as shown in Equation 6.
problems using publicly available quantum hardware.
M
!
X D E
IV. MACHINE LEARNING APPROACHES QSV M (⃗x) = sign ai yi ϕ(⃗x(i) ), ϕ(⃗x) +b
H
A. KERNEL-BASED SVMS: CLASSICAL APPROACH i=1
A feature function ϕ(⃗x) is a mapping of a data point ⃗x into (6)
feature space of higher dimension. This is advantageous for The quantum analogue kernel function equation – with an
classification because it opens up more possibilities for a exponentially large space of density matrices S(2q ) spanned
hyperplane to separates data point of different classes. across q qubits as the feature space – can be seen in Equation
The so-called kernel trick allows re-writing of a linear 7 [31].
decision function used by SVMs in terms of a dot product be-
tween data points. In combination with a feature function, it ψ : RS → S(2q )
can be further substituted with a kernel function k(⃗x, ⃗x(i) ) = ED
ϕ(⃗x)T · ϕ(⃗x(i) ), for a given training data point ⃗x(i) and ⃗x 7→ ψ(⃗x(i) ) ψ(⃗x) (7)
a data point ⃗x for which the decision is made P [13]. The
D E 2
decision function in its final form f (⃗x) = b+ i αi k(⃗x, ⃗x(i) ) → k(⃗x, ⃗x(i) ) = ψ(⃗x(i) ) ψ(⃗x)
introduces a shortcut to the explicit calculation of the dot As previously stated, the quantum circuit, which performs
product between feature vectors, which can be of infinite the transformation into the quantum space, is called quantum
dimension. Furthermore the resulting function is linear in the feature map. Typical quantum feature maps are the Z-feature-
feature space. map, the ZZ-feature-map and the Pauli-feature-map [14].
The part i αi k(⃗x, ⃗x(i) ) of the function is called kernel
P
An example of the Pauli-feature-map, which is the most
matrix and represents the similarity values between each generic feature map, is shown in Figure 2. It consists of two
training data point. different quantum gates, namely the Hadamard gate, which
puts qubits in superposition, and a parameterized P-gate
B. KERNEL-BASED SVMS: QUANTUM APPROACH (phase gate). In addition, we can see the controlled X-gate
Let us now discuss how classification can be implemented ("+") which enables entanglement between qubits.
on a quantum computer. In principle, we need to following
steps:
• Transform the classical data points into quantum data
points with a quantum circuit.
• Use a parameterized quantum circuit to classify the data.
• Measure the output.
• Send the results of the quantum kernel to a classical
SVM for final classification.
These steps comprise a so-called variational quantum FIGURE 2: Example of a quantum kernel based on the Pauli-
classifier [32] leveraging parameterized quantum circuits. feature-map. For simplicity, the figure only shows parts of the
Since current quantum computers are still quite error-prone, a circuit.
common approach is to implement one part of the end-to-end
process on a quantum computer and the remaining parts on The circuit can also be stacked and thus made wider in
a classical computer. In particular, [14] suggest a quantum order to design even more complex feature maps resulting
kernel estimator, where the kernel function is implemented in a quantum circuit with a larger depth. However, due to
as a quantum kernel, i.e. a quantum circuit, which translates the limitations of current quantum devices, larger quantum
classical data into quantum states via a quantum feature map, circuits often lead to a higher error rate. Hence, designing
and then builds the inner product of these quantum states. optimal quantum kernels for SVMs is still an unsolved re-
The inner product is used for further processing by the search problem. The goal of this paper is to evaluate various
classical SVM. As a final step, the classification is performed feature maps for solving small, yet practical machine learning
by a kernel-based SVM on a conventional computer using problems using QSVMs.
the calculated kernel. In summary, the calculation of the
kernel matrix is performed by a quantum algorithm, whereas C. QUANTUM NEURAL NETWORK
the classical SVM algorithm is executed on a conventional The design of the quantum neural network is inspired by
computer. previous work of Havlicek et al. [15] and Thomsen et al. [31].
Let us describe the QSVM approach more formally. Ac- The general architecture of the quantum circuit is shown in
cording to Thomsen et al. [31], using an already classified Figure 3a and consists of three parts. The first part is the
data point ⃗x(i) and a to be classified data point ⃗x, the feature map UΦ(⃗x) which is used to encode the input features
4 VOLUME 4, 2022
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
|0⟩ z0
|0⟩ z1
UΦ(⃗x) W (θ)
.. ..
. .
|0⟩ zn
(a) A fixed input ⃗x is encoded into the quantum state by applying UΦ(⃗x) to the reference state |0⟩n for n qubits: UΦ(⃗x) |0⟩n = |ψ(⃗ x)⟩.
The state then is evolved via the variational unitary W (θ) with trainable parameters θ: W (θ) |ψ(⃗
x)⟩ = |φ(⃗x, θ)⟩. The resulting bit string
z ∈ {0, 1}n is post-processed to an associated label in y := f (z) with y as output.
(b) The variational model W (θ) can be repeated n times which can thus be considered as layers of the QNN.
FIGURE 3: Architecture of the variational quantum circuits used in the QNN experiments.
of the used dataset into quantum states. The second part is the 1) Feature Map
variational model W (θ) which evolves the quantum states The main goal of the feature map is to encode classical
of the system using trainable parameters θ. The final layer features of our dataset into the Hilbert space H the quantum
consists of the measurement of the final states. system acts in. We apply the circuit UΦ(⃗x) to the zero state
Figure 3b shows that the variational model can be repeated |0⟩, which defines the feature map as described in Equation 8
n times, which is similar to the layers of a classical neural
network. The larger the quantum circuit, the better a function
|ψ(⃗x)⟩ := UΦ(⃗x) |0⟩ (8)
can be approximated and hence the better the generalization
of the machine learning algorithm should be. At the same where ⃗x is defined according to Equation 7 previously
time, current quantum hardware is limited in its size and introduced in Section IV-B.
stability. Available systems do not allow for the creation Among a multitude of embedding techniques [26], we
of longer circuits with repeated, variational models. At the have chosen angle encoding to encode the classical data into
same time the length of a circuit should be minimized - quantum states. Whilst angle encoding is not optimal as it
noise affecting the quantum system during calculations leads requires n qubits to represent n-dimensional data, it is effi-
to instabilities and influences the resulting measurements, cient regarding operations and directly useful for processing
which can falsify results. With this in mind, the circuits in this data in quantum neural networks [20]. Weigold et al. [33]
paper are limited to using a single instance of the variational state that only single-qubit rotations are needed for the state
model. preparation routine, which is highly efficient and can be done
The parameters θ of the variational model are optimized in parallel for each qubit.
using classical optimizers leveraging classical hardware. Figure 4 shows a circuit with one qubit per feature. For
Note that there is a fundamental difference between the instance, qubit q0 represents feature x0 which is encoded with
QSVM we discussed previously and the QNN we described a rotation around the y-axis where the angle is proportional
here. In the case of the QSVM, only the kernel is imple- to the value of feature x0 .
mented using a quantum circuit while the SVM itself is
implemented classically. As for the QNN, the whole neural 2) Variational Model
network is implemented using a quantum circuit and only the After the classical features are encoded as quantum states,
optimization of the parameters is implemented classically. these quantum states can be further evolved in the variational
We will now describe the implementation of the feature model according to Equation 9.
map and the variational model in more detail.
|ψ(⃗x, θ)⟩ := W (θ)UΦ(⃗x) |0⟩ (9)
VOLUME 4, 2022 5
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
q0 : RY (2x0 ) V. EXPERIMENTS
In our first set of experiments we evaluate the performance of
q1 : RY (2x1 ) classical kernel-based support vector machines and compare
.. them against QSVMs. First, we execute the QSVMs on
. qasm_simulator, a Python-based quantum simulator of IBM
qn : RY (2xn ) Qiskit [3] accessed via BasicAer1 . Afterwards, we execute
the experiments on ibmq_belem, a real quantum system
FIGURE 4: Quantum circuit demonstrating angle encoding
providing 5 qubits [17], accessed via IBMQ2 .
with RY-gates.
In our second set of experiments we compare the ac-
curacy of classical neural networks against quantum neural
The trainable weights are embedded in the variational networks.
The major questions we address with these experiments
model W (θ) which can be grouped into n layers, where each
are as follows:
layer consists of RY -, RX-, and RZ-rotation gates.
• Which quantum circuit yields the best performance for
An example of a variational model with three parameters
is shown in Figure 5. Note that first qubit q0 is rotated a given dataset?
• Can we establish a clear strategy for designing quantum
by angle 2θ1 around the y-axis. Next, qubit q0 and qubit
q1 are entangled with a controlled Ry -gate with the angle circuits?
• Does the quantum implementation of the algorithm have
parameter 2θ2 followed by a rotation around the y-axis with
the angle parameter 2θ3 . an advantage over the classical counterpart?
A. DATASETS
We will now describe the datasets that we used for our
RY (2θ1 ) •
experiments. In particular, we used five datasets with varying
RY (2θ2 ) RY (2θ3 ) degrees of difficulty, which was estimated from the order
of the separating hyperplane in the origin space. Each of
FIGURE 5: Variational model with three parameters. these datasets has one hundred data points and two classes
containing the same number of data points.
The chosen encoding strategy assumes one qubit per fea-
3) Decision Function ture. Since our quantum computer provides a maximum of
Next, the resulting state of Equation 9 needs to be measured. five qubits, we have reduced the number of features to a
Since we use our quantum circuit as a binary classifier, a maximum of five, if necessary. For training and testing we
bitstring z ∈ {0, 1}q is calculated which is associated with performed an 80:20 percent split. Moreover, we performed a
a class membership via the following Boolean function. 10-fold cross validation for all experiments and report on the
average results. An overview of the datasets is given in Table
f : {0, 1}q → {−1, +1} 13 .
(10)
z 7→ ỹ Dataset #Features #Records #Classes
Iris 4 100 2
The classification is re-run multiple times (R shots) where Rain 5 100 2
R is the number of re-runs or shots. Thus, the resulting Vlds 5 100 2
Custom 2 100 2
measurement outcome z is probabilistic and we need to Adhoc 3 100 2
assign the label to the bitstring with the largest probability.
Hence the probability of measuring either label y ∈ {+1, 1} TABLE 1: Characteristics of the five datasets used for our
is given by experiments.
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
and contains about ten years of daily weather observations kernel estimator approach chosen in [14]. Qiskit provides
from many locations in Australia. The incomplete data en- an Adhoc dataset generator8 , allowing the generation of data
tries were removed, and the following five features were points with three features. The characteristics of the features
selected for this purpose: MinTemp, Humidity9am, Wind- are shown in Figure 8.
Speed3pm, Pressure9am, WindDir9am. The attribute Rain-
Tomorrow serves as a class label. Its categorical values No
and Yes were mapped to the numbers 0 and 1, respectively.
Vlds dataset. This dataset was generated using a dataset
generator provided by scikit-learn6 . The characteristics of the
features are shown in Figure 6.
VOLUME 4, 2022 7
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
(a)
(b)
(c)
(d)
(e)
FIGURE 9: Accuracy of different quantum Support Vector Machines using three different feature maps (quantum kernels) with
8
four different entanglement strategies on a quantum simulator for five different datasets. VOLUME 4, 2022
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
Let us now evaluate the performance of quantum support vec- q2 : RY (x2 ) RY (cw1 ) RY (w2 ) •
tor machines on a real, publicly available quantum computer. FIGURE 10: QNN circuit variant with 3 qubits and 1 layer
The major question is if the algorithms still perform well on used in our experiments. Referred to as q_circuit_01.
a quantum device or if the failure rates of the underlying
quantum computer render these types of quantum machine
learning algorithms impractical.
2) q_circuit_02
Our experimental results on a real quantum computer
showed similar results to the ones on a quantum simulator. The circuit in Figure 11 is built using RY-gates followed by
These results are extremely promising since current quantum circular entangled parameterized CRY-gates depicted with 1
computers are still very error-prone especially for circuits layer.
with a large number of quantum gates. Hence, being able to
VOLUME 4, 2022 9
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
6) Classical Optimizers
q0 : RY (x0 ) RY (w0 ) • RY (cw3 )
Inspired by the work of Pellow-Jarman et al. [24], we selected
q1 : RY (x1 ) RY (w1 ) RY (cw0 ) •
the same four optimizers: AMSGRAD, SPSA, BFGS and
q2 : RY (x2 ) RY (w2 ) RY (cw1 ) •
COBYLA. For all optimizers we tuned the parameter settings
q3 : RY (x3 ) RY (w3 ) RY (cw2 ) • ranging from 100 to 1500 iterations.
FIGURE 11: QNN circuit with 4 qubits and 1 layer used in 7) Results of Neural Networks
our experiments. Referred to as q_circuit_02. For the classical approach we have implemented various
fully-connected neural networks with 1, 2 and 3 hidden layers
using PyTorch [23]. These neural networks were then passed
3) q_circuit_03 to Ray Tune [21], which is used to facilitate the search for
The circuit in Figure 12 is built using circular entanglement good hyperparameters when optimizing neural networks. The
with RY-gates followed by entangled CZ-gates and is de- best validation accuracy was selected out of 10 runs with
picted with 1 layer. the best hyperparameters. The input data was normalized in
the same way it was for the quantum neural network, as to
eliminate the normalization as a deciding factor. As we can
q0 : RY (x0 ) RY (w0 ) • •
see in Table 4, the average accuracy of the best classical
q1 : RY (x1 ) • RY (w1 ) •
neural networks over all 5 datasets is 78%, which is similar
q2 : RY (x2 ) • RY (w2 ) • to the performance of the classical SVM shown in Table 3.
q3 : RY (x3 ) • RY (w3 ) •
Dataset Classical NN QNN QNN
(Quantum Simulator) (Quantum Computer)
FIGURE 12: QNN circuit with 4 qubits and 1 layer used in Iris 1.00 1.00 1.00
Rain 0.70 0.83 0.79
our experiments. The qubit or layer count may vary depend- Vlds 0.94 0.93 0.95
ing on the input feature count or layer count setting. Referred Custom 0.64 0.74 0.75
to as q_circuit_03. Adhoc 0.61 0.80 0.75
Average 0.78 0.86 0.85
10 VOLUME 4, 2022
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
FIGURE 15: Accuracy comparison of 10 runs on a quantum simulator and a quantum computer over 5 datasets using 5 different
quantum circuits and 4 different optimizers.
VOLUME 4, 2022 11
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
When looking at the quantum circuits, it also turns out that supremacy using a programmable superconducting processor. Nature,
there is no clear winner and there is a relatively high variance 574(7779):505–510, 2019.
[6] M. Benedetti, E. Lloyd, S. Sack, and M. Fiorentini. Parameterized
between the different circuits. The reason might be due to the quantum circuits as machine learning models. Quantum Science and
variations of the dataset and the relatively small number of Technology, 4(4):043001, 2019.
data records. [7] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd.
Quantum machine learning. Nature, 549(7671):195–202, 2017.
Table 4 shows the performance of the best combination [8] S. Y.-C. Chen, S. Yoo, and Y.-L. L. Fang. Quantum long short-term mem-
of quantum circuits and optimizers per dataset. On average, ory. In ICASSP 2022-2022 IEEE International Conference on Acoustics,
the accuracy over all 5 datasets is 85.8% on the quantum Speech and Signal Processing (ICASSP), pages 8622–8626. IEEE, 2022.
[9] E. A. Cherrat, I. Kerenidis, N. Mathur, J. Landman, M. Strahm, and Y. Y.
simulator and 84.7% on the quantum computer. The results of Li. Quantum vision transformers, 2022.
the QNN are 5% better than the results of the QSVM which [10] C. Ciliberto, M. Herbster, A. D. Ialongo, M. Pontil, A. Rocchetto, S. Sev-
demonstrates the advantage of quantum implementations erini, and L. Wossnig. Quantum machine learning: a classical perspective.
Proceedings of the Royal Society A: Mathematical, Physical and Engi-
over a hybrid quantum-classical implementation. Moreover, neering Sciences, 474(2209):20170551, 2018.
the quantum neural network executed on the quantum com- [11] A. Cross. The ibm q experience and qiskit open-source quantum com-
puter outperforms the classical neural network by 7% - even puting software. In APS March Meeting Abstracts, volume 2018, pages
though the classical neural network is vastly more complex. L58–003, 2018.
[12] Y. Du, M.-H. Hsieh, T. Liu, S. You, and D. Tao. Learnability of quantum
In the case of the vlds dataset, hyperparameter optimization neural networks. PRX Quantum, 2(4):040337, 2021.
resulted in a neural network with 69,402 parameters, whereas [13] I. Goodfellow, Y. Bengio, and A. Courville. Deep Learning. MIT Press,
as the biggest quantum neural network has 15 parameters. 2016. http://www.deeplearningbook.org.
[14] V. Havlíček, A. D. Córcoles, K. Temme, A. W. Harrow, A. Kandala, J. M.
Chow, and J. M. Gambetta. Supervised learning with quantum-enhanced
VI. CONCLUSIONS feature spaces. Nature, 567(7747):209–212, 2019.
In this paper we performed a detailed experimental evalua- [15] V. Havlicek, A. D. Córcoles, K. Temme, A. W. Harrow, A. Kandala, J. M.
Chow, and J. M. Gambetta. Supervised learning with quantum enhanced
tion of quantum support vector machines and quantum neural feature spaces. Nature, 567(7747):209–212, 2019.
networks. Our experimental evaluation showed that QSVMs [16] M. Henderson, S. Shakya, S. Pradhan, and T. Cook. Quanvolutional neural
outperform their classical counterparts on average by 3 to 4% networks: powering image recognition with quantum circuits. Quantum
Machine Intelligence, 2(1):1–9, 2020.
in terms of accuracy. We could also show that the quantum [17] IBM Quantum team. ibmq_melbourne v2.3.24, https://quantum-
neural networks further outperformed the QSVMs by up to computing.ibm.com, 2022. Accessed January 2022.
5%. [18] S. Jeswal and S. Chakraverty. Recent developments and applications in
quantum neural network: a review. Archives of Computational Methods in
Even though our experiments were only performed on Engineering, 26(4):793–807, 2019.
relatively small datasets, these results demonstrate that quan- [19] M. I. Jordan and T. M. Mitchell. Machine learning: Trends, perspectives,
tum computing can be successfully applied for small-scale and prospects. Science, 349(6245):255–260, 2015.
[20] F. Leymann and J. Barzen. The bitter truth about gate-based quantum algo-
machine learning problems in practice already today. Given rithms in the NISQ era. Quantum Science and Technology, 5(4):044007,
the tremendous progress in the development of quantum Oct. 2020.
hardware, we expect that also larger problem sizes can be [21] R. Liaw, E. Liang, R. Nishihara, P. Moritz, J. E. Gonzalez, and I. Stoica.
Tune: A research platform for distributed model selection and training.
tackled in the near future. Whilst only usable for problems
arXiv preprint arXiv:1807.05118, 2018.
of a limited size, they outperform classical solutions on the [22] J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, and H. Neven.
same problems, whilst being, comparatively, less complex. Barren plateaus in quantum neural network training landscapes. Nature
communications, 9(1):1–6, 2018.
Our current experiments showed that the best quantum
[23] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen,
kernel is based on the Z-feature-map which does not use Z. Lin, N. Gimelshein, L. Antiga, A. Desmaison, A. Kopf, E. Yang,
quantum entanglement. One of the open research questions Z. DeVito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang,
is how to design quantum circuits such that they can take J. Bai, and S. Chintala. Pytorch: An imperative style, high-performance
deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer,
advantage of entanglement and thus harness of the full power F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural
of quantum computing. Another open research question is Information Processing Systems 32, pages 8024–8035. Curran Associates,
to find out how the analyzed algorithms perform on larger Inc., 2019.
[24] A. Pellow-Jarman, I. Sinayskiy, A. Pillay, and F. Petruccione. A compari-
datasets. Larger, less error-prone quantum hardware might son of various classical optimizers for a variational quantum linear solver.
give more insights. Quantum Information Processing, 20(6):202, 2021.
[25] P. Rebentrost, M. Mohseni, and S. Lloyd. Quantum support vector ma-
chine for big data classification. Physical review letters, 113(13):130503,
REFERENCES 2014.
[1] Amazon bracket. https://aws.amazon.com/braket/, Accessed: Jan. 2022. [26] M. Schuld. Supervised quantum machine learning models are kernel
[2] A. Abbas, D. Sutter, C. Zoufal, A. Lucchi, A. Figalli, and S. Woerner. methods. 2021.
The power of quantum neural networks. Nature Computational Science, [27] M. Schuld, A. Bocharov, K. Svore, and N. Wiebe. Circuit-centric
1(6):403–409, 2021. quantum classifiers. Physical Review A, 101(3):032308, Mar. 2020.
[3] H. Abraham, AduOffei, R. Agarwal, I. Y. Akhalwaya, G. Aleksandrowicz, arXiv:1804.00633 [quant-ph].
T. Alexander, and M. Amy. Qiskit: An open-source framework for [28] M. Schuld, I. Sinayskiy, and F. Petruccione. The quest for a quantum
quantum computing, 2019. neural network. Quantum Information Processing, 13(11):2567–2586,
[4] S. Arunachalam and R. de Wolf. Guest column: A survey of quantum 2014.
learning theory. ACM SIGACT News, 48(2):41–67, 2017. [29] S. Sim, P. D. Johnson, and A. Aspuru-Guzik. Expressibility and entangling
[5] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, capability of parameterized quantum circuits for hybrid quantum-classical
R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell, et al. Quantum algorithms. 2(12):1900070.
12 VOLUME 4, 2022
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
This article has been accepted for publication in IEEE Access. This is the author's version which has not been fully edited and
content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2023.3236409
VOLUME 4, 2022 13
This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/