Coherent Feed Forward Quantum Neural Network

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Coherent Feed Forward Quantum Neural Network

Utkarsh Singh,1, 2 Aaron Z. Goldberg,1, 2 and Khabat Heshami1, 2, 3


1 National Research Council of Canada, 100 Sussex Drive, Ottawa, Ontario K1N 5A2, Canada
2 Department of Physics, University of Ottawa, 25 Templeton Street, Ottawa, Ontario, K1N 6N5 Canada
3 Institute for Quantum Science and Technology, Department of Physics and Astronomy,
University of Calgary, Alberta T2N 1N4, Canada
Quantum machine learning, focusing on quantum neural networks (QNNs), remains a vastly uncharted field
arXiv:2402.00653v1 [quant-ph] 1 Feb 2024

of study. Current QNN models primarily employ variational circuits on an ansatz or a quantum feature map,
often requiring multiple entanglement layers. This methodology not only increases the computational cost of
the circuit beyond what is practical on near-term quantum devices but also misleadingly labels these models as
neural networks, given their divergence from the structure of a typical feed-forward neural network (FFNN).
Moreover, the circuit depth and qubit needs of these models scale poorly with the number of data features,
resulting in an efficiency challenge for real-world machine-learning tasks. We introduce a bona fide QNN
model, which seamlessly aligns with the versatility of a traditional FFNN in terms of its adaptable intermediate
layers and nodes, absent from intermediate measurements such that our entire model is coherent. This model
stands out with its reduced circuit depth and number of requisite C-NOT gates to outperform prevailing QNN
models. Furthermore, the qubit count in our model remains unaffected by the data’s feature quantity. We test
our proposed model on various benchmarking datasets such as the diagnostic breast cancer (Wisconsin) and
credit card fraud detection datasets. We compare the outcomes of our model with the existing QNN methods to
showcase the advantageous efficacy of our approach, even with a reduced requirement on quantum resources.
Our model paves the way for application of quantum neural networks to real relevant machine learning problems.

I. INTRODUCTION plex encoding techniques, known as quantum feature


maps, and use parameterized quantum circuits as mod-
els [6, 7] in place of the intermediate layers of a neural
Over the past decade, quantum machine learning
network. Sometimes, these circuits are concatenated
(QML) [1] has emerged as a dynamic field with
such that the measurement of one circuit provides non-
promising potential for advancing machine learning
linearity when inputting data into the subsequent cir-
techniques using quantum computing, especially be-
cuit [26]. In the hybrid approach, post-processing steps
cause quantum machines may efficiently explore large-
are similar to those used in classical machine learning
dimensional spaces for processing large amounts of
(ML), updating the parametrized quantum circuits us-
data [2–7]. While initial research focused primarily
ing techniques such as gradient descent, and are per-
on adapting standard machine learning algorithms to
formed on a classical computer. Nonetheless, these
quantum computing, such as quantum neural networks
feature mapping techniques often stumble when faced
(QNNs) [8–13] and quantum support vector machines
with real-world datasets, as the requisite number of
[6, 14], progress has been hindered by the lack of a
qubits and the circuit depth escalate with the number
clear path to scalability and practical applications of
of features in the data.
these methods. Instead, researchers have focused on
developing algorithms suitable for the current genera- In this work, we propose a novel circuit-based ap-
tion of noisy intermediate-scale quantum (NISQ) de- proach that incorporates entanglement layers for the
vices [13, 15–20], resulting in a new wave of algo- connections between nodes in adjacent layers, resem-
rithms known as NISQ-era QML algorithms [21]. bling a classical feed-forward neural network (FFNN).
This approach offers the advantage of adaptable inter-
These recent QML algorithms are predicated upon mediate layers, allowing us to adjust them according
low depth parameterized quantum circuits [22, 23], to the characteristics of the data, which is particularly
which take a hybrid approach that combines the significant for classification tasks. Further, because all
strengths of quantum processors with classical proces- of the hidden layers can be incorporated without inter-
sors. This hybridization allows for the development of mediate measurements, our approach is fully coherent
novel algorithms that have shown some advantages in throughout the evolution of the circuit and can take ad-
specific use cases [3, 24, 25], although a useful quan- vantage of quantum coherence properties throughout,
tum advantage remains to be seen. which is responsible for quantum advantages in related
Most QML models currently available employ com- settings [27]. Finally, by developing a data encod-
2

ing scheme inspired by classical neural networks that 1


writes multiple features onto a small number of qubits,
W0
our overall use of quantum resources is amenable to
quantum computers available today. X1
W1
To evaluate the effectiveness of our model, we
W2 Σ 0 or 1
conduct numerical experiments using the credit card X2
fraud detection and Wisconsin breast cancer diagnostic
datasets, employing the Qiskit package for simulations .. Wn
Binary Step Function
of quantum circuits, and compare the results to state- .
of-the-art QNN models. The results of these experi-
ments are presented show that our approach achieves Xn
significant improvements in both accuracy and compu-
tational efficiency over traditional QNN methods.
Our results highlight the potential of integrating FIG. 1. A perceptron, inspired by neural networks in the
classical neural network concepts into quantum com- brain. Inputs {Xi } are combined with weights {Wi } including
a bias W0 that are processed nonlinearly to produce a binary
puting frameworks, opening avenues for more sophisti-
output.
cated, resource-efficient quantum models in the future.
As we continue to explore and refine our model that we
dub the coherent feed-forward quantum neural network ically a step function, to produce its output y:
(CFFQNN), we anticipate its adaptability to a broader
range of applications, further bridging the gap between y = σ (z). (2)
quantum computing and real-world machine learning
challenges. Here, to make it a differentiable non-linear activiation
function, σ is typically taken to be a logistic sigmoid
or rectified linear unit function. If the weighted sum
A. Artificial Neural Network exceeds a certain threshold, the perceptron outputs a 1
(or “active”), otherwise, it outputs a 0 (or “inactive”).
The perceptron’s strength lies in its simplicity, adept
The functioning of the brain inspires the idea of an
at modelling linearly separable data, but it falters with
artificial neural network (ANN). The brain receives and
non-linear data. This spurred the evolution of multi-
processes information via a network of neurons, where
layer perceptrons (MLPs) or neural networks capable
each neuron receives inputs from a number of neurons,
of handling complex, non-linear patterns. ANNs op-
processes them, and produces an output that is then in-
timize weights in each layer using methods like back-
put to subsequent neurons. In an ANN, perceptrons or
propagation and gradient descent, allowing them to ap-
nodes are used to mimic biological neurons: each is
proximate any function with high accuracy [29, 30].
linked to others with variable weights and the structure
FFNNs, a key type of ANN, allow unidirectional infor-
of the connections between nodes and their weights can
mation flow and have shown impressive performance
then be used to process data; one artificial neuron is
in tasks like classification and regression. Any exem-
shown in Fig. 1.
plary FFNN will be shown below in Fig. 5(a).
Perceptrons were introduced by Frank Rosenblatt
in 1957 [28] as binary classifiers that form the foun-
dational concept behind artificial neural networks and B. Quantum Neural Network
deep learning. A perceptron takes multiple input val-
ues Xi and produces a single binary-outcome output y.
Quantum neural networks are among the most pop-
Each input is associated with a weight Wi , which signi-
ular algorithms in QML. Even though the field is not
fies the importance of that input. The perceptron com-
fully developed, there is a rapidly growing set of peo-
putes a weighted sum of its inputs with an overall bias
ple exploring potential quantum advantages [17, 24,
b via
31, 32].
z = ∑ Wi Xi + b (1) The momentum behind recent advancements in this
i domain can largely be attributed to the variational tech-
niques prevalent in numerous hybrid algorithms [7]. In
and passes this sum through an activation function, typ- general, one starts by encoding the classical data X ∈
3

