Quantum classifier with tailored quantum kernel

Carsten Blank, Daniel K. Park, June‐Koo Kevin Rhee, Francesco PetruccioneNpj 2020

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.

Introduction

In the evolving field of quantum machine learning, kernel methods serve as a critical bridge, allowing algorithms to identify patterns in high-dimensional Hilbert spaces. While quantum computers are naturally suited for these tasks, previous distance-based classifiers, such as the Hadamard classifier, faced significant limitations. Specifically, they often only measured the real part of the overlap between quantum states, failing to distinguish between certain complex-valued quantum data without extensive classical pre-processing.

The Hadamard classifier circuit ($U_h$) which only captures the real part of state overlap.

Researchers have now introduced a swap-test classifier that utilizes full quantum state fidelity as a similarity measure. This approach enables a "tailored" kernel that can be sharpened using multiple data copies and weighted to prioritize specific training points, significantly outperforming previous interference-based methods.

The Proposed Swap-Test Classifier

The core innovation of this work is the swap-test classifier. Instead of simple interference, it employs a controlled-swap (Fredkin) gate to compare a test data point with a superposition of training data points.

The proposed swap-test classifier circuit ($U_s$) utilizing a controlled-swap gate for fidelity-based classification.

Technical Innovations

  • Power Kernels: By utilizing $n$ copies of the training and test data, the algorithm calculates fidelity raised to the $n$-th power ($|\langle \tilde{x} | x_m \rangle|^{2n}$). This "sharpens" the decision boundary, increasing decisiveness as $n$ grows.
  • Arbitrary Weighting: The protocol allows for assigning different weights to training points, prioritizing specific data.
  • Quantum Forking: To handle data in standard product state formats, the authors adapted "quantum forking" to create entangled states across multiple registers without prior knowledge of the data's internal structure.
  • Efficient Measurement: By measuring a two-qubit observable ($\sigma_z \otimes \sigma_z$) on the ancilla and label qubits, the process avoids the inefficiencies of post-selection, making it twice as efficient as standard methods.

Key Insights and Results

A profound theoretical finding is the mathematical equivalence of this classifier to measuring the Helstrom operator, the fundamental limit for optimal discrimination between two quantum states. As the number of data copies ($n$) increases, the classifier approaches a "nearest neighbor" behavior, focusing exclusively on training data that matches the test input.

Experimental Performance

The model was evaluated using synthetic "toy" datasets, classical noise simulations (via qiskit), and hardware implementation on the IBM Q 5 Ourense processor.

  • Accuracy: Hardware experiments yielded approximately 97% accuracy on the toy dataset.
  • Robustness: Despite noise reducing signal amplitude by ~35% on hardware, the classification remained accurate, demonstrating inherent resilience against certain Pauli errors.
  • Scalability of Measurements: The protocol calculates the weighted sum of fidelities in "quantum parallel," meaning the measurement count remains constant regardless of the training data size.

Limitations and Future Outlook

While the measurement count is constant, the qubit requirement for "quantum forking" scales linearly with the number of training data points ($M$). Current hardware constraints on qubit count and gate error rates for complex multi-qubit gates (like Toffolis) limit large-scale application. Future research may extend this to Quantum Support Vector Machines (QSVMs) and explore optimized non-uniform weighting for real-world datasets.

Summary updated

BibTeX
@inproceedings{blank2020quantum,
  author = {Carsten Blank and Daniel K. Park and June‐Koo Kevin Rhee and Francesco Petruccione},
  title = {{Quantum classifier with tailored quantum kernel}},
  booktitle = {Npj},
  year = {2020},
  doi = {10.1038/s41534-020-0272-6},
}
Figure