The article contains a description of two quantum circuits for pattern recognition. The first approach is realized with use of k nearest neighbors algorithm and the second with support vector machine. The task is to distinguish between Hermitian and non-Hermitian matrices. The quantum circuits are constructed to accumulate elements of a learning set. After this process, circuits are able to produce a quantum state which contains the information if a tested element fits to the trained pattern. To improve the efficiency of presented solutions, the matrices were uniquely labeled with feature vectors. The role of the feature vectors is to highlight some features of the objects which are crucial in the process of classification. The circuits were implemented in Python programming language and some numeric experiments were conducted to examine the capacity of presented solutions in pattern recognition.
The article contains a description of two quantum circuits for pattern recognition. The first approach is realized with use of k nearest neighbors algorithm and the second with support vector machine. The task is to distinguish between Hermitian and non-Hermitian matrices. The quantum circuits are constructed to accumulate elements of a learning set. After this process, circuits are able to produce a quantum state which contains the information if a tested element fits to the trained pattern. To improve the efficiency of presented solutions, the matrices were uniquely labeled with feature vectors. The role of the feature vectors is to highlight some features of the objects which are crucial in the process of classification. The circuits were implemented in Python programming language and some numeric experiments were conducted to examine the capacity of presented solutions in pattern recognition.
Text classification is one of key problems in pattern recognition. The KNN algorithm is a widely used text classification algorithm, because it is simple, valid and non-parameters. The main idea of KNN algorithm is to calculate the similarity between the new sample with unknown class label and the training samples, and choosing the class label of the highest k nearest neighbors as the new sample's class label. However, the text contains hundreds and thousands of features. The similarity computing in large numbers of vector will cost many time. In fact that, many machine learning algorithms are unable to manipulate and compute large number of vectors in high-dimensional space. Quantum computing algorithms are good at computing high-dimensional vectors in large tensor product spaces. It can provide exponential speed-up over its classical counterparts. The N-dimensional quantum vectors represent 2N quantum superposition states. The similarity computing on the N-dimensional vectors is also on the 2N quantum superposition states simultaneously. Therefore, this paper introduces a KNN algorithms based on quantum computing, which uses fidelity to compute the similarity between two quantum states. The Control-Swap Test gate is very convenient as a fidelity estimator.
The current development of Support Vector Machines (SVM) has reached a bottleneck, with issues such as long training times and weak interpretability when dealing with large-scale, multi-dimensional data. This paper introduces the concept of Quantum Support Vector Machines (QSVM) and achieves efficient solutions through quantum algorithms such as the HHL algorithm. The research designs a computational architecture that combines classical and quantum computing, utilizing the Pauli decomposition of Hermitian matrices to simulate the quantum simulation of Hamiltonian quantities and implementing the quantum simulation of unitary operators. Based on the conclusions, a complete quantum linear solver circuit is designed, achieving exponential growth in computational complexity. Experiments using the Iris dataset demonstrate the excellent classification performance of QSVM, which outperform classical SVM in classification accuracy, computational time complexity, and memory requirements. More efficient quantum mapping algorithms and quantum circuit optimization methods are implemented, providing new ideas and methods for the application of SVM to large-scale datasets.
The KNN (K-nearest neighbors) algorithm is one of Top-10 data mining algorithms and is widely used in various fields of artificial intelligence. This leads to that quantum KNN algorithms have developed and achieved certain speed improvements, denoted as Q-KNN. However, these Q-KNN methods must face two key problems as follows. The first one is that they are mainly focused on neighbor selection without paying attention to the influence of K value on the algorithm. The second is that only the neighbor selection process is quantized, and the selection of K value is not quantized. To solve these problems, this paper designs a novel quantum circuit for KNN classification, so as to simultaneously quantumize the neighbor selection and K value selection process. Specifically, the least squares loss and sparse regularization term are first used to construct the objective function of the proposed quantum KNN, so that it can simultaneously obtain the optimal K value and K nearest neighbors of the testing data. And then, a new quantum circuit is proposed to quantumize the process through quantum phase estimation, controlled rotation, and inverse phase estimation techniques. Finally, experiments are conducted with qiskit and matlab to output the quantum and classical results of the algorithm, verifying that the proposed algorithm can output the optimal K value and K nearest neighbors for each testing data.
We present and compare two methods of generating quantum feature maps for quantum-enhanced support vector machine, a classifier based on kernel method, by which we can access high dimensional Hilbert space efficiently. The first method is a genetic algorithm with multi-objective fitness function using penalty method, which incorporates maximizing the accuracy of classification and minimizing the gate cost of quantum feature map circuit. The second method uses variational quantum circuit, focusing on how to contruct the ansatz based on unitary matrix decomposition. Numerical results and comparisons are presented to demonstrate how the fitness fuction reduces gate cost while remaining high accuracy and conducting circuit through unitary matrix obtains even better performance. In particular, we propose some thoughts on reducing and optimizing the gate cost of a circuit while remaining perfect accuracy.
In order to improve the training efficiency of the support vector machine, a quantum circuit training scheme based on the inner product of the quantum state for the support vector machine is proposed in this work. Firstly, on the basis of the full analysis of the computational complexity of the classical support vector machine, the kernel function which is the main factor affecting the computational complexity of the algorithm is primarily analyzed. Based on quantum mechanics and quantum computing theory, the training sample elements in the kernel function are quantized to generate the corresponding quantum states. Secondly, according to the quantum states of the training sample elements, the types and quantities of the required quantum logic gates are derived and calculated, and the quantum circuit that can generate the corresponding quantum states of the training sample elements through the evolution of the quantum initial ground states and the quantum logic gates is designed. Then, in the light of the relationship between the inner product of the quantum state and the quantum logic gate SWAP, the quantum circuit is designed to complete the exchange operation of the corresponding quantum state amplitude. The inner product of the quantum state is realized by exchanging and evolving the amplitude of the quantum state in the quantum circuit. Finally, by measuring the quantum state of the controlling qubit, the inner product solution of the kernel function is obtained, and the acceleration effect of training support vector machine is realized. The verification results show that the scheme enables the support vector machine not only to complete the correct classification, but also to operate the quantum part of the scheme on the real quantum computer . Compared with the classical algorithm, the scheme reduces the time complexity of the algorithm for the polynomial degree, greatly shortens the training time of the model, and improves the efficiency of the algorithm. The scheme has certain feasibility, effectiveness and innovation, and expands the training idea of the support vector machine.
Quantum machine learning has emerged as a promising frontier, leveraging the principles of quantum computing to enhance classical algorithms. This paper proposes an optimized Quantum Support Vector Classifier (QSVC) for the classification of the MNIST dataset (a benchmark in handwritten digit recognition). We employ a Chebyshev Parameterized Quantum Circuit (PQC) with an increased number of qubits and layers, and utilize an existing projected quantum kernel method to effectively capture the complex patterns in the data. To enhance model robustness, data augmentation techniques are applied, and dimensionality reduction is performed using Principal Component Analysis (PCA). The proposed QSVC demonstrates competitive accuracy on both the training and testing datasets, highlighting the potential of quantum kernel methods in practical machine learning applications. A comparative analysis with classical Support Vector Machines (SVM) demonstrates the feasibility of quantum methods for high-dimensional classification tasks. Additionally, we investigate the impact of varying the number of qubits in the quantum circuit, providing in-depth insights into the scalability and performance trade-offs of quantum kernel methods.