
over the data in a pre-described way. This returns a single
value representing the similarity between the filter and the
data at that location. These layers are optimised similar to
all other neural network layers, through backpropagation over
some optimization function.
III. RELATED WORK
Adapting classical machine learning techniques to quantum
systems is an active area of research, with architectures such
as Quantum Convolutional Neural Networks, QuantumFlow,
QuGAN and QuClassi.
Quantum Convolutional Neural Networks [6] - QCNN -
adapts the classical notion of spatial data encoding, and adapts
it to quantum machine learning techniques. QCNN makes use
of dual qubit unitaries and mid-circuit measurement to perform
information down pooling, to which decisions can be inferred.
This is compared with an opposite direction traversal of a
MERA network.
QuClassi [23] proposes a state based detection scheme, bor-
rowing from classical machine learning approaches of training
”weights” to represent classifier states. These states each
represent a probability of belonging to the states respective
class, which generates output layers synonymous with classical
classification network outputs.
QuantumFlow [12] attempts to mimic the transformations
undergone in classical neural networks, and attempts to accom-
plish a similar transformation as the classical y=f(xTw+b).
This is accomplished via the usage of phase flips, accumula-
tion via a hadamard gate accompanied with an entanglement
operation. QuantumFlow demonstrates the advantage of batch
normalisation, showing notable performance improvements
when normalising quantum data to reside around the XY
plane, rather than clustering around either the |1ior |0i
point. Furthermore, QuantumFlow demonstrates the reduced
parameter potential of quantum machine learning, illustrating
a quantum advantage.
Chen 2022 [?] makes use of a quantum convolutional
network to perform high energy physics data analysis. In
the paper, they present a framework for encoding localised
classical data, followed by a fully entangled parameterised
layer to perform spatial data analysis. Their numerical analysis
demonstrates the promise of quantum convolutional networks.
Notably, all of these works have taken a classical machine
learning technique, and adapted it in some form to the quan-
tum setting. We aim to accomplish the same with QuCNN,
adapting the convolutional filter operation.
IV. QUCNN
In this section, we walk through the adaption of a classi-
cal convolutional filter operation to QuCNN. We further go
on to demonstrate a quantum-implemented backpropagation
algorithm allowing for an almost entirely quantum routine to
compute the dL
dθigradient, where θiis the layer weight.
A. QuCNN Layer Architecture
Classical convolutional neural network’s learn a set of
feature maps for local pattern recognition over a trained data
set. This operation is characterised by the Convolution (Conv)
operation. One Convolution Operation comprises of a filter F,
and an input X, and performs Conv(X,F). This is described
by the convolution operation outlined in 1
yij =
HH
X
k=1
W W
X
l=1
wklxsi+k−1,sj+l−1(1)
Importantly, wx0is equivalent to the dot product between
two vectors wand x. A comparable computation is realised in
quantum computing through the SWAP test algorithm, which
computes the equation outlined in Equation 2, with error
O(1
2). Given sufficient samples, the SWAP test is an unbiased
estimator of the inner product squared.
SW AP (Q0,|ψi,|φi) = P(M|Q0i= 0) = 1
2+1
2|hψ|φi|2
(2)
Given this operation, we can perform similar convolutional
operations by performing the outlined Formula in 3, with i
filters:
yij =SW AP (|Ψii,|Xisi:si+k,sj:sj+l)(3)
where the statevector describing |Xisi:si+k,sj:sj+lhas the
same dimensionality, and hence number of qubits, of |Ψii.
The forward operation produces a similar output to a classi-
cal convolutional operation, whereby we are computing the
squared real inner product of two state vectors instead of the
inner product of two vectors.
In classical convolutional networks, the convolutional filter
is a tensor of varying activation, all of which are independently
optimised according to some loss function. With a quantum
state prepared via any ansatz, there is no way to control
one state amplitude’s magnitude without changing another
amplitude’s magnitude. This is due to the square norm re-
quirement of quantum states. Therefore, we optimise each
quantum state filter similar to the optimization procedure of a
variational quantum algorithm such as a variational quantum
eigensolver [4], [9], [10], [14]. This is visualised in Figure 1,
where n layers represents the number of parameterised layers
describing the quantum state. Each filter maintains its own
independent set of θ’s, where each filter attempts to learn its
own feature set.
The QuCNN architecture is applicable to purely quantum
data, that might be accessed via QRAM or other sources. How-
ever, QuCNN can operate on classical data, once the classical
data is translated into a quantum state prior to model induction
or training. Although computationally expensive, this is a pre-
processing step. Within this paper, we utilize a classical-to-
quantum encoding technique. Utilizing log2(n)encoding [12],
an input data point is broken up into spatially related data clus-
ters, with a pattern defined by parameters such as stride, filter
size etc., and translated into a group of equivalent amplitude
encoded state vectors [|Xi1,|Xi2,|Xi3, ..., |Xin]. Each filter