Analog quantum variational embedding classifier

Rui Yang, Samuel Bosch, Bobak T. Kiani, Seth Lloyd, Adrian LupaşcuarXiv 2022 · DOI

Abstract

Quantum machine learning has the potential to provide powerful algorithms for artificial intelligence. The pursuit of quantum advantage in quantum machine learning is an active area of research. For current noisy, intermediate-scale quantum (NISQ) computers, various quantum-classical hybrid algorithms have been proposed. One such previously proposed hybrid algorithm is a gate-based variational embedding classifier, which is composed of a classical neural network and a parameterized gate-based quantum circuit. We propose a quantum variational embedding classifier based on an analog quantum computer, where control signals vary continuously in time. In our algorithm, the classical data is transformed into the parameters of the time-varying Hamiltonian of the analog quantum computer by a linear transformation. The nonlinearity needed for a nonlinear classification problem is purely provided by the analog quantum computer through the nonlinear dependence of the final quantum state on the control parameters of the Hamiltonian. We performed numerical simulations that demonstrate the effectiveness of our algorithm for performing binary and multi-class classification on linearly inseparable datasets such as concentric circles and MNIST digits. Our classifier can reach accuracy comparable with the best classical classifiers. We find the performance of our classifier can be increased by increasing the number of qubits until the performance saturates and fluctuates. Moreover, the number of optimization parameters of our classifier scales linearly with the number of qubits. The increase of number of training parameters when the size increases is therefore not as fast as that of neural network. Our algorithm presents the possibility of using current quantum annealers for solving practical machine-learning problems, and it could also be useful to explore quantum advantage in quantum machine learning.

Introduction

Most current Quantum Machine Learning (QML) research focuses on gate-based models, which utilize discrete sequences of quantum gates. However, these models often require complex classical pre-processing or intricate feature maps to handle non-linear datasets. This research explores an alternative: analog quantum computing. By leveraging the continuous time-evolution of a quantum system, specifically quantum annealers, the authors demonstrate that the natural physics of the system can perform the "heavy lifting" of non-linear classification without the rigid structure of discrete gates.

Methodology

The proposed Analog Quantum Variational Embedding Classifier utilizes a hybrid pipeline where classical data is mapped to the control parameters of a time-varying Hamiltonian. Unlike classical neural networks that rely on activation functions like ReLU or Sigmoid for non-linearity, this model derives its non-linearity directly from the Schrödinger equation.

The pipeline of the analog quantum variational embedding classifier, showing the transformation from classical data to quantum state evolution.

The process follows these key steps:

  1. Linear Mapping: Classical input data is transformed via a simple linear matrix ($W$) into control parameters.
  2. Hamiltonian Control: These parameters define the shape of a time-varying Hamiltonian ($H(t)$), using Fourier coefficients for control signals in a transverse-field Ising model.
  3. Diabatic Evolution: The system evolves according to the Hamiltonian, allowing for rich, non-equilibrium dynamics that do not require the system to remain in its ground state.
  4. Optimization: The matrix $W$ is optimized classically to maximize the distance between the final quantum states of different classes in Hilbert space.

Datasets and Benchmarking

The algorithm was tested on three classic linearly inseparable problems:

  • Concentric Circles: Multi-ring data points requiring non-linear boundaries.
  • Spirals: Intertwined paths of data points.
  • MNIST Digits: Grayscale images of handwritten numbers (specifically digits 1, 3, and 5).

Key Results and Scaling

The classifier demonstrated high performance across all benchmarks. On the 2-circle dataset, it achieved over 99.5% accuracy. For MNIST binary classification (distinguishing 3s from 5s), the model reached 97.44% test accuracy with only 5 qubits.

Training and test dataset accuracies as a function of the number of qubits for 2-label and 3-label classification tasks.

A significant finding is the efficiency of the model's parameters. The number of optimization parameters scales linearly ($O(n)$) with the number of qubits, making it more compact than many classical neural networks that scale quadratically. Furthermore, as shown in the scaling analysis, increasing the number of qubits generally improves performance until saturation, suggesting that even small-scale NISQ devices can be effective for these tasks.

Conclusion and Future Work

This analog approach offers a hardware-compatible path for current quantum annealers, which often struggle with the error rates of gate-based operations. While the model shows promise, future work must address potential "barren plateaus" in the gradient landscape and further optimize hyperparameters like total evolution time ($t_{max}$). Implementing this algorithm on physical hardware will be the next step to evaluate the impact of environmental noise on classification boundaries.

Summary updated

BibTeX
@misc{yang2022analog,
  author = {Rui Yang and Samuel Bosch and Bobak T. Kiani and Seth Lloyd and Adrian Lupaşcu},
  title = {{Analog quantum variational embedding classifier}},
  year = {2022},
  eprint = {2211.02748},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.02748},
}
Figure