(a) |0⟩

|0⟩
Feature Map (U(X)) Variational Circuit (Uvar (θ))
|0⟩

⊗(n−3)
|0⟩

(b)q0 H P (X̃0 ) • • • • (c) q0 Ry (θ0 ) • Ry (θ3 ) • Ry (θ6 )

q1 H P (X̃1 ) P (X01 ) • • q1 Ry (θ1 ) • Ry (θ4 ) • Ry (θ7 )

q2 H P (X̃2 ) P (X02 ) P (X12 ) q2 Ry (θ2 ) Ry (θ5 ) Ry (θ8 )

FIG. 2. (a) Architecture of a QNN acting on n qubits; the data X are loaded with a feature map U(X) and the data are processed
using a parametrized circuit Uvar (θ ). Subsequent measurement allows the parameters θ to be optimized and updated. These
steps may be repeated. (b) A 3-qubit feature map circuit administering the commonly used ZZFeatureMap. Here H represents
the Hadamard gate, P represents the phase gate, X̃i = 2Xi , and Xi j = 2(π − Xi )(π − X j ). (c) A 3-qubit variational circuit with
weight parameters {θ j } explicit.

RN onto the quantum state using a feature map U(X) features. This scaling is problematic on NISQ devices
that can be implemented by a quantum circuit [33]. due to increased error rates and circuit depth, leading to
Next, a variational circuit Uvar (θ ) is applied with in- higher likelihoods of decoherence and computational
telligently chosen single-qubit rotations R(θi ) and en- inefficiency. The combination of these scalability is-
tanglement layers on an input state U(X) |0⟩⊗n , where sues with the gate complexity challenges significantly
the θi parameters are the trainable weights and n is the hinders the practical implementation of QNNs on exist-
number of qubits employed and usually scales linearly ing quantum platforms, making the handling of com-
with N. Finally, the expectation value of some ob- plex, feature-rich datasets a formidable task and pos-
servable (e.g. Ẑ ⊗n ) is measured for the classical post- ing a significant bottleneck in fully leveraging quan-
processing to predict the class ỹ of the input data. Opti- tum computing for advanced machine learning appli-
mizing the weight parameters present in the variational cations.
circuit is done using some classical optimizers, eventu-
ally minimizing the cost function C(y(X, θ ), ỹ) in con-
sideration [7]. A schematic diagram of a typical QNN II. RESULTS
is shown in figure 2.
While this approach of QNNs demonstrates promis- A. The Model: Coherent Feed-Forward Quantum
ing outcomes in certain applications, it faces substan- Neural Network
tial challenges in scalability and gate complexity, par-
ticularly on NISQ devices [16, 34]. The number of Here, we introduce our CFFQNN model that uses
qubits required in QNNs tends to increase linearly a quantum-classical hybrid approach to process data.
with the number of data features, quickly exceeding The source code for all of our work can be found on
the limited qubit capacity of current quantum hard- GitHub as detailed below. The initial encoding layer
ware and thus restricting their applicability to smaller is similar to the first hidden layer of a conventional
datasets, instead of making use of the exponential scal- ANN, as illustrated in Fig. 3, with the classical data
ing of Hilbert space dimension with number of qubits. loaded onto quantum states. Subsequent layers consist
Additionally, the number of controlled-NOT (C-NOT) of a network single-qubit and controlled (entangling)
gates, crucial for creating entanglements in quantum rotation gates, all of which are parametrized by their
circuits, scales nearly quadratically with the number of rotation angles, exemplified in Fig. 4. Ultimately, the
4

