Design and Implementation of Efficient Quantum Support Vector Machine
Design and Implementation of Efficient Quantum Support Vector Machine
Abstract—Machine Learning (ML) is arguably the most ad- the performances and functionalities of entire sectors. There
vanced sub-field of Artificial Intelligence (AI). It concerns the are broadly three categories of Machine Learning. These
study of computer algorithms that can improve automatically categories include [4, 5]:
by learning from data (experience) without being explicitly
pre-programmed. On the other hand, the quantum version • Supervised machine learning-deals with a labeled dataset
of ML, Quantum Machine Learning (QML), forms one of {(xi , yi )}N
the most crucial and recent quantum computing applications. i=1 , where xi is the input or feature vector
It uses quantum mechanical principles such as superposition, and the label yi stands for the ground truth where one
interference, and tunneling to enable quantum computers to learn builds the knowledge of the learning algorithm. Among
from data. Some examples of QML algorithms include Quantum others, a supervised learning algorithm’s primary goal is
Principal Component Analysis (QPCA) and Quantum Support to analyze the dataset to produce a model that, when given
Vector Machine (QSVM). The QSVM is a robust supervised an input or feature vector x, one can predict the value
machine learning algorithm used for classification and regression.
Therefore, this paper discusses the design and implementation of of y. Essentially, all data is labeled, and the algorithm
an efficient QSVM model. The model’s efficiency is achieved using predicts the output from the input data. The examples
Principal Component Analysis (PCA) on the classical data, then include linear regression, random forest, and support
loading the classical data into a quantum computer. Experimental vector machines.
results demonstrate the significance and application of the QSVM • Unsupervised machine learning-is a type where the
model reported in this paper.
Index Terms—Artificial Intelligence, Machine Learning, Quan- dataset is a collection of vectors that are not labeled
tum Support Vector Machine, quantum computing {xi }N
i . Unsupervised machine learning takes this input
vector and extracts valuable properties from the dataset’s
I. I NTRODUCTION single or overall data distribution. In other words, all
Machine Learning allows computing machines to learn from data is unlabeled, and the algorithms learn to inherent
data through experience [1, 2, 3]. Machine Learning is con- structure from the data. The examples include clustering
cerned with designing computational agents (software tools) and principal component analysis.
that can make accurate decisions on their own without being • Reinforcement machine learning-it assumes the machine
explicitly pre-programmed. It is an area of research at the ”lives” in a domain and can probe the state of the
intersection of statistics, artificial intelligence and computer domain as a feature vector. Consequently, the machine
science, and recently engineering as researchers translate the can perform various actions at different states resulting
theoretical models to build products for use and commer- in different rewards and punishments. The goal of re-
cialization. Notably, it has become one of the key drivers in inforcement machine learning algorithm is to learning a
digital transformation. Its applications have become seamless strategy through trial and error using feedback from its
in the commercial sector and everyday life. For instance, actions and experiences. Notably, this category finds use
it has found applications in business, finance, advertising, where critical decision-making and long-term objectives
sports, transportation, manufacturing and the environment. In are critical.
scientific research, machine learning has found applications As already mentioned, the quantum counterpart of conven-
in understanding stars, DNA sequence analysis and cancer tional ML is an emerging field called QML [6, 7, 8]. Like
treatment. The main goal of machine learning is to optimize conventional ML, its goal is developing quantum algorithms
and optimizing performance to achieve the required results in
This work is supported by the Institute for Intelligent Systems; University
of Johannesburg, The National Institute for Theoretical and Computational today’s industries and applications. Notably, QML is based
Sciences, and the National University of Lesotho. on the theory of quantum physics and combines conventional
Authorized licensed use limited to: National Institute of Technology Karnataka Surathkal. Downloaded on May 08,2024 at 18:09:55 UTC from IEEE Xplore. Restrictions apply.
TABLE I
P REDICTION ACCURACY OF THE SVM FOR VARIOUS TRAINING AND TEST
SIZES .
Authorized licensed use limited to: National Institute of Technology Karnataka Surathkal. Downloaded on May 08,2024 at 18:09:55 UTC from IEEE Xplore. Restrictions apply.
[10] A. Asfaw, A. Corcoles, L. Bello, Y. Ben-Haim,
M. Bozzo-Rey, S. Bravyi, N. Bronn, L. Capelluto, A. C.
Vazquez, J. Ceroni, R. Chen, A. Frisch, J. Gambetta,
S. Garion, L. Gil, S. D. L. P. Gonzalez, F. Harkins,
T. Imamichi, H. Kang, A. h. Karamlou, R. Loredo,
D. McKay, A. Mezzacapo, Z. Minev, R. Movassagh,
G. Nannicini, P. Nation, A. Phan, M. Pistoia, A. Rattew,
J. Schaefer, J. Shabani, J. Smolin, J. Stenger, K. Temme,
M. Tod, S. Wood, and J. Wootton. (2020) Learn
quantum computation using qiskit. [Online]. Available:
http://community.qiskit.org/textbook
[11] P. Rebentrost, M. Mohseni, and S. Lloyd, “Quantum sup-
port vector machine for big data classification,” Physical
review letters, vol. 113, no. 13, p. 130503, 2014.
[12] 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, 2016.
[13] 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, no. 1, pp. 1–
7, 2014.
[14] Y. Cao, J. Romero, J. P. Olson, M. Degroote, P. D.
Johnson, M. Kieferová, I. D. Kivlichan, T. Menke,
B. Peropadre, N. P. Sawaya et al., “Quantum chemistry
in the age of quantum computing,” Chemical reviews,
vol. 119, no. 19, pp. 10 856–10 915, 2019.
[15] V. Havlı́ček, A. D. Córcoles, K. Temme, A. W. Harrow,
A. Kandala, J. M. Chow, and J. M. Gambetta, “Super-
vised learning with quantum-enhanced feature spaces,”
Nature, vol. 567, no. 7747, pp. 209–212, 2019.
[16] M. H. Amin, E. Andriyash, J. Rolfe, B. Kulchytskyy,
and R. Melko, “Quantum boltzmann machine,” Physical
Review X, vol. 8, no. 2, p. 021050, 2018.
[17] M. Y. Niu, A. Zlokapa, M. Broughton, S. Boixo,
M. Mohseni, V. Smelyanskyi, and H. Neven, “Entangling
quantum generative adversarial networks,” arXiv preprint
arXiv:2105.00080, 2021.
[18] I. F. Araujo, D. K. Park, F. Petruccione, and A. J.
da Silva, “A divide-and-conquer algorithm for quantum
state preparation,” Scientific Reports, vol. 11, no. 1, pp.
1–12, 2021.
[19] M. A. Nielsen and I. Chuang, Quantum computation and
quantum information, 10th ed. Cambridge University
Press, 2010.
[20] M. M. Wilde, Quantum information theory, 2nd ed.
Cambridge University Press, 2017.
[21] M. Mafu, “Security in quantum key distribution proto-
cols.” Ph.D. dissertation, 2013.
Authorized licensed use limited to: National Institute of Technology Karnataka Surathkal. Downloaded on May 08,2024 at 18:09:55 UTC from IEEE Xplore. Restrictions apply.