Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2104.02975 · IEEE International Conference on Quantum Computing and Engineering (QCE)

A Quantum Binary Classifier based on Cosine Similarity

Davide Pastorello, Enrico Blanzieri

Published Oct 1, 2021• 7 citations
arXivHTMLPDF

Abstract

This proposal introduces the quantum implementation of a binary classifier based on cosine similarity between data vectors. The proposed quantum algorithm presents time complexity that is logarithmic in the product of the training set cardinality and the dimension of the vectors. It is based just on a suitable state preparation like the retrieval from a QRAM, a SWAP test circuit, and a measurement process on a single qubit. An implementation on an IBM quantum processor is presented.

DOI
10.1109/qce52317.2021.00086

Related papers

Quantum Support Vector Machine for Big Data Classification

Patrick Rebentrost, Masoud Mohseni, Seth Lloyd

Supervised machine learning is the classification of new data based on already classified training examples. In this work, we show that the support vector machine, an optimized binary classifier, can be implemented on a quantum computer, with complexity logarithmic in the size of the vectors and the number of training examples. In cases where classical sampling algorithms require polynomial time, an exponential speedup is obtained. At the core of this quantum big data algorithm is a nonsparse matrix exponentiation technique for efficiently performing a matrix inversion of the training data inner-product (kernel) matrix.

arXiv:1307.0471•Physical Review Letters•Sep 25, 2014•1,951 citations

Quantum Ensemble for Classification

Antonio Macaluso, L. Clissa, Stefano Lodi +1 more

A powerful way to improve performance in machine learning is to construct an ensemble that combines the predictions of multiple models. Ensemble methods are often much more accurate and lower variance than the individual classifiers that make them up but have high requirements in terms of memory and computational time. In fact, a large number of alternative algorithms is usually adopted, each requiring to query all available data. We propose a new quantum algorithm that exploits quantum superposition, entanglement and interference to build an ensemble of classification models. Thanks to the generation of the several quantum trajectories in superposition, we obtain $B$ transformations of the quantum state which encodes the training set in only $log\left(B\right)$ operations. This implies exponential growth of the ensemble size while increasing linearly the depth of the correspondent circuit. Furthermore, when considering the overall cost of the algorithm, we show that the training of a single weak classifier impacts additively the overall time complexity rather than multiplicatively, as it usually happens in classical ensemble methods. We also present small-scale experiments on real-world datasets, defining a quantum version of the cosine classifier and using the IBM qiskit environment to show how the algorithms work.

arXiv:2007.01028•Jul 2, 2020•9 citations

Quantum Ensemble for Classification

Antonio Macaluso, L. Clissa, Stefano Lodi +1 more

Abstract A powerful way to improve performance in machine learning is to construct an ensemble that combines the predictions of multiple models. Ensemble methods are often much more accurate and have a lower variance than the individual classifiers that make them up, but have high requirements in terms of memory and computational time. In fact, a large number of alternative algorithms is usually adopted, each requiring to query all available data. We propose a new quantum algorithm that exploits quantum superposition, entanglement and interference to build an ensemble of classification models. Thanks to the generation of the several quantum trajectories in superposition, we obtain B transformations of the quantum state which encodes the training set in only log ( B ) operations. This implies an exponential growth of the ensemble size while increasing linearly the depth of the correspondent circuit. Furthermore, when considering the overall cost of the algorithm, we show that the training of a single weak classifier impacts additively to the overall time complexity rather than multiplicatively, as it usually happens in classical ensemble methods. We also present small-scale experiments on real-world datasets, defining a quantum version of the cosine classifier and using the IBM qiskit environment to show how the algorithms work.

•Aug 1, 2022•2 citations

Empirical Analysis of a Quantum Classifier Implemented on IBM’s 5Q Quantum Computer

Wei Hu

The development of artificial intelligence today is marked with increased computational power, new algorithms, and big data. One such milestone impressive achievement in this area is Google’s AlphaGo. However, this advancement is beginning to face increasing challenges and the major bottleneck of AI today is the lack of adequate computing power in the processing of big data. Quantum computing offers a new and viable solution to deal with these challenges. A recent work designed a quantum classifier that runs on IBM’s five qubit quantum computer and tested its performance on the Iris data set as well as a circles data set. As quantum machine learning is still an emerging discipline, it may be enlightening to conduct an empirical analysis of this quantum classifier on some artificial datasets to help learn its unique features and potentials. Our work on the quantum classifier can be summarized in three parts. The first is to run its original version as a binary classifier on some artificial datasets using visualization to reveal the quantum nature of this algorithm, and the second is to analyze the swap operation utilized in its original circuit due to the hardware constraint and investigate its impact on the performance of the classifier. The last part is to extend the original circuit for binary classification to a circuit for multiclass classification and test its performance. Our findings shed new light on how this quantum classifier works.

