0% found this document useful (0 votes)
21 views4 pages

oh2020

This document presents a tutorial on Quantum Convolutional Neural Networks (QCNN), which integrates the structure of Convolutional Neural Networks (CNN) with quantum computing to enhance performance in classification tasks. The QCNN model utilizes quantum features like superposition and entanglement to efficiently process data, particularly in complex problems in quantum physics and chemistry. The paper also discusses the implementation of QCNN using the MNIST dataset, demonstrating its effectiveness compared to traditional CNN models.

Uploaded by

Nguyễn Minh
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)
21 views4 pages

oh2020

This document presents a tutorial on Quantum Convolutional Neural Networks (QCNN), which integrates the structure of Convolutional Neural Networks (CNN) with quantum computing to enhance performance in classification tasks. The QCNN model utilizes quantum features like superposition and entanglement to efficiently process data, particularly in complex problems in quantum physics and chemistry. The paper also discusses the implementation of QCNN using the MNIST dataset, demonstrating its effectiveness compared to traditional CNN models.

Uploaded by

Nguyễn Minh
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/ 4

A Tutorial on Quantum Convolutional Neural

Networks (QCNN)
◦ Seunghyeok Oh, † Jaeho Choi, and ◦ Joongheon Kim
School of Electrical Engineering, Korea University, Seoul, Republic of Korea

School of Computer Science and Engineering, Chung-Ang University, Seoul, Republic of Korea

E-mails: [email protected], [email protected], [email protected]

Abstract—Convolutional Neural Network (CNN) is a popular pixels. The fully-connected layer, basic model in deep learn-
model in computer vision and has the advantage of making good ing, showed strong performance in machine learning, but there
use of the correlation information of data. However, CNN is is no way to keep the correlation. On the other hand, CNN can
challenging to learn efficiently if the given dimension of data
or model becomes too large. Quantum Convolutional Neural maintain correlation information directly, resulting in better
Network (QCNN) provides a new solution to a problem to performance evaluation.
solve with CNN using a quantum computing environment, or CNN mainly proceeds by stacking the convolution layer
a direction to improve the performance of an existing learning and the pooling layer. The convolution layer finds new hidden
model. The first study to be introduced proposes a model to
data by linear combinations between surrounding pixels. The
effectively solve the classification problem in quantum physics
and chemistry by applying the structure of CNN to the quantum pooling layer reduces the size of the feature map, reducing the
computing environment. The research also proposes the model resources required for learning and avoiding overfitting. When
that can be calculated with O(log(n)) depth using Multi-scale the data size is sufficiently reduced by repeatedly applying
Entanglement Renormalization Ansatz (MERA). The second these layers, the classification result is obtained using the
study introduces a method to improve the model’s performance
fully connected layer. The loss between the acquired label and
by adding a layer using quantum computing to the CNN learning
model used in the existing computer vision. This model can also the actual label can train the model using a gradient descent
be used in small quantum computers, and a hybrid learning method or other optimizers for better results.
model can be designed by adding a quantum convolution layer However, many problems that exist in the real world are
to the CNN model or replacing it with a convolution layer. still hard to solve with classic machine learning methods.
This paper also verifies whether the QCNN model is capable
of efficient learning compared to CNN through training using The quantum physics problem defined in the many-body
the MNIST dataset through the TensorFlow Quantum platform. Hilbert space requires converting these data into classical
computer data to apply machine learning techniques. As the
size of the system increases, the size of the data increases
I. I NTRODUCTION exponentially, making it difficult to solve effectively even with
Quantum computers are emerging as a new solution to a machine learning method. In addition to the above case, other
problems not solved by classical computers. Quantum com- alternatives when data and models are no longer efficiently
puters provide a computing environment that is different from processed in existing computing environments.
classical computers. In particular, quantum computers can use Many studies have appeared to solve these problems with
superposition and entanglement, not seen in classical com- the Quantum Convolutional Neural Network (QCNN) using
puting environments, and obtain powerful performance using the quantum computing system and the CNN model together.
parallelism between qubits [1]. Through these advantages, the There is an approach to apply the CNN structure itself to a
quantum computer is considered new solutions to algorithmic quantum system to efficiently solve quantum physics problems
problems that cannot be easily solved. Also, in the field of ma- and an approach to improve performance by adding a quantum
chine learning, various studies applying quantum computing system to problems previously solved by CNN. This paper
models are in progress. There are Variational Quantum Eigen- introduces these studies.
solver (VQE) [2], [3] and Quantum Approximate Optimization
Algorithm (QAOA) [4], [5], which provide new ways to solve II. QCNN U SING T HE S TRUCTURE OF CNN
the problems of physics and chemistry in complex structures
or NP-hard algorithm problems. Besides, as optimization using QCNN proposed by Cong extends the main features and
gradient descent method in quantum devices has been studied, structures of the existing CNN to quantum systems [9]. In
learning quantum machine learning using hyperparameters can moving the quantum physics problem defined in the many-
be performed efficiently [6], [7]. body Hilbert space to the classical computing environment,
Convolutional Neural Network (CNN), among many classi- the data size exponentially increases according to the system
fication models, has shown very high performance in computer size, so it is not suitable to solve efficiently. In a quantum
vision [8]. Images that reflect the real world, such as pho- environment, the data can express using qubits, so the problem
tographs, have a very high correlation between surrounding can be avoided by applying a CNN structure to a quantum

