0% found this document useful (0 votes)
12 views11 pages

Binary Classifiers For Noisy Datasets A

This paper explores the application of Quantum Machine Learning (QML) frameworks to enhance binary classification models for noisy datasets, particularly in the financial sector. The authors introduce novel FULL HYBRID classifiers that combine hybrid-neural networks, parametric circuits, and data re-uploading techniques, demonstrating improved performance against existing quantum and classical classifiers in the presence of asymmetrical Gaussian noise. The study emphasizes the potential of QML to achieve better learning characteristics and speedups compared to classical methods in handling complex classification tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

Binary Classifiers For Noisy Datasets A

This paper explores the application of Quantum Machine Learning (QML) frameworks to enhance binary classification models for noisy datasets, particularly in the financial sector. The authors introduce novel FULL HYBRID classifiers that combine hybrid-neural networks, parametric circuits, and data re-uploading techniques, demonstrating improved performance against existing quantum and classical classifiers in the presence of asymmetrical Gaussian noise. The study emphasizes the potential of QML to achieve better learning characteristics and speedups compared to classical methods in handling complex classification tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Binary classifiers for noisy datasets: a comparative study of existing quantum

machine learning frameworks and some new approaches


N. Schetakis,1, 2, ∗ D. Aghamalyan,3, 4, ∗ M. Boguslavsky,5, ∗ and P. Griffin3, ∗
1
School of Electronic and Computer Engineering,
Technical University of Crete, Chania, Greece 73100
2
ALMA Sistemi Srl, Guidonia (Rome), 00012, Italy†
3
School of Information Systems, Singapore Management University, 81 Victoria Street, Singapore 188065
4
Centre for Quantum Technologies, National University of Singapore, Singapore 117543
5
Tradeteq Ltd, London, UK
One of the most promising areas of research to obtain practical advantage is Quantum Machine
Learning which was born as a result of cross-fertilisation of ideas between Quantum Computing and
Classical Machine Learning. In this paper, we apply Quantum Machine Learning (QML) frame-
arXiv:2111.03372v1 [quant-ph] 5 Nov 2021

works to improve binary classification models for noisy datasets which are prevalent in financial
datasets. The metric we use for assessing the performance of our quantum classifiers is the area
under the receiver operating characteristic curve (ROC/AUC). By combining such approaches as
hybrid-neural networks, parametric circuits, and data re-uploading we create QML inspired architec-
tures and utilise them for the classification of non-convex 2 and 3-dimensional figures. An extensive
benchmarking of our new FULL HYBRID classifiers against existing quantum and classical clas-
sifier models, reveals that our novel models exhibit better learning characteristics to asymmetrical
Gaussian noise in the dataset compared to known quantum classifiers and performs equally well for
existing classical classifiers, with a slight improvement over classical results in the region of the high
noise.

Introduction.— Noisy Intermediate-Scale Quantum this photonic quantum computer is not programmable.
(NISQ) [1–3] devices hold a promise to deliver a prac-
tical quantum advantage by harnessing the complexity One of the most promising areas of research to obtain
of quantum systems. Despite being several years away practical advantage is Quantum Machine Learning[10–
from having fault-tolerant quantum computing[4–6], 12] which was born as a result of cross-fertilisation of
researchers have been hopeful to achieve this task. ideas between Quantum Computing [13, 14] and Classi-
Perhaps one of the most exciting breakthroughs in this cal Machine Learning [15, 16]. QML in its spirit is similar
direction was a demonstration of ”quantum supremacy” to classical machine learning but with the main difference
by Google researchers [7], using their programmable being that instead of classical neurons in the layers of a
superconducting Sycamore chip with 53 qubits, in which deep neural network, now we have qubits and quantum
single-qubit gate fidelities of 99.85% and two-qubit gate gates acting on qubits combined with quantum measure-
fidelities of 99.64% were obtained on average. Here the ments playing the role of the activation function. The
task of sampling the output of a pseudo-random quantum elegant field of QML has been providing a new platform
circuit was successfully achieved. Quantum Supremacy for devising algorithms that exhibit quantum speedups.
would imply that a universal quantum computer has For instance, it has been demonstrated that such basic
the ability to perform certain tasks exponentially faster linear algebra subroutines as solving certain types of lin-
than a classical computer[8]. However, it has been ear equations (the quantum version is known in the com-
argued later that Google’s achievement amounted to munity as HHL), finding eigenvectors and eigenvalues,
a demonstration of a quantum advantage but not a principal component analysis (PCA) exhibit exponential
practical advantage, in other words, the performed task speedups compared to their classical counterparts[17–
was not useful for any real-life applications. Another 21]. Since we are dealing with a quantum system, one
quantum advantage breakthrough experiment has been can utilise such quantum resources as coherence, entan-
implemented [9] utilising a Jiuzhang photonic quantum glement, negativity, contextuality to leverage towards
computer and performing Gaussian boson sampling achieving practical advantage. However, it is still not
(GBS) with 50 indistinguishable single-mode squeezed completely understood what the role of different types
states. Here, quantum advantage has been elucidated in of resources is in harnessing practical advantage from
the sampling time complexity of a Torontonian matrix, available 50-100 qubit noisy devices [3]. The three main
which has exponential scaling with output photon clicks. building blocks of any QML algorithm are data encod-
However, this experiment demontsrates quantum advan- ing, unitary evolution of the system followed by the state
tage but fails to demonstrate quantum supremacy as readout performed through the measurement [12]. Up-
loading classical data in the quantum computer is not
a trivial task and can account for most of the complex-
ity of the algorithm, determining what kind of speed-
∗ Equal contribution ups are feasible. This procedure is called quantum em-
[email protected] bedding which can be achieved, for instance, with help
2