qubits undergo measurement. Notably, the parameter- Such single gates are exemplified in the “1st hidden
4
ized controlled rotations are adaptable to cater to spe- layer” segment of Fig. 5(b).
cific network demands and the measurement process Since n is, in principle, independent from N, the 4 size
qubits undergo measurement. Notably, the parameter- Such single gates are exemplified in the “1st hidden
can be tailored based on both the data and
ized controlled rotations are adaptable to cater to spe-
the desired of the circuit need
layer” segment of Fig. 5(b).
not to depend on the number of data
structuralqubits
outcome.undergo This circuitry
measurement. inherently
Notably,
cific network demands and the measurement process the mirrors
parameter- features,
Such unlike
single gates the are case for
exemplified a traditional
Since n is, in principle, independent from N, the size in the QNN.
“1st hidden
ized controlled rotations
the architecture
can be of an ANN,
tailored basedasonarecan adaptable
both betheseen datato cater
by compar-
and the to spe-
desired layer”
Inofthe segment
the of Fig. 5(b).
subsequent
circuit need not layersto depend corresponding
on the number to ofhidden
data
cific
ing Fig. 5(a) network
versusoutcome.
(b).demands and the measurement process Since n is, in principle, independent newfrom N, the
by size
structural This circuitry inherently mirrors layers of an ANN,
features, unlike the we case initialize for a traditionalqubits QNN. applying
can be tailored based on both the data and the desired of the circuit need not to depend on the number of data
We elect the to perform of
architecture allanrotations
ANN, as can about the y-axis
be seen by compar- a parametrized rotation gate
In the subsequent layers as corresponding
a biasing termtoRy;hidden j (q0 j )
structural outcome. This circuitry inherently mirrors features, unlike the case for a traditional QNN.
for reasons ing that
Fig. will
5(a) become
versus (b).clear shortly.
the architecture of an ANN, as can be seen by compar- These are actinglayerson the
of an jth
ANN, qubit,
we then
initialize
In the subsequent layers corresponding to hidden we new apply
qubits parametrized
by applying
ing We
mathematically Fig. elect
5(a) to perform
described
versus by the
(b). allsingle-qubit
rotations about the y-axis controlled
rotation a parametrized
layers of anrotation
ANN, we rotationgates
initialize gatethat as aare
new biasing
qubits byterm
controlled
applyingRy;byj (q0the
j)
for
gate expressed reasons
in the that will
to single-qubit become clear
computationalshortly.
about thebasisThese are
y-axis qubits acting on
in the firstthe jth qubit,
layer. then we
Fora biasing
example, apply parametrized
termifRy;we
We elect perform all rotations a parametrized rotation gate as j (θ0want
j) to
mathematically
{|0i, |1i}foras reasons that will described
becomebyclear the shortly.
single-qubit These rotation
are connect controlled
acting thethefirst
on rotation
jthnode qubit,in gatesthe that
then are
firstapply
we layer controlled
to the first
parametrized by nodethe
gate expressed described in the single-qubit computational basis controlled
qubits inrotation
mathematically ✓by the single-qubit
q q
◆ rotation in the secondthe layer,firstgates
we layer.thatFor example,
apply aarerotation onif the
controlled we
by (n want to
the+ 1)th
{|0i, |1i} as
gate expressed in the single-qubit cos 2 computational
sin 2 basis qubit connect
qubitscontrolled the first
in the firstby node
layer. in the
For example,first layer we want tonode
to the
if qubit: first
Ry (q{|0⟩,
) =|1⟩} exp(as iq sy /2) = in thethe second layer,inwethe state of the 1st
sin q2✓cos cosq q2 sin q ◆ connect first node theapply a rotation
first layer to theonfirst
thenode
(n + 1)th
Ry (q ) = exp( iq sy /2) = 2 2 qubit
in the
17!secondcontrolled by the state of the 1st qubit:
(q )layer, we apply a rotation on the (n + 1)th
 θ q
 n+1