978-1-7281-6758-9/20/$31.00 ©2020 IEEE 236 ICTC 2020

Authorized licensed use limited to: University of Liverpool. Downloaded on June 15,2021 at 08:01:35 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. Example of quantum convolution layer for image classification. The
learnable quantum circuit can choose in various methods that can enhance
performance.

Fig. 1. Simple example of CNN and QCNN. QCNN, like CNN, consists of
a convolution layer that finds a new state and a pooling layer that reduces the When the data given to QCNN is |ψ, the result measured
size of the system. QEC can be additionally applied by using measurement in the pooling layer should be |0 the same as the newly
instead of controlled-gate in the pooling layer [9].
given state in MERA. On the other hand, if |ψ   which MERA
cannot generate is given as input data, there is a possibility that
computer. This section briefly introduces the structural design it will be |1 in the measured result. Using them, if |1 is mea-
of this QCNN. sured, an additional gate is applied to the surrounding qubits
The model of QCNN applies the convolution layer and the to correct the result. The method can give better performance
pooling layer, which are the main features of CNN, to quantum through additional deterministic measurement outcomes.
systems, as shown in Fig. 1. The concept proceeds as follows:
III. QCNN FOR I MAGE C LASSIFICATION
1) The convolution circuit finds the hidden state by apply-
ing multiple qubit gates between adjacent qubits. Image classification is one of the most applied fields in
2) The pooling circuit reduces the size of the quantum neural networks, such as CNN. Quantum computers have
system by observing the fraction of qubits or applying potent advantages in terms of superposition and parallel com-
2-qubit gates such as CNOT gates. putation. Quantum Convolutional Neural Network proposed by
3) Repeat the convolution circuit and pooling circuit de- Henderson applies quantum environments in CNN to improve
fined in 1)-2). the performance of CNN [12]. This section briefly introduces
4) When the size of the system is sufficiently small, the the research that suggested how to apply a quantum computing
fully connected circuit predicts the classification result. system to CNN.
The model used to satisfy this structure is typically Multi- The quantum convolution layer defines a layer that behaves
scale Entanglement Renormalization Ansatz (MERA) [10]. like a convolution layer in a quantum system. The quantum
MERA is a model designed to simulate many-body state quan- convolution layer applies a filter to the input feature map
tum systems efficiently. At this time, MERA exponentially to obtain feature maps composed of new data. However,
increases the size of the quantum system for each depth by the quantum convolution layer uses a quantum computing
adding qubits of |0. QCNN uses this MERA in the reverse environment for filter operation, unlike the convolution layer.
direction. The reversed MERA reduces the size of the quantum Quantum computers have the advantages of superposition
system exponentially from the given data, which is suitable as and parallel computation that do not exist in classical com-
a model of QCNN. puting, which can reduce the learning time and evaluation
The QCNN model proposed by Cong suggests an additional time. However, existing quantum computers are still limited to
performance improvement through the Quantum Error Correc- small quantum systems. The quantum convolution layer does
tion (QEC) to this MERA model [11]. There is a representative not apply the entire image map to a quantum system at once,
state |ψ for each label in MERA. Since QCNN uses the but processes it as much as the filter size at a time, so small
reverse direction of MERA, if its |ψ is given as input data, the quantum computers can construct the quantum convolution
corresponding label can be obtained as a definitive solution. layer.
On the other hand, if |ψ   that cannot be generated in MERA is The quantum convolution layer can construct, as shown in
given as input data, QCNN cannot obtain a definitive solution. Fig. 2. The concept proceeds as follows:
This problem can be corrected and solved by applying QEC 1) The encoding process stores the pixel data corresponding
to give additional degrees of freedom. to the filter size in qubits.

