The data encoding circuits used in quantum support vector machine (QSVM) kernels play a crucial role in their classification accuracy. However, manually designing these circuits poses significant challenges in terms of time and performance. To address this, we leverage the GASP (Genetic Algorithm for State Preparation) framework for gate sequence selection in QSVM kernel circuits. We explore supervised and unsupervised kernel loss functions' impact on encoding circuit optimisation and evaluate them on diverse datasets for binary and multiple-class scenarios. Benchmarking against classical and quantum kernels reveals GA-generated circuits matching or surpassing standard techniques. We analyse the relationship between test accuracy and quantum kernel entropy, with results indicating a positive correlation. Our automated framework reduces trial and error, and enables improved QSVM based machine learning performance for finance, healthcare, and materials science applications.
The data encoding circuits used in quantum support vector machine (QSVM) kernels play a crucial role in their classification accuracy. However, manually designing these circuits poses significant challenges in terms of time and performance. To address this, we leverage the GASP (Genetic Algorithm for State Preparation) framework for gate sequence selection in QSVM kernel circuits. We explore supervised and unsupervised kernel loss functions' impact on encoding circuit optimisation and evaluate them on diverse datasets for binary and multiple-class scenarios. Benchmarking against classical and quantum kernels reveals GA-generated circuits matching or surpassing standard techniques. We analyse the relationship between test accuracy and quantum kernel entropy, with results indicating a positive correlation. Our automated framework reduces trial and error, and enables improved QSVM based machine learning performance for finance, healthcare, and materials science applications.
Quantum Support Vector Machines (QSVM) is one of the most promising frameworks in quantum machine learning, yet their performance depends on the design of the feature map. Conventional approaches rely on fixed quantum circuits, which often fail to generalize across datasets. To address this limitation, we propose GA-QSVM, a hybrid framework that employs Genetic Algorithms (GA) to automatically optimize feature maps. The proposed method introduces a configurable framework that flexibly defines the evolutionary parameters, enabling the construction of adaptive circuits. Experimental evaluation of datasets, including Digits, Fashion, Wine, and Breast Cancer, demonstrates that GA-QSVMs achieve a comparable accuracy compared to classical SVMs and standard QSVMs. Furthermore, transfer learning results indicate that GA-QSVM's circuits generalize effectively across datasets. These findings highlight the potential of evolutionary strategies to automate and enhance kernel design for future quantum machine learning applications.
The support vector machine algorithm with a quantum kernel estimator (QSVM-Kernel), as a leading example of a quantum machine learning technique, has undergone significant advancements. Nevertheless, its integration with classical data presents unique challenges. While quantum computers primarily interact with data in quantum states, embedding classical data into quantum states using feature mapping techniques is essential for leveraging quantum algorithms Despite the recognized importance of feature mapping, its specific impact on data classification outcomes remains largely unexplored. This study addresses this gap by comprehensively assessing the effects of various feature mapping methods on classification results, taking medical data analysis as a case study. In this study, the QSVM-Kernel method was applied to classification problems in two different and publicly available medical datasets, namely, the Wisconsin Breast Cancer (original) and The Cancer Genome Atlas (TCGA) Glioma datasets. In the QSVM-Kernel algorithm, quantum kernel matrices obtained from 9 different quantum feature maps were used. Thus, the effects of these quantum feature maps on the classification results of the QSVM-Kernel algorithm were examined in terms of both classifier performance and total execution time. As a result, in the Wisconsin Breast Cancer (original) and TCGA Glioma datasets, when Rx and Ry rotational gates were used, respectively, as feature maps in the QSVM-Kernel algorithm, the best classification performances were achieved both in terms of classification performance and total execution time. The contributions of this study are that (1) it highlights the significant impact of feature mapping techniques on medical data classification outcomes using the QSVM-Kernel algorithm, and (2) it also guides undertaking research for improved QSVM classification performance.
Abstract Kernel methods are an import class of techniques in machine learning. To be effective, good feature maps are crucial for mapping non-linearly separable input data into a higher dimensional (feature) space, thus allowing the data to be linearly separable in feature space. Previous work has shown that quantum feature map design can be automated for a given dataset using NSGA-II, a genetic algorithm, while both minimizing circuit size and maximizing classification accuracy. However, the evaluation of the accuracy achieved by a candidate feature map is costly. In this work, we demonstrate the suitability of kernel-target alignment as a substitute for accuracy in genetic algorithm-based quantum feature map design. Kernel-target alignment is faster to evaluate than accuracy and does not require some data points to be reserved for its evaluation. To further accelerate the evaluation of genetic fitness, we provide a method to approximate kernel-target alignment. To improve kernel-target alignment and root mean squared error, the final trainable parameters of the generated circuits are further trained using COBYLA to determine whether a hybrid approach applying conventional circuit parameter training can easily complement the genetic structure optimization approach. A total of eight new approaches are compared to the original across nine varied binary classification problems from the UCI machine learning repository, showing that kernel-target alignment and its approximation produce feature map circuits enabling comparable accuracy to the previous work but with larger margins on training data (in excess of 20% larger) that improve further with circuit parameter training.
The way in which classical data are encoded into quantum states plays a significant role in both classification performance and quantum circuit complexity in Quantum Machine Learning. In this study, the effects of different quantum feature encoding strategies on Quantum Support Vector Machine performance were investigated using five binary classification datasets. In particular, the statistical relationships between features were incorporated into quantum circuits through RY(θ) and controlled-RY(θ) gates, and this approach was compared with conventional quantum feature maps. The results demonstrate that incorporating statistical relationships into the encoding process can influence classification performance. However, more complex and densely entangled circuits do not necessarily yield higher performance. In addition, a composite evaluation metric was employed to jointly assess predictive performance, generalization, and circuit cost. The findings across the five datasets indicate that the choice of quantum feature encoding strategy should account for the underlying structure of the data and that predictive performance should be evaluated together with quantum circuit complexity.
Good feature maps are crucial for machine learning kernel methods for effective mapping of non-linearly separable input data into a higher dimension feature space, thus allowing the data to be linearly separable in feature space. Recent works have proposed automating the task of quantum feature map circuit design with methods such as variational ansatz parameter optimization and genetic algorithms. A problem commonly faced by genetic algorithm methods is the high cost of computing the genetic cost function. To mitigate this, this work investigates the suitability of two metrics as alternatives to test set classification accuracy. Accuracy has been applied successfully as a genetic algorithm cost function for quantum feature map design in previous work. The first metric is kernel-target alignment, which has previously been used as a training metric in quantum feature map design by variational ansatz training. Kernel-target alignment is a faster metric to evaluate than test set accuracy and does not require any data points to be reserved from the training set for its evaluation. The second metric is an estimation of kernel-target alignment which further accelerates the genetic fitness evaluation by an adjustable constant factor. The second aim of this work is to address the issue of the limited gate parameter choice available to the genetic algorithm. This is done by training the parameters of the quantum feature map circuits output in the final generation of the genetic algorithm using COBYLA to improve either kernel-target alignment or root mean squared error. This hybrid approach is intended to complement the genetic algorithm structure optimization approach by improving the feature maps without increasing their size. Eight new approaches are compared to the accuracy optimization approach across nine varied binary classification problems from the UCI machine learning repository, demonstrating that kernel-target alignment and its approximation produce feature map circuits enabling comparable accuracy to the original approach, with larger margins on training data that improve further with variational training.
With the increasing complexity of projects and the volume of data in Software Engineering (SE), the need for efficient and accurate data analysis techniques has become crucial. Classification algorithms play a vital role in various SE tasks, such as bug detection, software quality prediction, and requirements classification. Quantum computing offers a new paradigm with the potential to overcome classical computational limitations for certain types of problems. This research proposes the design and implementation of a kernel-based quantum classification algorithm (also known as Quantum Support Vector Machine - QSVM) tailored for data analysis in the SE domain. We will discuss the fundamental principles behind quantum feature mapping and quantum kernel matrices, and demonstrate its implementation using quantum computing libraries. As a case study, the designed algorithm will be tested on a software bug detection dataset, comparing its performance with classical kernel-based classification algorithms like Support Vector Machine (SVM). The result of the comparison show that QSVM is superior in terms of accuracy, precision, recall, and F1-score compared to SVM.