Quantum Binary Classification (Student Abstract)

Carla Silva, Ana Aguiar, Inês DutraAAAI 2021 · DOI

Abstract

This study explores the feasibility of binary classification using variational quantum circuits (VQCs) within the Noisy Intermediate-Scale Quantum (NISQ) framework. By employing a hybrid quantum-classical architecture, we demonstrate that high-dimensional classical data can be efficiently processed using minimal quantum resources. Our results show that a two-qubit system, optimized via classical gradient descent, matches the performance of traditional neural networks on benchmark datasets, achieving up to 100% accuracy on the Iris dataset and 98.2% on traffic congestion data.

Introduction

As quantum computing transitions from theoretical models to practical NISQ devices, identifying viable machine learning applications is paramount. A significant hurdle in Quantum Machine Learning (QML) is the "data loading" problem: efficiently translating classical feature vectors into quantum states. This paper addresses this by implementing a variational classifier that utilizes amplitude encoding and classical optimization to perform binary classification tasks.

Methodology

The proposed hybrid scheme, implemented using the PennyLane library, follows a three-stage pipeline:

1. Amplitude Encoding

To represent classical data in a quantum format, we utilize amplitude encoding. This technique maps a normalized feature vector $x$ of dimension $N$ into the amplitudes of a quantum state $|\psi_x\rangle = \sum_{i=1}^{N} x_i |i\rangle$. This method is highly efficient, requiring only $n = \lceil \log_2 N \rceil$ qubits to represent $N$ features. Automated padding is applied to datasets where the number of features is not a power of two.

2. Variational Quantum Circuit (VQC)

The core of the classifier is a parameterized quantum circuit consisting of rotation gates ($Rot$) and CNOT gates. Rotation gates apply single-qubit transformations with angles serving as trainable weights, while CNOT gates generate entanglement to capture inter-feature correlations.

3. Classical Optimization

The circuit's output is measured, and the resulting expectation value is used to compute a square loss function. A classical Adam optimizer then calculates gradients and updates the quantum circuit's parameters iteratively. This hybrid approach leverages the representational power of quantum states while benefiting from mature classical optimization algorithms.

Experimental Evaluation

The model was evaluated on two datasets to test its robustness across different domains.

Iris Dataset

We utilized "Iris A," a 100-instance subset of the classic Iris benchmark. The goal was to classify plant species based on morphological features. The variational classifier achieved a perfect 100% accuracy, matching the performance of a standard classical neural network.

Figure 1: Iris A dataset analysis including data points, feature distribution, and training progress (loss/accuracy).

Traffic Dataset

To test real-world applicability, we used traffic data from the Californian Freeway SR57-N. The task was to classify traffic as "congested" or "not congested" based on flow, speed, and density. The model achieved an accuracy of 98.2%, again reaching parity with classical benchmarks.

Figure 2: Distribution of features for the Traffic dataset, showing the separation between congested and non-congested states.

Discussion and Conclusion

Our findings highlight the efficiency of minimalist quantum hardware. Optimal performance was achieved using only two qubits, suggesting that for specific binary classification tasks, the quality of the encoding and variational ansatz is more critical than raw qubit count.

While these results are promising, they were obtained via simulation. Future work will focus on testing the model on physical NISQ devices to assess the impact of noise and decoherence, and exploring alternative encodings like angle encoding to handle more complex, non-linear datasets. In conclusion, this hybrid variational approach provides a practical path for integrating quantum circuits into existing machine learning workflows.

Summary updated

BibTeX
@inproceedings{silva2021quantum,
  author = {Carla Silva and Ana Aguiar and Inês Dutra},
  title = {{Quantum Binary Classification (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i18.17941},
}
Figure