of ”quantum feature maps”[22–26] which take classical to the noise. This kind of study sheds light on learn-
data and map it to the high-dimensional Hilbert space, ing properties for the amount of noise in the dataset.
where one hopes to achieve higher separation between We also perform systematic hyperparameter tuning by
the data classes compared to the original coordinate sys- studying how ROC/AUC changes with the number of
tem. Moreover, one can train the quantum embedding repeating units in the data-re-uploading approach, num-
to achieve maximal separation between the data clusters ber of qubits, batch size, number of epochs and number
in the Hilbert space (this approach has been coined as of strongly entangling units. We remark, that our bi-
”quantum metric learning”)[25, 26], paving the way to- nary classifiers can be extended to multi-class classifica-
wards constructing faithful quantum classifiers. tion problems using a one-versus-all approach.
Binary classification is a ubiquitous task in machine The manuscript is organised as follows. In section I
learning. Perhaps the most prominent example is the we explain what kind of classification problems for 2 and
cat recognition algorithm, which gives a flavour of the 3-dimensional non-convex surfaces we tackle in the cur-
power brought by utilising such basic tools as logistic rent study. In Section II, we briefly review the three
regression combined with deep neural network architec- building blocks in the QML frameworks which we utilise
tures [15]. Quantum classifiers hold a promise to bring in the next section III for our novel classification circuit
feasible speedups compared to their classical counter- which combines the best features of the building blocks.
parts. Several theoretical proposals combined with ac- In Section IV we benchmark several known QML ap-
tual experimental runs on commercially available back- proaches(including our QML classifier) along with the
ends have been put forward for realising faithful quan- best known classical counterparts for binary classifica-
tum classifiers[22, 23, 27–36]. For instance, approaches tion problems. Here we focus, in particular, on predic-
in Refs. [35, 36] are inspired by kernel methods used in tion grids and ROC/AUC characteristics for assessing
classical machine learning. Refs. [22, 27, 28] are com- the performance of the classifier. Section V is devoted
bining certain types of quantum embeddings to achieve to the conclusions and future directions.Finally, in Ap-
quantum hybrid neural networks, which are promising pendix A material we show some results for 3-dimensional
candidates for building a faithful classifier. Ref. [37] sug- non-convex boundary classification problems and demon-
gests using hypergraph-states[38], where the assumption strate the performance of our FLL HYBRID classifiers.
is that such states can lower the circuit depth of the clas-
sifier. Refs.[31, 32] are based on quantum Grover’s search
algorithm. I. PROBLEM SETTING
In this manuscript, we take a rather pragmatic ap-
proach and try to benefit from a plethora of available We consider a non-trivial classification problem and
QML software packages[39–43], which grant access to run will train single and multi-qubit variational quantum cir-
the quantum circuit in the quantum simulator or an ac- cuits to achieve this goal. The data is generated as a
tual hardware (such as IBM Quantum Experience, Ama- set of random points in a plane x1 , x2 and labelled as 1
zon Braket, Rigetti Computing, Strawberry Fields). By (blue) or 0 (red) depending on whether they lie inside or
utilising these tools we provide new software that is par- outside of a given 2-dimensional non-convex figure. The
ticularly well suited for targeting classification problems goal is to train a quantum circuit to predict the label (red
in the unbalanced and noisy datasets which are prevalent or blue) given an input point’s coordinate.
in the financial industry[44].
In this paper at first we briefly outline and review three
different necessary building block QML architectures for II. REVIEW OF EXISTING QML
our software package : hybrid-neural networks [22, 27, FRAMEWORKS
28], parametric quantum circuits [2, 45–47] and data-
reuploading [23, 24]. In this section we briefly review three different neces-
The metric we use for assessing the performance of sary building block QML architectures for our software
our quantum classifiers is the area under the receiver package : hybrid-neural networks [22, 27, 28], variational
operating characteristic curve (ROC/AUC). ROC is a circuits [2, 46] and data-reuplodaing [23, 24].
probability curve and AUC represents the degree of sep-
arability. In general a good model has AUC close to
1. We test our FULL HYBRID models and benchmark A. Hybrid classical-quantum classifier (Hybrid)
them against existing QML classifiers and also to the
best known classical machine learning counterparts by Hybrid neural networks are formed by concatenating
running simulations on quantum simulators for three dif- classical and quantum neural networks and can bring a
ferent 2-dimensional non-convex surfaces. It is believed great advantage by having a number of features in the
that non convex boundaries represent more difficult clas- initial classical layers that exceeds the number of qubits
sification problems as linear regression is bound to fail in in the quantum layer. Normally we assume that in each
this tasks. Then by introducing asymmetrical Gaussian layer we have one qubit for each feature and a sequence
noise we study the resilience of our different approaches of one and two-qubit gates acting on it. To create a
3