237

Authorized licensed use limited to: University of Liverpool. Downloaded on June 15,2021 at 08:01:35 UTC from IEEE Xplore. Restrictions apply.
(0, 0) RX(a00 ) RZ RX RZ RX

(0, 1) RX(a01 ) • •

(1, 0) RX(a10 ) RZ RX • •

(1, 1) RX(a11 ) • •
Fig. 3. Circuit example of a simple quantum convolution layer used for
learning of the MNIST dataset. The learnable hyperparameters in variable
gates optimize the model.

2) The learnable quantum circuits apply the filters that can


find the hidden state from the input state.
3) The decoding process gets new classical data by mea-
surement.
4) Repeat steps 1) to 3) to complete the new feature map.
The encoding process of 1) is a process necessary to convert
classical information into quantum information. The simplest
method is to apply a rotation gate corresponding to a pixel data
to qubits. Of course, various encoding methods are possible,
and the selected encoding method can change the number
of qubits required and the learning efficiency. The decoding
process of 3) is determined according to measuring one or
more quantum states. By measuring quantum states, classical
data are determined.
The random quantum circuit in 2) can be made from a
combination of multiple gates. Also, the circuit can perform
optimization using the gradient descent method by adding
variable gates. This circuit can be designed in various ways
Fig. 4. The performance of the QCNN model compared to fully-connected
that can affect learning performance depending on the design layers only model, and CNN model.
method. When using MERA, the classical environment gen-
erally requires O(n2 ) operations in an n2 -sized filter, but in
a quantum system, the parallelism of qubits can design the connecting the feature map with a fully-connected layer
filters with O(log(n)) depths. comprising 64 and 10 hidden units.
• fully-connected model: Construct the model using only
IV. L EARNING MNIST U SING QCNN S IMULATION the fully-connected layer to check whether the quantum
In this section, simulations are performed to verify that the convolution layer affects learning.
actual quantum convolutional neural network works properly • CNN model: The convolution layer that returns the fea-

in image classification using the MNIST dataset [13]. QCNN’s ture map of the same channel length replaces the quantum
quantum computing simulation used the TensorFlow Quantum convolution layer to compare the performance difference.
platform [14]. However, because the quantum computing sim- Fig.4 shows the results of this simulation. First, the QCNN
ulation environment uses many resources, it has the following model always shows good learning results compared to the
limitations. fully-connected layer. It confirmed that the quantum convolu-
• The 28×28 size MNIST dataset was downscaled to 10×
tion layer could improve learning performance. Second, in the
10 size. comparison between the QCNN model and the CNN model, it
• The filter size of the quantum convolution layer was
can be seen that similar learning results appear. In other words,
limited to 2 × 2. the QCNN model can have the same learning performance as
• In each epoch, 2500 random images out of 60,000 are
the CNN model.
selected for learning. V. C ONCLUDING R EMARKS AND F UTURE W ORK
To evaluate the performance of QCNN, fully-connected, CNN, QCNN uses a CNN model and a quantum computing envi-
and QCNN models are defined as follows: ronment to enable various approaches. The QCNN model can
• QCNN model: The quantum convolution layer consists be a solution in the field of physical and chemical classification
of a quantum circuit defined by Fig.3. The quantum not solved simply, and in addition to the existing CNN model,
convolution layer returns a feature map with 8 channels. it can be a more effective and efficient learning model method.
The returned feature map predicts classification results by Furthermore, in the quantum computer of the NISQ era,

238