Journal of Quantum Information Science•Jan 1, 2018•13 citations

Compact quantum kernel-based binary classifier

Carsten Blank, Adenilton José da Silva, Lucas P. de Albuquerque +2 more

Abstract Quantum computing opens exciting opportunities for kernel-based machine learning methods, which have broad applications in data analysis. Recent works show that quantum computers can efficiently construct a model of a classifier by engineering the quantum interference effect to carry out the kernel evaluation in parallel. For practical applications of these quantum machine learning methods, an important issue is to minimize the size of quantum circuits. We present the simplest quantum circuit for constructing a kernel-based binary classifier. This is achieved by generalizing the interference circuit to encode data labels in the relative phases of the quantum state and by introducing compact amplitude encoding, which encodes two training data vectors into one quantum register. When compared to the simplest known quantum binary classifier, the number of qubits is reduced by two and the number of steps is reduced linearly with respect to the number of training data. The two-qubit measurement with post-selection required in the previous method is simplified to single-qubit measurement. Furthermore, the final quantum state has a smaller amount of entanglement than that of the previous method, which advocates the cost-effectiveness of our method. Our design also provides a straightforward way to handle an imbalanced data set, which is often encountered in many machine learning problems.

arXiv:2202.02151•Quantum Science and Technology•Jun 23, 2022•19 citations

Quantum classifier with tailored quantum kernel

Carsten Blank, Daniel K. Park, June‐Koo Kevin Rhee +1 more

Abstract Kernel methods have a wide spectrum of applications in machine learning. Recently, a link between quantum computing and kernel theory has been formally established, opening up opportunities for quantum techniques to enhance various existing machine-learning methods. We present a distance-based quantum classifier whose kernel is based on the quantum state fidelity between training and test data. The quantum kernel can be tailored systematically with a quantum circuit to raise the kernel to an arbitrary power and to assign arbitrary weights to each training data. Given a specific input state, our protocol calculates the weighted power sum of fidelities of quantum data in quantum parallel via a swap-test circuit followed by two single-qubit measurements, requiring only a constant number of repetitions regardless of the number of data. We also show that our classifier is equivalent to measuring the expectation value of a Helstrom operator, from which the well-known optimal quantum state discrimination can be derived. We demonstrate the performance of our classifier via classical simulations with a realistic noise model and proof-of-principle experiments using the IBM quantum cloud platform.