using the Pauli cossin
syσ. y /2)Sequential cosθ2 q2
sin
2 2−rotations
CR = |0i 1 h0| ⌦I
state ofn+1
+ |1i1 h1| ⌦ Ry; n+1 (q ).
Ry (θ )matrix
= exp(−iθ = θ θ
qubity controlled by the the 1st qubit:
about theusing samethe axisPauli commutematrix and
sin
sy . actSequential
cos
additively
2 as
2 rotations CRy 17!n+1
(q ) = |0i1 h0| ⌦ In+1 + |1i1 h1| ⌦ Ry; n+1 (q ).(5)
17→n+1
CR ⊗ In+1 +connected|1⟩1 ⟨1| ⊗ Ry;by
rotations as The other nodes are1 ⟨0| similarly n+1controlled-
y (θ ) = |0⟩ (θ ). (5)
Ry (q1 )Ryusing
about
(q 2) = theRy (q
the same1 +q
Pauli matrix
axis σy .
2 ). commute Sequential
and act additively i7 j (5)
The other
gatesnodes CRy are !
(qsimilarly), eachconnected by controlled-
In the about
R
first the
y (q1layer,
)Ry (qsame =axis
2 )the y (qcommute
Rdata 1+ q2 ). with
points and act additively
weights are as rotation
Therotation
other nodes are i7! j i j
similarly connected
parametrized
by controlled-
by inde-
gates CR each
weights i7q→i jj. Even though the rotations are con- parametrized by inde-
θ acting are pendent
R y In
(θ 1 the
)R (θfirst
) = R
layer,
(θ 1 the 2of
+ datathe
). points with weights y (q i j ),
encoded as the yrotation
2 y angle Ry gate rotation
pendent gates CRy q(θ
weights ), eachthough parametrized by inde-
In the first
encoded as layer,
the the data
rotation points
angle of with
the Rweights
gate are trolled
acting by different i j i. j Evenqubits
control the
in rotations
different are con-
states, all
on someencoded
initial state,
as the
where
rotation
the
angle
latter
of
is
the
taken
R
y
gate
to be
acting pendent
trolled weights
by θ
different
i j . Evencontrol though the
qubits rotations
in are states,
different con- all
on some initial state, where the lattery is taken to be oftrolled the rotations on a new qubit commute, such that the
some general
on some state Ry (b)|0i.
initial state, Rwhere All theof latter
the data points
is taken to be of the by rotations
different control on a new qubits
qubitincommute,
different states,
such that all the
some general state y (b)|0i. All of the data points aggregate of the effect
rotations onon a a
new node qubit in a hidden
commute, layer
such is
that indepen-
the
are successively
some encoded
general stateencoded
are successively
onto the
Ry (b)|0⟩. same qubit,
ontoAlltheofsamethe data which
qubit, points
which dent aggregate effect on a node in a hidden layer is indepen-
is schematized in Fig. 3. Since all of the rotations from
aggregate anyany
effect ordering a node among
onordering inamong
a hidden the nodes
thelayer in the
the previ-
is indepen- previ-
is schematized in Fig. 3. Since all of the rotations dentdent
are successively encoded onto the same qubit, which
from
from
any ordering among the nodes
nodes
in the
in
previ-
are aboutisare
the samethe
schematized axis, in such
Fig. ansuch
3. encoding
Since ofcanthebecan per- ous layer.
about same axis, an all
encoding rotations
be per- ousous layer.
layer.
formed withare about
a the
single same axis,
single-qubit such an
gate encoding
parametrized
formed with a single single-qubit gate parametrized by can be byper-
q =z=Â formed
qN =X with+Na single single-qubit gate parametrized by
i=1 z= iWÂ iNi=1b:XiWi + b:
θ = z = ∑i=1 XiWi + b: |fi i|fi i ••
Ry (XN WNRR)y·y(X NW
· ·NR
(X y N )2·W
(X · ·2R)R
y (X
y 2W12W
(X (X1yW
)R1y)[R R
1 )[Ry (b)|0i]
(b)|0i] =
WN ) · · · Ry (X2W2 )Ry (X1W1 )[Ry (b)|0⟩] = Ry (z)|0⟩. y = Ry (z)|0i.
(z)|0i.
(3)(3)(3) |0i|0i W0W0 WW
This is the first efficiency resulting from all of the ii
This is the
This first efficiency
is the resulting
first efficiency fromfrom
resulting all ofall the ro-
of the ro-ro-
tationsbeing beingabout
tations being
tations about theaboutsame thesame
the sameaxis,
axis, axis,which
which which
reduces reduces
reduces thethethe
number
number of data-encoding
of data-encoding gates,
gates, and
and alsoalso is responsible
is responsible FIG. FIG. 4. An illustration of a single intermediate node in CF-
number of for
data-encoding
better mimicking
gates,
an
and also
ANN by
is responsible
directly encoding the
FIG. 4.4. An
FQNN Anandillustration
illustration
how the of ofa single
a single
weight intermediate
intermediate
values are appliednode node
oneinnode
in CF-
from CF-
for better
for better variable
mimicking mimicking
an ANN an ANN by
by adirectly directly encoding
encoding thethe FQNN
FQNN and
and how
how the
the weight
weight values
values are are applied
applied from from
one one
node node
to the next using controlled rotations by angle Wi , with a pos-
variable z zwithout without giving
giving preference
a preference to to
thethe ordering
ordering totothe
thenext
next using
using controlled
controlled rotations by angle W , with a pos-
variable zamong
without
amongnodes giving
nodeswithin a preference
withina agiven
givenlayer.
layer.to the ordering sible single-qubit rotationrotations by angle
by bias angle W i. Wi , with a pos-
siblesingle-qubit
sible single-qubit rotation
rotation byby bias angle
bias W0 . W 0.
angle
among nodes within a given layer. 0

Figure
Figure 4 displays
4 displays a single
a single intermediate
intermediate nodenode
in thein the
|0i X0W0 X1W1 X2W2 ··· XN WN Figure
CFFQNN’s 4 displays hidden a layer.
single Itintermediate
illustrates
CFFQNN’s hidden layer. It illustrates how how thenode the in
node the
node
|0i X0W0 X1W1 X2W2 ··· XN WN applies
CFFQNN’s
applies weight weight
hidden values
valueslayer. (denoted
(denoted as
It illustrates W
as W ) to these ) to these
hownodes nodes
the node
FIG. 3. The depiction of data encoding stage. Rotation gates depending
applies
depending weight
on onvalues
the the
value value(denoted
of theof last
the last
as
layer Wlayer
) to
nodes. nodes.
these
After After
nodes
FIG. 3. The depiction of data encoding stage. Rotation gates
withangles
anglesXX W act on a single qubit in analogy with inputs this
this
depending operation,
operation,on the
the the
state
value state
|φ i |f
⟩⊗|0⟩
of i i⌦|0i
the changes
lastchangesto
layer a to
new a
nodes. new
state state
After
with
FIG. 3. The depiction W0 act
0 on a single qubit in analogy
0 of0 data encoding stage. Rotation gates with inputs ↵
acting on a single neuron. An extra rotation gate with X 1 y → j i7! j (q ) |f i ⌦ |0i that may continue to be
i7CR
acting on a single neuron. An extra rotation gate with X0 =0 1 this = ψi operation,
j i= j CRy (θ
= ythe i j )state
|φi ji ⟩ ⊗|fi|0⟩ that
i⌦|0i may
changescontinue to a tonewbe state
with anglesand
X0WW0 = actb on a single
is added qubit in analogy
for flexibility to bias the with inputs
initial qubit. ↵ upon
acted upon
i
and W 0 0= b is added for flexibility to bias the initial qubit. acted by jby other
i7! other control control layers.layers.
acting on a single neuron. An extra rotation gate with X0 = 1 yi jWhile
= CR
While (qi j )ANN
ya classical
a classical
|fi iANN ⌦uses|0iuses thata perceptron
may continue
a perceptron
to be
to decide
to decide
and W0 = b is added for flexibility to bias the initial qubit. acted upon
whether by other
or not control
a certain nodenode layers.
should forward its output
Thisdata
This dataencoding
encodingprocedure
procedurecan canbebe repeated
repeated on on whether or not a certain should forward its output
multipledistinct
multiple distinctqubits
qubitstotoallowallowforformore more nonlinear
nonlinear toWhile
to
the the
nexta classical
next
one, one,
the the ANN
CFFQNN CFFQNN uses a
retains perceptron
retains
the the
branches toofdecide
branches of
This data encoding
processing
processing ofofthe procedure
the can
dataininthethe
data be repeated
quantum
quantum on
circuit.There-
circuit. There- whether
the or not
wavefunction
the wavefunction a certain
associated node
associated with should
the
with the forward
control qubit
control its
qubitoutput
be- be-
multiple fore,
distinct qubits with
fore,aaCFFQNN
CFFQNN to
withallow
n nqubitsfor more
in in
qubits the first
the nonlinear
layer
first cancan
layer be be toing
thein next
ing each of
in eachone,states
of thestates
|0⟩ and
CFFQNN
|0i and |1⟩ without
|1iretains
withoutcollapsing
the the theof
branches
collapsing
described as state via
state measurement.
via measurement. For
the wavefunction associated with the control qubit example,
For example, the branch
the of
branch the
of the
be-
processingdescribed as in the quantum circuit. There-
of the data
state
ing in where
stateeach all
where of ofall
statesthe
of control
the|0i control
and qubits are
qubits
|1i in
without state
are in |0⟩
state only
collapsing |0i only
the
fore, a CFFQNN with n |Ψ⟩ qubits in the
|Yi==[R(z)|0⟩] first
⊗n⌦n layer can be
[R(z)|0i] . . (4)(4) applies the the
biasbias rotation to the target qubits, whilewhile the the
stateapplies
via measurement. rotation For toexample,
the target qubits,
the branch of the
described as
state where all of the control qubits are in state |0i only
|Yi = [R(z)|0i]⌦n . (4) applies the bias rotation to the target qubits, while the
5

branch where all of the control qubits are in state |1⟩ tion value of some operator, which we further use to
applies the gate Ry; j (∑n0=1 θi j ) to qubit j. Overall, the decide the class of the data point as in a classical NN.
action takes the form In our work we often measure the value of the final
! (Nth) qubit ⟨ZN ⟩ as depicted in the “output layer” seg-
O n
U = ∏ CRi7y→ j (θi j ) = ∑ |X⟩⟨X|⊗ ment of Fig. 5(b). The measurement result is fed into a
Ry; j ∑ Xi θi j .
classical nonlinear activation function σ to produce the
ij X j i=0
(6) binary outcome
Here, X = X1 , · · · , Xn is a bit string with elements Xi ∈ (
{0, 1}, the sum runs over all such strings, and we have 1, σ (⟨ZN ⟩) = 1
included X0 = 1 to represent the bias term; the tensor ỹ = . (8)
0, σ (⟨ZN ⟩) = 0
product over j implies that the rotation on the jth qubit
associated with the branch of the wavefunction where
More general outcomes can be considered by either di-
the qubits are in state |x⟩ is by an angle ∑ni=0 Xi θi j ,
viding the ranges of expectation values ⟨ZN ⟩ into more
corresponding to the standard factor in ANNs. This
than two segments or by measuring more final qubits to
structure is schematized in the “2nd hidden layer” seg-
yield more possible final outcomes. The results of such
ment of Fig. 5(b), where the connections between con-
outcomes can be used to update the encoding weights
trol and target qubits are explicit and their weights are
Wi and intermediate weights θi j throughout the net-
given accordingly. All output values of the perceptron
work in an iterative fashion.
are essentially kept coherently and the system is ready
This method can create a complete FFNN like a stan-
to have the process repeated in a subsequent layer.
dard classical one without doing intermediate measure-
Put another way, we have replaced the nonlinear ac-
ments. An overall schematic diagram of a CFFQNN
tivation function σ in a standard perceptron by the con-
with two hidden layers with four and three qubits re-
trolled operations CRy . Unlike σ , the output of CRy is
spectively is shown in the figure 5(b).
not deterministic; it is probabilistic. Nevertheless, if
we measure one of the control qubits, we know we will
find state |0⟩ with probability p(0) = cos2 2z times and
state |1⟩ with the rest of the probability p(1) = sin2 2z , 1. Different Variations of the Model
depending on the value of z = ∑ni=1 XiWi + b. We can
turn such probabilities into binary outputs by simply In our work, we deploy two distinct versions of the
choosing the larger of the two, which are split at the CFFQNN model: the standard CFFQNN and a vari-
value α = π/2: ant that we dub FixedCFFQNN. While FixedCFFQNN
retains the architectural design of the CFFQNN, it di-
( verges in one key aspect: the weights in its initial layer
1, p(1) > p(0) ⇐⇒ z > α remain untrained. This reduction in the number of pa-
ỹ = . (7)
0, p(1) < p(0) ⇐⇒ z < α rameters to be trained significantly speeds the training
process while still outperforming previous QNNs.
In this sense, we have created a coherent QNN that re-
tains all of the properties of an ANN while allowing
for data to be processed without each perceptron being
restricted to a binary output. 2. Hyperparameters of the CFFQNN Model
After repeating the process for multiple layers, the
number of controlled (entangling) gates is given by the The architecture of CFFQNN closely mirrors that of
number of connections between the layers. This is at an ANN, sharing many of the same hyperparameters.
most a quadratic function of the number of nodes per This allows for customization in terms of the number
layer and a linear function in the depth of the neural of layers and nodes within each layer. Additionally,
network, which are expected to grow with the number the measurement scheme can be tailored to fit specific
of features in the data but do not follow a fixed relation- data needs; even the parameter α in Eq. (8) is a hyper-
ship. One can thus create a few-qubit quantum neural parameter. For instance, throughout our research, we
network with n ≪ N and verify empirically its success employed a single measurement strategy for CFFQNN,
for a given machine-learning tasks. measuring only the final qubit. For the FixedCFFQNN,
Finally, after all of the intermediate (hidden) layers, we adopted a partial measurement approach, targeting
we perform a measurement and calculate the expecta- all qubits except the qubits in the initial layer.
6

(a) Input 1st Hidden 2nd Hidden Ouput


layer layer layer layer

X0
Bias
Bias
X1
σ(hi0 )
X2 H0

σ(hi1 ) Out
X3
.. H1

. σ(hi2 )
H2
Xi−1
σ(hi3 )

Xi

(b)
1st hidden 2nd hidden
Layer Layer
|0⟩ Wi0 ∗ Xi • • •

|0⟩ Wi0 ∗ Xi • • •

|0⟩ Wi0 ∗ Xi • • •

|0⟩ Wi0 ∗ Xi • • •

|0⟩ B : θ04 θ14 θ24 θ34 θ44 •

|0⟩ B : θ05 θ15 θ25 θ35 θ45 •

|0⟩ B : θ06 θ16 θ26 θ36 θ46 •

|0⟩ B : θ07 θ17 θ27 θ37


| {z }
Output Layer

FIG. 5. (a) Architecture of an artificial neural network with two hidden layers. Here W represents the weight parameters, X are
data points, σ is a non-linear activation function, and hi j = Wi j Xi . (b) Architecture of a CFFQNN with two hidden layers where
X are data points, and W and θ represent the weight parameters. The number of modes in a layer of the ANN correspond to
the number of qubits in a layer of the CFFQNN. In contrast to earlier QNN models such as those in Fig. 2(c), the parameters of
the CFFQNN change the controlled operations such that the CFFQNN circuits are not solely parametrized by their single-qubit
gates; this is what allows the CFFQNN to resemble an ANN.

B. Numerical Results cuit alongside a RealAmplitudes circuit with two repe-


tition layers. Additionally, to provide a comprehensive
performance perspective, we compared the efficacy of
We evaluate the CFFQNN’s performance against the all quantum models against the classical MLPClassi-
prevailing QNN model across various datasets. For fier—an FFNN.
the conventional QNN model, we employ the ZZFea-
tureMap [35] to encode classical data into the quan- To predict the input data’s output class, we predomi-
tum circuit and the RealAmplitudes [35] circuit as the nantly employed the Statevector simulator from Qiskit
variational circuit with the trainable weights. We use [35][33], designed to emulate the ideal quantum states
the COBYLA [36] optimizer to optimize the weights of a quantum system without any external noise or de-
(θ s). Figure 2 illustrates a 3-qubit ZZFeatureMap cir- coherence. This simulator offers an exact depiction of
7

the quantum state, facilitating precise calculations and (a)


1.0
forecasts. It proves especially valuable for theoretical
investigations and grasping the optimal performance of 0.8

quantum algorithms.
0.6

Score
0.4
C. Data and Metrics:
0.2

We evaluated the efficacy of our quantum machine


0.0
learning model using the credit card fraud detection Accuracy Recall
Metrics
F1 Score Precision

and breast cancer diagnostic datasets. These datasets (b)


50 48 659
serve as standard benchmarks for testing and compar- 45
600
ing different machine learning models. Details about 39 536

Scale for D, TP and C


40
35 35 36
these models can be found in the Methods section. 500

Scale for R
30 400

21 300
20 18 18
16 16
D. Results on Credit Card Dataset: 14
180 200
162
10
100
For this study, we used the PCA to reduce the dimen-
sion of Credit card dataset to seven features. For both 0
Depth Trainable
Parameters
CNOTs Runtime
0

CFFQNN and FixedCFFQNN, we utilized a network


structure with three nodes in the initial layer, two in the MLP- CFFQNN Fixed- QNN QNN35
Classifier CFFQNN
subsequent layer, and a single node in the concluding
layer.
Figure 6(a) presents a performance comparison be- FIG. 6. (a) Performance comparison of various models ana-
tween CFFQNN, FixedCFFQNN, QNN, and the classi- lyzed on the credit card fraud detection dataset. (b) Compar-
ative analysis of resources utilized by QNN and CFFQNN
cal MLPClassifier. The bar chart clearly demonstrates
on this dataset. The scales for the depth, trainable param-
the superior performance of both CFFQNN variants eters, and C-NOTs using the vertical axis on the left while
over the conventional QNN model. Despite augment- that for the runtime uses the axis on the right. The bars from
ing the QNN with 35 parameters for a balanced com- left to right are for the MLPClasifier, CFFQNN, FixedCF-
parison, there was no notable enhancement in its re- FQNN, QNN, and QNN35, omiting the bar for resources for
sults. the MLPClassifier in (b) because it is not a quantum model.
Figure 6(b) outlines the quantum resources utilized
by each quantum model. Evidently, the CFFQNN
models require a reduced circuit depth, fewer CNot zero, indicating a failure of the model to effectively
gates, and a shorter simulator runtime compared to the learn from the data, resulting in the misclassification
QNN model. Additionally, the FixedCFFQNN model of all test data into a single category.
exhibits a reduced requirement on the number of pa- Figure 7(b) provides a comparative analysis of the
rameters. resources consumed by each of the four quantum mod-
els. While the resource utilization is largely consistent
across all models, it is noteworthy that the QNN mod-
E. Results on Breast Cancer Dataset: els demand a significantly higher number of C-NOT
gates compared to the CFFQNN variants.
For the breast cancer dataset, we narrowed down
the feature space to 7 features and executed 100 itera-
tions of COBYLA to enhance the quantum models. We III. DISCUSSION AND CONCLUSION
adopted a network structure similar to that used for the
credit card dataset in our proposed quantum models. Our approach and results demonstrates a step for-
In Figure 7(a), it is evident that both CFFQNN and ward in quantum machine learning through the intro-
FixedCFFQNN outperform the existing QNN models. duction of the CFFQNN. Our CFFQNN is the direct
The QNN’s Recall, F1, and Precision scores are all quantum upgrade of a classical ANN, with all possi-
8

(a)
1.0
demonstrated the superior performance of CFFQNN
in classification tasks, including a notable variant: the
0.8 FixedCFFQNN. In the latter approach, we did not train
any parameters in the first layer, yet it still outper-
0.6 formed existing QNN models. This untrained variant
Score

underscores the inherent efficiency and robustness of


0.4
the CFFQNN architecture. Achieving high accuracy
0.2 while requiring minimal quantum resources, both the
standard and Fixed CFFQNN variants are significant
0.0
Accuracy Recall F1 Score Precision steps toward practical use of quantum machine learn-
Metrics
(b) ing. Compared to QNN models utilizing the ZZFeature
50 48
45
80
88
Map, the CFFQNN exhibits not only enhanced perfor-
41 41
39
77 76 80
mance but also a more efficient utilization of quantum
Scale for D, TP and C

40
35 35 36
resources. These characteristics of our model will per-
60
30 Scale for R
suade realization on various quantum computing hard-
21
ware as initial steps toward a scalable implementation
40
20
16 16 for practical application of quantum machine learning.
14

10 20

IV. METHODS
0 0
Depth Trainable CNOTs Runtime
Parameters

We create an instance of the CFFQNN to perform


MLP- CFFQNN Fixed- QNN QNN35
Classifier CFFQNN data classification on two standard datasets. The CF-
FQNN model is simulated using Qiskit, while the
FIG. 7. (a) Performance comparison of various models ana- datasets employed are accessible through Kaggle. We
lyzed on the breast cancer diagnostic dataset. (b) Compara- here detail parameters and techniques used in creating,
tive analysis of resources utilized by QNN and CFFQNN on training, and evaluating the model.
this dataset. Scale and legend are the same as in Fig. 6. First, we select the maximum number of qubits to be
used in our network as seven: this is small enough to
be simulable on a standard personal computer yet large
enough to exhibit genuinely quantum features such as
ble outputs of each classical perceptron upgraded to a
a large Hilbert space spanned by 128 elements. The
branch of the quantum state that exists simultaneously
major question is whether this is a sufficient number
and interacts with all other branches. The advantages
of qubits to perform nontrivial machine learning tasks.
of the CFFQNN over previous QNNs stems from its
Standard QNNs require one qubit per feature in the
unique integration of the ∑i XiWi + b term, inspired by
dataset, so we limit our investigation to data with 7 fea-
classical neural networks, into the initial layer within
tures. In comparison, the CFFQNN can handle more
a higher-dimensional Hilbert space. This approach,
features with the same total number of qubits, so we
combined with the strategic incorporation of quantum
note that the number of features is limited by the QNNs
entanglements in subsequent layers, marks a significant
against which we seek to compare the CFFQNN, not by
advancement over traditional QNN models.
the CFFQNN itself.
A pivotal advantage of our model is that its qubit Next, we take real-world datasets and reduce their
count and number of C-NOT gates in its circuit are in- feature spaces to make the data size suitable for sim-
dependent from the number of features in the dataset. ulation, noting that many-qubit quantum systems are
This independence is particularly advantageous in inherently challenging to simulate and that therein lies
dealing with complex, realistic datasets with varying potential quantum advantages. The Credit Card Fraud
feature sizes, ensuring scalability and flexibility. Fur- detection dataset has 30 features with which one seeks
thermore, the model’s design allows for direct adjust- to evaluate whether a given transaction was fraudu-
ments in intermediate layers, a feature that enables it to lent or not, a binary classification problem, while the
effectively support deep network architectures, a limi- Breast Cancer Diagnostic dataset’s 30 features are used
tation in many existing QNN models. to evaluate whether a given patient does or does not
Through numerical experimentation, we have have breast cancer, another binary classification. Since
9

some of the features may be highly correlated with After all of the features are uploaded, the next step
each other or may contribute less to the overall vari- of the QNN is a parametrized quantum circuit. Single
ance in the data distribution, a linear transformation of repetition of this consists of at least 2N single-qubit
the coordinates in the feature space can elicit the prin- rotation gates Ry (θi ), N acting on each qubit, sepa-
cipal components, which are the new coordinate axes rated by fixed entangling gates. Each qubit experiences
that account for most of the independent information one parametrized Ry gate, then a sequence of entan-
contained in the features and allow one to neglect axes gling gates ∏i−1i=1 CNOT
N−17→N
· · · CNOT27→3 CNOT17→2
where the data change less. Such principal component is applied, then the process is repeated in alternating
analysis (PCA) is standard in data processing and here fashion and ends with parametrized single-qubit rota-
reduces both 30-feature datasets to seven principal fea- tion gates for a total of 2(N − 1) controlled operations
tures each. These details are summarized in Table I. in the parametrized circuit. All the qubits are then mea-
In the case of the Credit Card dataset, we also ad- sured in the computational basis and the measurement
dressed the issue of class imbalance. To ensure un- result is processed in the same was as for the CFFQNN
biased training and evaluation, we eliminated the ex- detailed below.
cess class instances, balancing the dataset. This step In comparison, the data may be encoded into any
enabled our model to learn from both the minority and number of qubits for the CFFQNN, with more qubits
majority classes more effectively, thereby enhancing its being required for subsequent manipulations that cor-
ability to detect fraudulent transactions accurately. By respond to hidden layers of ANNs. Just like in classical
employing these preprocessing techniques on the se- machine learning, there is no a priori method for deter-
lected datasets, we aimed to create a robust and reli- mining how many layers and how many nodes in each
able framework for evaluating the effectiveness of our layer will be required for the success of training the net-
quantum machine learning model. work for a particular dataset. We choose to encode our
The standard QNN is programmed as follows. Ev- datasets’ seven features into three qubits, correspond-
ery qubit
√ is initialized in the superposition state (|0⟩ + ing to the first hidden layer, process them with a second
|1⟩)/ 2 by means of a Hadamard transformation, then hidden layer comprised by two qubits, then funnel the
the data features are encoded using a phase gate quantum information into a final qubit such that the to-
tal number of qubits is only six.
P(X̄i ) = |0⟩⟨0| + eiX̄i |1⟩⟨1| (9)
The three qubits have the same data redundantly up-
acting on the ith qubit; this is the ZFeatureMap with loaded into them using no entangling operations: the
X̄i = 2Xi and is the first stage of the ZZFeatureMap. operator Ry (∑Ni=1 Wi Xi +b) is applied to each of the first
The ZZFeatureMap then continues to sequentially en- three qubits as in the main text. To process the data and
tangle the ithe and jth qubits and again upload the forward it to the second hidden layer, a controlled op-
same data onto the quantum state, using the sequence eration is required between each pair of qubits from
of gates: the first and second layers, such that twelve opera-
tions of the form CRi7y→ j (θi j ) with unique parameter-
ized weights θi j are applied. A single-qubit rotation
Gi j = CNOTi7→ j [Ii ⊗ Pj (Xi j )]CNOTi7→ j (10) corresponding to a biasing term is also applied to each
qubit in the second layer. Finally, three controlled op-
which uses the controlled-not gate CNOTi7→ j = erations CRyj7→N (θ jN ) are performed between the qubits
(|0⟩⟨0| ⊗ I + |1⟩⟨1| ⊗ σx ) and the nonlinear function in the second hidden layer and the final qubit along
of the parameters Xi j = 2(π − Xi )(π − X j ). All of the with a biasing term on the final qubit, for a total of
qubits are pairwise entangled using a sequence of Gi j 16 controlled operations. The final qubit is measured
operators for various i and j. However, the relationship in the computational basis.
between the number of C-NOT gates and the number For both setups, the single output parameter ⟨ZN ⟩
of qubits is not fixed in a strict mathematical sense, is fed into a classical non-linear function and used to
but rather it depends on the specific architecture of the classify the input data. At least 70% of the available
ZZFeatureMAp quantum circuit and the requirements data points are used and the models are scored on how
of the algorithm being implemented. Here, we used well they correctly predict the classification of those
the circuit with full entanglement option, which re- data. The parameterized circuits are then updated with
quires N(N−1)
2 C-NOT gates to fully entangle all pairs new parameters obtained from the COBYLA [36] op-
of qubits for single repetition of the circuit. timizer and this process is repeated iteratively until the
10

TABLE I. Properties of the datasets used to evaluate the CFFQNN and compare it to existing neural networks.
Datasets Features Features used Training size Testing size Labels
Credit card fraud detection (balanced) 30 7 688 296 2
Breast cancer diagnostic (Wisconsin) 30 7 455 114 2

these models are detailed in the GitHub repository .


TABLE II. Metrics used to evaluate and compare the perfor-
mances of different neural networks on the same datasets.
Metrics Equations
Precision TP V. ACKNOWLEDGMENTS
TP+FP
TP
Recall TP+FN
TP+TN
Accuracy TP+FP+FN+TN The authors acknowledge that the NRC headquar-
F1-Score 2×Precision×Recall ters is located on the traditional unceded territory of
Precision+Recall
the Algonquin Anishinaabe and Mohawk people. The
authors would like to acknowledge the use of IBM
parameters converge. Those parameters are then used Quantum services for this work and in particular the
to test the models’ performances on the test data points Qiskit package [35]. AZG acknowledges support from
that they have not seen before. The overall models are NSERC’s postdoctoral fellowship. KH acknowledges
then evaluated using the numbers of true positive (TP), support from NSERC’s Discovery Grant program.
false positive (FP), true negative (TN), and false nega-
tive (FN) results. These can be combined into a num-
ber of metrics as in Table II. All of these metrics range VI. DATA AVAILABILITY
from zero to one, with larger numbers implying supe-
rior models. Data and code related to this research can be found at
All of the source code for creating and comparing this private GitHub repository upon reasonable request.

[1] M. Schuld and F. Petruccione, Machine Learning with [11] F. Tacchino, S. Mangini, P. Kl. Barkoutsos, C. Macchi-
Quantum Computers (Springer International Publish- avello, D. Gerace, I. Tavernelli, and D. Bajoni, IEEE
ing, Cham, Switzerland). Transactions on Quantum Engineering 2, 1 (2021).
[2] M. A. Nielsen and I. L. Chuang, Quantum Computation [12] J. Wang, Y. Chen, R. Chakraborty, and S. X. Yu, arXiv
and Quantum Information: 10th Anniversary Edition, 10.48550/arXiv.1911.12207 (2019), 1911.12207.
10th ed. (Cambridge University Press, USA, 2011). [13] Y. Li, R.-G. Zhou, R. Xu, J. Luo, and W. Hu, Quantum
[3] J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, Sci. Technol. 5, 044003 (2020).
N. Wiebe, and S. Lloyd, Nature 549, 195–202 (2017). [14] S. L. Wu, S. Sun, W. Guan, C. Zhou, J. Chan, C. L.
[4] M. Schuld, I. Sinayskiy, and F. Petruccione, Contempo- Cheng, T. Pham, Y. Qian, A. Z. Wang, R. Zhang,
rary Physics 56, 172 (2014). M. Livny, J. Glick, P. Kl. Barkoutsos, S. Woerner,
[5] C. Zoufal, A. Lucchi, and S. Woerner, Quantum I. Tavernelli, F. Carminati, A. Di Meglio, A. C. Y. Li,
Machine Intelligence 3, 10.1007/s42484-020-00033-7 J. Lykken, P. Spentzouris, S. Y.-C. Chen, S. Yoo, and
(2021). T.-C. Wei, arXiv 10.1103/PhysRevResearch.3.033221
[6] V. Havlı́ček, A. D. Córcoles, K. Temme, A. W. Harrow, (2021), 2104.05059.
A. Kandala, J. M. Chow, and J. M. Gambetta, Nature [15] K. H. Wan, O. Dahlsten, H. Kristjánsson, R. Gardner,
567, 209 (2019). and M. S. Kim, npj Quantum Inf. 3, 1 (2017).
[7] D. P. Garcı́a, J. Cruz-Benito, and F. J. Garcı́a-Peñalvo, [16] K. Beer, D. Bondarenko, T. Farrelly, T. J. Osborne,
arXiv 10.48550/arXiv.2201.04093 (2022), 2201.04093. R. Salzmann, D. Scheiermann, and R. Wolf, Nat. Com-
[8] D. N. Diep, Int. J. Theor. Phys. 59, 1179 (2020). mun. 11, 1 (2020).
[9] A. Chalumuri, R. Kune, and B. S. Manoj, Quantum Inf. [17] D. Bondarenko and P. Feldmann, Phys. Rev. Lett. 124,
Process. 20, 1 (2021). 130502 (2020).
[10] B.-Q. Chen and X.-F. Niu, Int. J. Theor. Phys. 59, 1978 [18] I. Cong, S. Choi, and M. D. Lukin, Nat. Phys. 15, 1273
(2020). (2019).
11

[19] K. Sharma, M. Cerezo, L. Cincio, and P. J. Coles, Phys.


Rev. Lett. 128, 180505 (2022).
[20] M.-G. Zhou, Z.-P. Liu, H.-L. Yin, C.-L. Li, T.-K. Xu,
and Z.-B. Chen, Research 6, 10.34133/research.0134
(2023).
[21] J. Preskill, Quantum 2, 79 (2018), 1801.00862v3.
[22] S. Sim, P. D. Johnson, and A. Aspuru-Guzik, Adv.
Quantum Technol. 2, 1900070 (2019).
[23] S.-X. Zhang, J. Allcock, Z.-Q. Wan, S. Liu, J. Sun,
H. Yu, X.-H. Yang, J. Qiu, Z. Ye, Y.-Q. Chen, C.-K.
Lee, Y.-C. Zheng, S.-K. Jian, H. Yao, C.-Y. Hsieh, and
S. Zhang, Quantum 7, 912 (2023), 2205.10091v2.
[24] W. Jiang, J. Xiong, and Y. Shi, Nat. Commun. 12, 1
(2021).
[25] H. Yamasaki, N. Isogai, and M. Murao, arXiv
10.48550/arXiv.2312.03057 (2023), 2312.03057.
[26] F. Tacchino, P. Barkoutsos, C. Macchiavello, I. Taver-
nelli, D. Gerace, and D. Bajoni, Quantum Sci. Technol.
5, 044010 (2020).
[27] C. Gyurik, R. Molteni, and V. Dunjko, (2023),
arXiv:2311.12618 [quant-ph].
[28] F. Rosenblatt, The Perceptron, a Perceiving and Recog-
nizing Automaton Project Para, Report: Cornell Aero-
nautical Laboratory (Cornell Aeronautical Laboratory,
1957).
[29] G. Cybenko, Math. Control Signals Systems 2, 303
(1989).
[30] K. Hornik, Neural Networks 4, 251 (1991).
[31] A. Sagingalieva, M. Kordzanganeh, N. Kenbayev,
D. Kosichkina, T. Tomashuk, and A. Melnikov, Cancers
15, 10.3390/cancers15102705 (2023).
[32] E. Farhi and H. Neven, arXiv: Quantum Physics
(2018).
[33] A. Asfaw, L. Bello, Y. Ben-Haim, S. Bravyi, L. Capel-
luto, A. C. Vazquez, J. Ceroni, R. Chen, A. Frisch,
J. Gambetta, S. Garion, L. Gil, S. D. L. P. Gonza-
lez, F. Harkins, T. Imamichi, D. McKay, A. Mezza-
capo, Z. Minev, R. Movassagh, G. Nannicini, P. Na-
tion, A. Phan, M. Pistoia, A. Rattew, J. Schaefer, J. Sha-
bani, J. Smolin, K. Temme, M. Tod, and S. Wood, Learn
Quantum Computation Using Qiskit (2020).
[34] M. Cerezo, G. Verdon, H.-Y. Huang, L. Cincio, and P. J.
Coles, Nat. Comput. Sci. 2, 567 (2022).
[35] Q. contributors, Qiskit: An open-source framework for
quantum computing (2023).
[36] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel,
B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer,
R. Weiss, V. Dubourg, J. Vanderplas, A. Passos,
D. Cournapeau, M. Brucher, M. Perrot, and E. Duch-
esnay, Journal of Machine Learning Research 12, 2825
(2011).

You might also like