FIG. 2. Schematic diagram of a Variational Quantum Algo-


rithm (VQA).Figure is borrowed from the Ref. [46].

FIG. 1. Quantum circuit implementing hybrid classical-


quantum classifier , each block corresponds to the layer of
classical neural network.Taken from the Ref. [48]. FIG. 3. Quantum circuit implementing data re-uploading,
each block corresponds to the layer of classical neural network.
Image is take from the Ref. [49].
quantum-classical neural network a hidden layer is nor-
mally implemented utilising a parameterized quantum optimization task at hand
circuit. By ”parameterized quantum circuit”, we mean a
quantum circuit where, for instance, the rotation angles θ∗ = arg min C(θ). (1)
for each gate are trainable parameters, specified by the θ
components of a classical input vector. The outputs from The trademark of VQAs is that a quantum computer
our neural network’s previous layer will be collected and is utilised to estimate the cost function C(θ) while har-
used as the inputs for our parameterized circuit. Nor- nessing the power of classical optimizers for training the
mally the measurement statistics of the quantum circuit quantum parameters. A rather crucial assumption here
can then be fed as inputs for the following layer. Notice is that one cannot efficiently compute the cost function
that this kind of approach establishes a link between the on the classical computer, as this would imply an absence
classical and quantum neural networks. An important of quantumm advantage in the VQA framework.
point to note is that a single qubit classifier generates
no entanglement, and can therefore be simulated classi-
cally. If one hopes to achieve a quantum advantage using C. DRC: Data-reuploading classifier
hybrid neural networks, one needs to introduce several
qubits and consequently entangle them, harnessing that
Data re-uploading is a subclass of quantum embed-
quantum resource.
ding which is realised by catenating repeating units in a
row. Single-qubit rotations applied several times along
the circuit generate the necessary non-linearity for en-
B. Variational Quantum Algorithms(VQA) gineering a functional neural network. Moreover, it has
been demonstrated that a single qubit can realise both
Variational circuits are quantum circuits that have being a universal quantum classifier [23] and being a uni-
learning parameters that are optimised through clas- versal approximant [24] To load [x1 , x2 ] into the qubit,
sical learning subroutines, in spirit, this kind of ap- we just start from some initial state vector, |0i, apply
proach is reminiscent of a Variational Quantum Eigen- the unitary operation U (x1 , x2 , 0) and end up at a new
solver (VQE) [2, 46]. point on the Bloch sphere. Here we have padded 0 since
As schematically shown in Fig.2, the first step towards our data is only 2-dimensional. Authors of Ref. [23]
developing a VQA is to define a cost or loss function discuss how to load a higher dimensional data point
C which encompasses the solution to the problem. Af- [x1 , x2 , x3 , x4 , x5 , x6 ] by breaking it down into sets of
ter that, an ansatz is introduced through the quantum three parameters (U (x1 , x2 , x3 , U (x4 , x5 , x6 ).
operation depending on a set of continuous or discrete After the data loading stage, we want to have some
parameters that can be optimized. This ansatz is then trainable non-linear model analogous to a deep neural
trained in a hybrid quantum-classical loop to solve the network with a non-linear activation function where one
4

FIG. 4. Quantum circuit implementing data-reuploading with


strongly entangling layers, where entanglement between the
blocks is introduced with controlled two qubit gates. Figure
is take from the Ref. [49].
.

FIG. 6. (First row) Block Diagram of the specific QNode pro-


posed in the current study. (Second row) Block Diagram of
the Full Hybrid (NN/VC-DRC) classifier where a VC-DRC
FIG. 5. VC-DRC example for two Blocks and one entangling circuit is placed after a classical neural network, (Third row)
layer per block (B=2 , L=1). Block Diagram of the Full Hybrid classifier where a fully quan-
tum VC-DRC circuit is placed before classical neural network
(VC-DRC/NN).

III. FH:NN/VC-DRC AND FH:VC-DRC/NN


FULL HYBRID NEURAL NETWORKS
can learn the weights of the model. Fig. 3 are showing ENRICHED WITH VARIATIONAL AND
DATA-REUPLOADING TECHNICS
how data reuploading is implemented by the sequence
of B repeating units which correspond to the layers of
classical neural networks, consequently one expects that A. VC-DRC
with increasing B one gets a deeper neural network and
consequently better learning can be obtained. Each unit A Variational classifier circuit (VC) consists of a data
is realised as a product of two unitaries U (x1 , x2 , 0) and embedding layer which in turn loads the classical data
U (θ1 , θ2 , θ3 ), where the second unitary contains the train- into the qubits followed by the entangling layers (CNOT
able parameters. This approach can be boosted by intro- gates that entangle each qubit with its neighbour) and
ducing strongly entangling layers through utilisation of the measurement outcome is the expectation value of a
CNOT gates as it is shown on Fig. 4. Pauli observable for each qubit [50]. In our case we use
an angle embedding Rx . In order to combine a VC cir-
cuit with DRC technique we define as one block (B) a
As it has been mentioned in the previous section, one sequence of data embedding and entangling layers (L).
can also speculate that multiple qubits with an entangle- By adding many blocks we re-introduce the input data
ment between them could provide some quantum advan- into the model. In Fig. 5 we illustrate such VC-DRC
tage over classical neural networks. circuit for B=2 , L=1.
5

B. QNode

Pennylane is an open-source software framework for


differentiable programming of quantum computers. All
our models are builded using this framework. In Pen-
nylane an object QNode represents a quantum node in
the hybrid computational graph. Here a quantum func-
tion is used to create a quantum node, or QNode object,
encapsulating the quantum function (corresponding to a
variational circuit) and the device used to execute the
function.
Here we would like to clarify what we call a QNode FIG. 7. (First row) Pattern of Dataset. (Second row) Pattern
of dataset for different noise levels.
in the scope of the current manuscript. As depicted in
the first row of the Fig. 6, a QNode is a specific circuit
where input data are passed to the quantum Node which
each layer can contain an arbitrary number of neurons
consists of a VC-DRC and a final classical decision layer.
but the last layer (Feeding classical layer) should always
The input classical data is passed into the quantum
have the same number of neurons as number of qubits.
circuit as rotation angles Rx (”angle embedding”) on the
In our 2D case the classical NN, consists of a 2-neuron
Bloch sphere. After the computation on the quantum
layer with ReLU as the activation function (Master clas-
node is completed, measurement is performed and the
sical layer), followed by a 2-neuron layer with a Leaky
outcome is passed to the classical decision layer which
ReLU activation function (Feeding classical layer).
decides the final prediction label of the binary classifier.
For FH: VC-DRC/NN the first part is a VC-DRC cir-
cuit, followed by the previously described NN network
and the same final decision layer. We remark that we
C. FH:NN/VC-DRC and FH:VC-DRC/NN
also tried Sigmoid , tanh and general geometric func-
tions, and the best performing activation functions were
In this section we propose two varieties of a new bi- selected.
nary classifier architectures which which are named un-
der the common name Full Hybrid (FH). On a basic level,
FH consists of a VC-DRC combined with classical lay-
ers. We came up with two novel architectures for the IV. COMPARATIVE STUDY OF DIFFERENT
QUANTUM AND CLASSICAL CLASSIFIERS
FH circuits depending on whether the VC-DRC circuit
is at the end or at the beggining of the model(named
FH: NN/VC-DRC and FH: VC-DRC/NN respectively). Here we test several models (including our proposed
These architectures are extensively studied in the current models) and benchmark them against each other as well
manuscript as novel candidates for performing binary as to the best-known classical machine learning coun-
classification on noisy datasets (See second and third row terparts by running on the simulator backends(such as
of Fig. 6). Moreover, we demonstrate in great detail, in Aer in qiskit) for 2-dimensional and 3-dimensional non-
the next section, that FH architectures outperforms sev- convex datasets. Then we will study the resilience of our
eral previously known quantum classifiers and performs different approaches to the noise by introducing asym-
equally well compared to classical counterparts. We com- metrical Gaussian noise by studying the prediction grids
ment that, in the FH:VC-DRC/NN case the power of and ROC/AUC characteristics.
the approach is given by the fact that the VC-DRC part This kind of study sheds light on the learning prop-
can be acting as a quantum embedding as evidenced by erties as a function of the amount of existing noise in
Refs. [26, 51]. In this case the goal is to derive the angle the dataset. These results have been obtained by sys-
embedding for which the separation of the data labels tematic hyperparameter tuning, by observing how the
is maximized in the Hilbert space. In what follows, we ROC/AUC changes with: the number of repeating units
provide more technical details on the Full Hybrid archi- in the data-re- uploading approach, batch size, number
tectures with an emphasis on explaining and giving more of epochs and the number of strongly entangling units.
details on the Master, Feeding and Decision classical lay- To produce datasets with noise, we introduce asymmet-
ers which are depicted in the second row of the Fig. 6. rical (here noise is only applied to one class) Gaussian
For FH: NN/VD-DRC the first part is a classical neu- noise (N). In bottom Figure 7 we plot the case of N=0.0
ral network(NN), followed by the VC-DRC circuit and , N=0.6 and N=1.2. Each dataset has 6000 data points
a final decision layer, which is just a single neuron layer and is further equally splitted into training and testing
with a sigmoid activation function. We use a classical datasets.
NN that is not fine-tuned for this specific classification To demonstrate the power of the data-reuploading
task. Moreover, as it can be seen on Fig. 6, the classi- technique combined with the variational classifier in the
cal NN can contain an arbitrary number of layers, and VC-DRC model, we plot the ROC/AUC versus noise for
6

different number of blocks. The results are shown in right we summarize the highest ROC/AUC scores for the
Fig.8. It is apparent from Fig. 8 (first row) that with respective classifiers. In the left figure we show predic-
an increasing number of repeating blocks, we get better tion grids for the respective quantum classifiers. As in
ROC/AUC for every noise level for the DRC classifier. previous case, VC is more stable to noise and DRC tends
On the bottom row of figure Fig. 8 we show results for to overfit and explores richer prediction grids. That is
the VC-DRC where compared to DRC we get even higher why VC-DRC, which combines both features, and the
ROC/AUC. We remark that no major improvements are more complex approach like FH, is giving great results
seen for a Block number greater than six. From now on, as apparent from row number 6. Surprisingly, for this
in all codes of this section, we will set the number of particular dataset FH: NN/VC-DRC fails to capture the
blocks equal to six (B=6). In what follows we specify pattern of the dataset while FH: VC-DRC/NN captures
number of blocks and layers for each classifier: 1. The the pattern and has the highest ROC/AUC score. It
single qubit DRC (B=6) 2. 2 qubit VC (with 6 layers, should be noted that the FH models outperforms again
L=6) 3. VC-DRC (B=6,L=1) 4. QNode (B=6,L=1) both it’s components (NN and QNode).
5. FH: VC-DRC/NN (B=6,L=1) 6. FH: NN/VC-DRC
(B=6,L=1). All models have been trained for maximum
35 epochs, using the same optimizer and learning rate. V. CONCLUSIONS AND FUTURE
The best result during the training process is shown. On DIRECTIONS
the left Fig.9 we compare all the previously mentioned
classifiers. As we can see from on the left Fig. 9 VC-
In this paper, we applied Quantum Machine Learn-
DRC outperforms both VC and DRC.VC-DRC and Qn-
ing frameworks to improve binary classification models
ode have almost identical performance. The FH:NN/VC-
for noisy datasets which are prevalent in financial mar-
DRC outperforms all classifiers whilst FH:VC-DRC/NN
kets. The metric used for assessing the performance of
has slightly worse behavior. In the right column of Fig.9
our quantum classifiers is the area under the receiver op-
we can see the prediction grids for all classifiers at dif-
erating characteristic curve (ROC/AUC). By combining
ferent noise levels. For low noise levels (Noise/10=0),
such approaches as hybrid-neural networks, parametric
DRC and VC struggle to capture the prediction grid
circuits, and data re-uploading we created a new ap-
pattern while VC-DRC and FH almost capture it. For
proach called Full Hybrid (FH). We tested our models
medium noise levels (Noise/10=6), DRC tends to cap-
for the classification of 2 and 3-dimensional non-convex
ture the noise (overfitting) while VC looks more stable.
datasets and benchmarked them against each other as
VC-DRC still captures the main pattern but also shows
well as to the best known classical machine learning coun-
signs of overfitting. FH performs very well thanks to the
terpart by running simulations on quantum simulators.
classical preprocessing and utilising the power brought by
Then, by introducing asymmetrical Gaussian noise in the
VC-DRC. For high noise levels (Noise/10=12) FH cap-
input datasets, we studied the resilience of our different
tures the pattern and shows robustness to the noise while
approaches to noise. This kind of study sheds light on the
the rest of the classifiers are capturing the noise. In order
learning efficacy to the amount of noise in the dataset. In
to demonstrate that FULL HYBRID does not perform
the scope of the manuscript we also performed system-
well only because of the strong classical NN attached to
atic hyperparameter tuning by studying how ROC/AUC
the quantum circuit, we benchmark FH versus just the
changes with the number of repeating units in the data-
Classical part (NN) and versus just the Quantum part
re-uploading approach, number of qubits, batch size,
(QNode). On from Fig. 10 we show results for two NN’s
number of epochs and number of strongly entangling
one with 35 epochs training (same training epochs as in
units. An extensive benchmarking of our new QML ap-
the FH) and 3000 epochs just to see what is the best
proach against existing quantum and classical classifier
outcome this NN can produce. We conclude that the
models reveals that our novel (FH) models exhibits bet-
FH outperforms both it’s components (NN and QNode)
ter learning properties to asymmetric Gaussian noise in
which shows that FH is more powerful classifier than it’s
the dataset compared to known quantum classifiers, and
isolated parts.
performs equally well for existing classical counterparts.
To test even further the FH classifier, we benchmark its Yet more understanding of the merits of the (FH) classi-
performance against a great number of classical counter- fier has been gained by a detailed analysis and compar-
parts, which are specified in the inset of the Fig.11. Inter- ison of the prediction grids for the VC, DRC, VC-DRC,
estingly, this figure shows that in the high noise region, QNode binary classifiers. We observed that for low noise
the quantum classifier even outperforms some classical levels , DRC and VC struggle to capture the prediction
ones or performing equally well in all noise regions. We grid pattern while VC-DRC and FH almost fully capture
also see that compared to the other classical approaches it. For medium noise levels, DRC tends to capture the
(QDA, Decision tree, KNN and Random forest) that are noise (overfitting) while VC looks more stable. VC-DRC
well suited for non-convex classification problems and still captures the main pattern but also shows signs of
showing good performance in all noise regimes. In Fig. 12 overfitting. FH performs very well thanks to the clas-
we are showing results for a more complicated non-convex sical preprocessing and utilising the power brought by
classification problem versus noise. In the table on the VC-DRC. For high noise levels, (FH) captures the pat-
7

FIG. 9. (Left) ROC/AUC for DRC, VC and VC-DRC clas-


sifiers for different noise levels. (Right) Prediction grids for
respective classifiers for different noise levels.
.

FIG. 10. ROC/AUC for increasing level of noise for the classi-
fication of 2d dataset. Here we benchmark FH versus just the
classical part (NN) and versus just the quantum part (QN-
ode).

FIG. 8. ROC/AUC as a function of number of repeating


blocks of data re-uploading for the DRC classifier (Top row)
and VC-DRC classifier (Bottom row)
.

tern and shows robustness in noise while the rest of the


classifiers are capturing the noise in the dataset. It is a
well conceived fact that one of the bottlenecks for VQAs
is the phenomenon called ”barren plateau” [52]. As it has
been demonstrated in Ref. [52], a given spin-spin inter-
acting Hamiltonians cost function may exhibit a barren FIG. 11. ROC/AUC for increasing level of noise for the clas-
plateau, associated with exponentially vanishing variance sification of 2d dataset. Here we benchmark a great number
in its first derivative, when one increases the number of of classical classifiers against our proposed FULL HYBRID
qubits. Moreover, the VQE based algorithms perform a classifier.
classical-quantum feedback loop to update the parame-
8

tioning that we plan to test our classifiers on real world


financial data. Here we hope to demonstrate that our
proposed classifiers have the potential to improve credit
scoring accuracy. Credit scoring provides lenders and
counterparties better transparency of the credit risk they
are taking when dealing with a counterparty. For large
companies, this transparency is provided by public credit
ratings. Small and medium enterprise companies(SMEs)
are not covered by rating agencies and are suffering from
reduced availability of credit. These datasets, along with
the best classical neural networks, will by provided by the
company called Tradeteq (Tradeteq is a value-added ser-
vice provider to the Networked Trading Platform (NTP)
of Singapore).
In summary, we have demonstrated that the FH ar-
FIG. 12. (Right) ROC/AUC for classifiers for different noise chitecture outperforms several previously known quan-
levels. (Left) Prediction grids for respective classifiers for dif- tum classifiers along with some of the best known classi-
ferent noise levels. cal counterparts. Interestingly, in the FH: VC-DRC/NN
case, the power of the approach is given by the fact that,
the VC-DRC part is acting as quantum embedding.
ters of the parametric quantum circuits. For future stud-
ies, it would be interesting to implement non-VQA algo-
rithms for building more efficient quantum classifiers. By
the time a classical computer calculates its output, the Appendix A: Benchmarking binary classiffier for 3
classical-quantum feedback loop limits the efficiency of dimensional non-convex datasets
the quantum device, slowing the algorithm execution on
current cloud computing frameworks. Most of the obsta-
In order to gain insights about the performance of our
cles faced by VQE, such as the barren plateau issue [52]
FH classifier architecture in higher dimensions we study
as well as lacking a systematic method to select the
classification of 3-dimensional non-convex figure, dataset
ansatz and the innate necessity of having controlled uni-
of which for the different levels of noise is presented in
taries, have been recently tackled by suggesting a quan-
the first rows of Fig 13 and Fig 14. Then we proceed by
tum assisted simulator (QAS) [53, 54]. Remarkably, The
benchmarking FH classifiers against the QNode and VC.
QAS algorithm does not require any classical-quantum
As we can see for this particular dataset, FH:NN/VC-
feedback loop, can be parallelized, alleviates the barren
DRC shows the best performance.
plateau problem by prescribing a systematic approach to
We also found it interesting to show (See Fig 14) a 2D
constructing the ansatz, and is not based on the usage
projection of the prediction grid for the dataset which has
of complicated unitaries. Of course, for the future stud-
3 red regions and thus is the hardest non-convex example
ies, one has to keep in mind that sensitivity to errors
considered so far. In rows 2-6 we show prediction grids
and noise in qubits and quantum gates are the two most
for the VC-DRC, QNode, FH:VC-DRC and FH:NN/VC-
prominent obstacles towards scalable universal quantum
DRC, respectively. We see that in the low noise regime
computers. Given that, it would be nice to study how our
FH:VC-DRC/NN and QNode perform the best at the
results are affected if one implements noise models for re-
same time, VC-DRC fails to capture upper right corner
alistic quantum backends. In general, a noisy quantum
of that red region. Similar findings hold for the inter-
system is described by the open system model and sys-
mediate noise regime, However in the high noise regime
tems dynamics within the Born-Markov approximation
FH:VC-DRC/NN and QNode obtain only two regions in
is governed by the Lindblad master equation for the sys-
red due to too much noise in the dataset, yet VC-DRC
tem’s density matrix [55]. Another approach to describe
is still largely overfitting showing 3 disconnected regions,
the different noise channels is based on Kraus operators
but guessing their locations wrongly. To summarise, FH
which are the most general physical operations acting
classifiers show the maximal resilience to the noise in the
on density matrices[13]. Since most of our codes were
dataset and are well suited for non-convex boundary clas-
based on PennyLane, it is instructive to mention that
sification problems.
Pennylane has 3 different ways for implementing noise in
quantum circuits: classical parametric randomness, Pen-
nyLane’s built-in default.mixed device, and plugins for
other platforms. Of course, Quantum circuits may be
run on a variety of backends, some of which have their
own associated programming languages and simulators.
PennyLane interfaces to these other languages via plugins
such as for Cirq and Qiskit. Finally, it is also worth men-
9

FIG. 13. (First Row) Dataset for the 3 dimensional non-


convex problem, with increasing noise levels from left to the
right (Second row) ROC/AUC for the QNode (red dots) ,
Full-Hybrid (grey dots) and MLPC (orange dots) classifiers
for different noise levels.

FIG. 14. (First row) ROC/AUC for classifiers for different


noise levels for 3D dataset. (Second row) 2D projection pre-
diction grids for respective classifiers for different noise levels.
10

Acknowledgements— All the codes used in the on newly emerging non-VQA algorithms. P.Griffin would
manuscript will be provided under the reasonable re- like to acknowledge to the Monetary Authority of Singa-
quest. D.A. would like to thank Kishor Bharti for useful pore (MAS) and to Tradeteq for their support in this
discussions on Quantum Machine Learning (QML) and work.

[1] J. Preskill, Quantum 2, 79 (2018). [28] E. Farhi and H. Neven, arXiv preprint arXiv:1802.06002
[2] K. Bharti, A. Cervera-Lierta, T. H. Kyaw, T. Haug, (2018).
S. Alperin-Lea, A. Anand, M. Degroote, H. Heimo- [29] F. Tacchino, C. Macchiavello, D. Gerace, and D. Bajoni,
nen, J. S. Kottmann, T. Menke, et al., arXiv preprint npj Quantum Information 5, 1 (2019).
arXiv:2101.08448 (2021). [30] W. Cappelletti, R. Erbanni, and J. Keller, in 2020 IEEE
[3] I. H. Deutsch, PRX Quantum 1, 020101 (2020). International Conference on Quantum Computing and
[4] J. Preskill, in Introduction to quantum computation and Engineering (QCE) (IEEE, 2020) pp. 22–29.
information (World Scientific, 1998) pp. 213–269. [31] N. Wiebe, A. Kapoor, and K. M. Svore, arXiv preprint
[5] D. Gottesman, Physical Review A 57, 127 (1998). arXiv:1602.04799 (2016).
[6] P. W. Shor, in Proceedings of 37th Conference on Foun- [32] Y. Liao, D. Ebler, F. Liu, and O. Dahlsten, arXiv
dations of Computer Science (IEEE, 1996) pp. 56–65. preprint arXiv:1810.12948 (2018).
[7] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, [33] M. Schuld, M. Fingerhuth, and F. Petruccione, EPL
R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. (Europhysics Letters) 119, 60002 (2017).
Buell, et al., Nature 574, 505 (2019). [34] P. Tiwari and M. Melucci, IEEE Access 7, 42354 (2019).
[8] A. W. Harrow and A. Montanaro, Nature 549, 203 [35] C. Blank, D. K. Park, J.-K. K. Rhee, and F. Petruccione,
(2017). npj Quantum Information 6, 1 (2020).
[9] H.-S. Zhong, H. Wang, Y.-H. Deng, M.-C. Chen, L.-C. [36] D. K. Park, C. Blank, and F. Petruccione, Physics Let-
Peng, Y.-H. Luo, J. Qin, D. Wu, X. Ding, Y. Hu, et al., ters A 384, 126422 (2020).
Science 370, 1460 (2020). [37] F. Tacchino, C. Macchiavello, D. Gerace, and D. Bajoni,
[10] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, npj Quantum Information 5, 1 (2019).
N. Wiebe, and S. Lloyd, Nature 549, 195 (2017). [38] M. Rossi, M. Huber, D. Bruß, and C. Macchiavello, New
[11] P. Wittek, Quantum machine learning: what quantum Journal of Physics 15, 113022 (2013).
computing means to data mining (Academic Press, 2014). [39] V. Bergholm, J. Izaac, M. Schuld, C. Gogolin, M. S.
[12] M. Schuld, Supervised learning with quantum computers Alam, S. Ahmed, J. M. Arrazola, C. Blank, A. Delgado,
(Springer, 2018). S. Jahangiri, et al., arXiv preprint arXiv:1811.04968
[13] M. A. Nielsen and I. Chuang, “Quantum computation (2018).
and quantum information,” (2002). [40] N. Killoran, J. Izaac, N. Quesada, V. Bergholm, M. Amy,
[14] J. Preskill, California Institute of Technology 16, 10 and C. Weedbrook, Quantum 3, 129 (2019).
(1998). [41] M. Broughton, G. Verdon, T. McCourt, A. J. Mar-
[15] I. Goodfellow, Y. Bengio, and A. Courville, Deep learn- tinez, J. H. Yoo, S. V. Isakov, P. Massey, M. Y.
ing 1, 98 (2016). Niu, R. Halavati, E. Peters, et al., arXiv preprint
[16] M. I. Jordan and T. M. Mitchell, Science 349, 255 (2015). arXiv:2003.02989 (2020).
[17] A. W. Harrow, A. Hassidim, and S. Lloyd, Physical re- [42] S. Efthymiou, S. Ramos-Calderer, C. Bravo-Prieto,
view letters 103, 150502 (2009). A. Pérez-Salinas, D. Garcı́a-Martı́n, A. Garcia-Saez,
[18] H.-Y. Huang, K. Bharti, and P. Rebentrost, arXiv J. I. Latorre, and S. Carrazza, arXiv preprint
preprint arXiv:1909.07344 (2019). arXiv:2009.01845 (2020).
[19] P. Rebentrost, A. Steffens, I. Marvian, and S. Lloyd, [43] J. Kottmann, S. Alperin-Lea, T. Tamayo-Mendoza,
Physical review A 97, 012327 (2018). A. Cervera-Lierta, C. Lavigne, T.-C. Yen, V. Vertelet-
[20] S. Lloyd, M. Mohseni, and P. Rebentrost, Nature Physics skyi, P. Schleich, A. Anand, M. Degroote, et al., Quan-
10, 631 (2014). tum Science and Technology (2021).
[21] N. Wiebe, D. Braun, and S. Lloyd, Physical review let- [44] R. Orus, S. Mugel, and E. Lizaso, Reviews in Physics 4,
ters 109, 050505 (2012). 100028 (2019).
[22] M. Schuld and N. Killoran, Physical review letters 122, [45] M. Benedetti, E. Lloyd, S. Sack, and M. Fiorentini,
040504 (2019). Quantum Science and Technology 4, 043001 (2019).
[23] A. Pérez-Salinas, A. Cervera-Lierta, E. Gil-Fuster, and [46] M. Cerezo, A. Arrasmith, R. Babbush, S. C. Benjamin,
J. I. Latorre, Quantum 4, 226 (2020). S. Endo, K. Fujii, J. R. McClean, K. Mitarai, X. Yuan,
[24] A. Pérez-Salinas, D. López-Núñez, A. Garcı́a-Sáez, L. Cincio, et al., arXiv preprint arXiv:2012.09265 (2020).
P. Forn-Dı́az, and J. I. Latorre, arXiv preprint [47] L. Funcke, T. Hartung, K. Jansen, S. Kühn, and P. Stor-
arXiv:2102.04032 (2021). nati, Quantum 5, 422 (2021).
[25] S. Lloyd, M. Schuld, A. Ijaz, J. Izaac, and N. Killoran, [48] https://qiskit.org/textbook/ch-machine-
arXiv preprint arXiv:2001.03622 (2020). learning/machine-learning-qiskit-pytorch.html (2020).
[26] K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, Phys- [49] S. Ahmed, https://pennylane.ai/qml/demos/tutorial-
ical Review A 98, 032309 (2018). data-reuploading-classifier.html (2021).
[27] M. Schuld, A. Bocharov, K. M. Svore, and N. Wiebe, [50] https://pennylane.ai/qml/demos/tutorial/variational/classifier.html
Physical Review A 101, 032308 (2020). (2021).
11

[51] S. Lloyd, M. Schuld, A. Ijaz, J. Izaac, and N. Killoran, [54] K. Bharti, arXiv preprint arXiv:2009.11001 (2020).
arXiv preprint arXiv:2001.03622 (2020). [55] H. Carmichael, An Open Systems Approach to Quantum
[52] J. R. McClean, S. Boixo, V. N. Smelyanskiy, R. Babbush, Optics: Lectures Presented at the Université Libre de
and H. Neven, Nature communications 9, 1 (2018). Bruxelles October 28 to November 4, 1991 , 5 (1993).
[53] T. Haug and K. Bharti, arXiv preprint arXiv:2011.14737
(2020).

You might also like