arXiv:1909.02611•npj Quantum Information•May 15, 2020•191 citations
This proposal introduces the quantum implementation of a binary classifier based on cosine similarity between data vectors. The proposed quantum algorithm presents time complexity that is logarithmic in the product of the training set cardinality and the dimension of the vectors. It is based just on a suitable state preparation like the retrieval from a QRAM, a SWAP test circuit, and a measurement process on a single qubit. An implementation on an IBM quantum processor is presented.
Supervised machine learning is the classification of new data based on already classified training examples. In this work, we show that the support vector machine, an optimized binary classifier, can be implemented on a quantum computer, with complexity logarithmic in the size of the vectors and the number of training examples. In cases where classical sampling algorithms require polynomial time, an exponential speedup is obtained. At the core of this quantum big data algorithm is a nonsparse matrix exponentiation technique for efficiently performing a matrix inversion of the training data inner-product (kernel) matrix.
A powerful way to improve performance in machine learning is to construct an ensemble that combines the predictions of multiple models. Ensemble methods are often much more accurate and lower variance than the individual classifiers that make them up but have high requirements in terms of memory and computational time. In fact, a large number of alternative algorithms is usually adopted, each requiring to query all available data. We propose a new quantum algorithm that exploits quantum superposition, entanglement and interference to build an ensemble of classification models. Thanks to the generation of the several quantum trajectories in superposition, we obtain BBB transformations of the quantum state which encodes the training set in only log(B)log\left(B\right)log(B) operations. This implies exponential growth of the ensemble size while increasing linearly the depth of the correspondent circuit. Furthermore, when considering the overall cost of the algorithm, we show that the training of a single weak classifier impacts additively the overall time complexity rather than multiplicatively, as it usually happens in classical ensemble methods. We also present small-scale experiments on real-world datasets, defining a quantum version of the cosine classifier and using the IBM qiskit environment to show how the algorithms work.
Abstract A powerful way to improve performance in machine learning is to construct an ensemble that combines the predictions of multiple models. Ensemble methods are often much more accurate and have a lower variance than the individual classifiers that make them up, but have high requirements in terms of memory and computational time. In fact, a large number of alternative algorithms is usually adopted, each requiring to query all available data. We propose a new quantum algorithm that exploits quantum superposition, entanglement and interference to build an ensemble of classification models. Thanks to the generation of the several quantum trajectories in superposition, we obtain B transformations of the quantum state which encodes the training set in only log ( B ) operations. This implies an exponential growth of the ensemble size while increasing linearly the depth of the correspondent circuit. Furthermore, when considering the overall cost of the algorithm, we show that the training of a single weak classifier impacts additively to the overall time complexity rather than multiplicatively, as it usually happens in classical ensemble methods. We also present small-scale experiments on real-world datasets, defining a quantum version of the cosine classifier and using the IBM qiskit environment to show how the algorithms work.
The development of artificial intelligence today is marked with increased computational power, new algorithms, and big data. One such milestone impressive achievement in this area is Google’s AlphaGo. However, this advancement is beginning to face increasing challenges and the major bottleneck of AI today is the lack of adequate computing power in the processing of big data. Quantum computing offers a new and viable solution to deal with these challenges. A recent work designed a quantum classifier that runs on IBM’s five qubit quantum computer and tested its performance on the Iris data set as well as a circles data set. As quantum machine learning is still an emerging discipline, it may be enlightening to conduct an empirical analysis of this quantum classifier on some artificial datasets to help learn its unique features and potentials. Our work on the quantum classifier can be summarized in three parts. The first is to run its original version as a binary classifier on some artificial datasets using visualization to reveal the quantum nature of this algorithm, and the second is to analyze the swap operation utilized in its original circuit due to the hardware constraint and investigate its impact on the performance of the classifier. The last part is to extend the original circuit for binary classification to a circuit for multiclass classification and test its performance. Our findings shed new light on how this quantum classifier works.
Abstract Quantum computing opens exciting opportunities for kernel-based machine learning methods, which have broad applications in data analysis. Recent works show that quantum computers can efficiently construct a model of a classifier by engineering the quantum interference effect to carry out the kernel evaluation in parallel. For practical applications of these quantum machine learning methods, an important issue is to minimize the size of quantum circuits. We present the simplest quantum circuit for constructing a kernel-based binary classifier. This is achieved by generalizing the interference circuit to encode data labels in the relative phases of the quantum state and by introducing compact amplitude encoding, which encodes two training data vectors into one quantum register. When compared to the simplest known quantum binary classifier, the number of qubits is reduced by two and the number of steps is reduced linearly with respect to the number of training data. The two-qubit measurement with post-selection required in the previous method is simplified to single-qubit measurement. Furthermore, the final quantum state has a smaller amount of entanglement than that of the previous method, which advocates the cost-effectiveness of our method. Our design also provides a straightforward way to handle an imbalanced data set, which is often encountered in many machine learning problems.
Abstract Kernel methods have a wide spectrum of applications in machine learning. Recently, a link between quantum computing and kernel theory has been formally established, opening up opportunities for quantum techniques to enhance various existing machine-learning methods. We present a distance-based quantum classifier whose kernel is based on the quantum state fidelity between training and test data. The quantum kernel can be tailored systematically with a quantum circuit to raise the kernel to an arbitrary power and to assign arbitrary weights to each training data. Given a specific input state, our protocol calculates the weighted power sum of fidelities of quantum data in quantum parallel via a swap-test circuit followed by two single-qubit measurements, requiring only a constant number of repetitions regardless of the number of data. We also show that our classifier is equivalent to measuring the expectation value of a Helstrom operator, from which the well-known optimal quantum state discrimination can be derived. We demonstrate the performance of our classifier via classical simulations with a realistic noise model and proof-of-principle experiments using the IBM quantum cloud platform.