Authorized licensed use limited to: University of Liverpool. Downloaded on June 15,2021 at 08:01:35 UTC from IEEE Xplore. Restrictions apply.
the QCNN model can expect more efficient and high-level
results in more complex and large-scale learning [15]. In this
experiment’s results, the simulations were performed at the
microscopic scale, but we plan to apply the QCNN model to
more complex data.
QCNN is available in more detailed implementation and
approaches. Depending on how the internal quantum circuit
is designed, the performance evaluation of the learning model
can be improved. Besides, when applying the QCNN model to
the field of imaging processing, by including more information
in one qubit according to an encoding method, much more
efficient learning may be possible. In the future, we will study
the QCNN model that is more efficient and has better learning
performance through simulation using various approaches.
ACKNOWLEDGMENT
This research was supported by National Research Founda-
tion of Korea (2019M3E4A1080391). J. Kim is a correspond-
ing author (e-mail: [email protected]).
R EFERENCES
[1] S. Bravyi, D. Gosset, and R. König, “Quantum advantage with shallow
circuits,” Science, vol. 362, no. 6412, pp. 308–311, 2018.
[2] A. Peruzzo, J. McClean, P. Shadbolt, M.-H. Yung, X.-Q. Zhou, P. J.
Love, A. Aspuru-Guzik, and J. L. O’brien, “A variational eigenvalue
solver on a photonic quantum processor,” Nature communications, vol. 5,
p. 4213, 2014.
[3] J. R. McClean, J. Romero, R. Babbush, and A. Aspuru-Guzik, “The
theory of variational hybrid quantum-classical algorithms,” New Journal
of Physics, vol. 18, no. 2, p. 023023, Feb 2016. [Online]. Available:
http://dx.doi.org/10.1088/1367-2630/18/2/023023
[4] E. Farhi, J. Goldstone, and S. Gutmann, “A quantum approximate
optimization algorithm,” arXiv preprint arXiv:1411.4028, 2014.
[5] S. Hadfield, Z. Wang, B. O’Gorman, E. G. Rieffel, D. Venturelli, and
R. Biswas, “From the quantum approximate optimization algorithm to a
quantum alternating operator ansatz,” Algorithms, vol. 12, no. 2, p. 34,
2019.
[6] M. Schuld, V. Bergholm, C. Gogolin, J. Izaac, and N. Killoran, “Eval-
uating analytic gradients on quantum hardware,” Physical Review A,
vol. 99, no. 3, p. 032331, 2019.
[7] J. Stokes, J. Izaac, N. Killoran, and G. Carleo, “Quantum natural
gradient,” Quantum, vol. 4, p. 269, 2020.
[8] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification
with deep convolutional neural networks,” in Advances in neural infor-
mation processing systems, 2012, pp. 1097–1105.
[9] I. Cong, S. Choi, and M. D. Lukin, “Quantum convolutional neural
networks,” Nature Physics, vol. 15, no. 12, pp. 1273–1278, 2019.
[10] G. Vidal, “Class of quantum many-body states that can be efficiently
simulated,” Physical review letters, vol. 101, no. 11, p. 110501, 2008.
[11] J. Preskill, “Lecture notes for physics 229: Quantum information and
computation,” California Institute of Technology, vol. 16, 1998.
[12] M. Henderson, S. Shakya, S. Pradhan, and T. Cook, “Quanvolutional
neural networks: powering image recognition with quantum circuits,”
Quantum Machine Intelligence, vol. 2, no. 1, pp. 1–9, 2020.
[13] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning
applied to document recognition,” Proceedings of the IEEE, vol. 86,
no. 11, pp. 2278–2324, 1998.
[14] M. Broughton, G. Verdon, T. McCourt, A. J. Martinez, J. H. Yoo, S. V.
Isakov, P. Massey, M. Y. Niu, R. Halavati, E. Peters et al., “Tensorflow
quantum: A software framework for quantum machine learning,” arXiv
preprint arXiv:2003.02989, 2020.
[15] J. Preskill, “Quantum computing in the nisq era and beyond,” Quantum,
vol. 2, p. 79, 2018.

239

Authorized licensed use limited to: University of Liverpool. Downloaded on June 15,2021 at 08:01:35 UTC from IEEE Xplore. Restrictions apply.

You might also like