Table of Contents
Fetching ...

Flexible Genetic Algorithm for Quantum Support Vector Machines

Nguyen Minh Duc, Vu Tuan Hai, Le Bin Ho, Tran Nguyen Lan

TL;DR

This paper tackles the limitation of fixed quantum feature maps in QSVMs by introducing GA-QSVM, a configurable genetic-algorithm framework that automatically designs adaptive quantum circuits for the feature map. It employs a two-level optimization where QSVM serves as the low-level learner and GA evolves circuit topology, gate composition, and hyperparameters with normalization constraints to balance expressivity and trainability, incorporating gates such as $R_x$, $R_y$, $R_z$, $H$, and $CX$. Empirical results on datasets including Digits, Fashion, Wine, and Breast Cancer show GA-QSVM achieving competitive or superior accuracy relative to classical SVMs and standard QSVMs, with transfer learning demonstrating cross-dataset generalization. The work highlights the potential and practical impact of evolutionary strategies for automated kernel design in quantum machine learning, while noting computational costs and scalability as areas for future enhancement, e.g., multi-objective optimization with simultaneous control of accuracy, depth, and entanglement cost.

Abstract

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.

Flexible Genetic Algorithm for Quantum Support Vector Machines

TL;DR

This paper tackles the limitation of fixed quantum feature maps in QSVMs by introducing GA-QSVM, a configurable genetic-algorithm framework that automatically designs adaptive quantum circuits for the feature map. It employs a two-level optimization where QSVM serves as the low-level learner and GA evolves circuit topology, gate composition, and hyperparameters with normalization constraints to balance expressivity and trainability, incorporating gates such as , , , , and . Empirical results on datasets including Digits, Fashion, Wine, and Breast Cancer show GA-QSVM achieving competitive or superior accuracy relative to classical SVMs and standard QSVMs, with transfer learning demonstrating cross-dataset generalization. The work highlights the potential and practical impact of evolutionary strategies for automated kernel design in quantum machine learning, while noting computational costs and scalability as areas for future enhancement, e.g., multi-objective optimization with simultaneous control of accuracy, depth, and entanglement cost.

Abstract

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.

Paper Structure

This paper contains 14 sections, 12 equations, 7 figures, 2 tables, 2 algorithms.

Figures (7)

  • Figure 1: The flowchart of the GA-QSVM procedure. At generation $i$, we evaluate set $G$ then update this set until at least one fitness value meets the threshold.
  • Figure 2: GA operations on quantum circuits. (a) Two 6-qubit quantum circuits $\{\mathbf{g}_1,\mathbf{g}_2\}$ as encoded as genome by circuit depth. (b) Two quantum circuit are crossover: $\mathbf{g}_1$ and $\mathbf{g}_2$ are divided into $\{\mathbf{g}_{1,1},\mathbf{g}_{1,2},\mathbf{g}_{2,1},\mathbf{g}_{2,2}\}$ then $\mathbf{g}_{1,1}$ combines with $\mathbf{g}_{2,2}$, $\mathbf{g}_{2,1}$ combines with $\mathbf{g}_{1,2}$. (c) The offspring then randomly mutate. Note that if the offspring are not followed by a normalized condition, the addition/truncation gate's operation may be applied due to the normalization condition.
  • Figure 3: Cumulative explained variance of (a) Digits, (b) Fashion, (c) Wine, and (d) Breast Cancer dataset after using PCA. The number of components for 95% cumulative explained variance for four datasets is 30, 200, 10, and 10.
  • Figure 4: We conduct the survey on hyperparameters by benchmarking on Digits dataset, with fixed $n=5$, $n_{\text{circuit}}=16$, $p=0.1$, $d=5n$, $n_{\text{CX}}=2n$ and different configuration. (a) different $d$, (b) different $n_{\text{circuit}}$, (c) different $n_{\text{CX}}$ and (d) different $p$. Note that in GA-QSVM, we run the fitness function (QSVM) with fewer iterations to save the whole optimization time.
  • Figure 5: Optimal 7-qubit circuits from GA-QSVM for the three datasets (a) Digits, (b) Wine, and (c) Breast Cancer with two quantum kernels (1) FQK and (2) PQK.
  • ...and 2 more figures