Table of Contents
Fetching ...

Comparing Classical and Quantum Variational Classifiers on the XOR Problem

Miras Seilkhan, Adilbek Taizhanov

TL;DR

Overall, deeper variational quantum classifiers can match classical neural networks in accuracy on low-dimensional XOR benchmarks, but no clear empirical advantage in robustness or efficiency is observed in the examined settings.

Abstract

Quantum machine learning applies principles such as superposition and entanglement to data processing and optimization. Variational quantum models operate on qubits in high-dimensional Hilbert spaces and provide an alternative approach to model expressivity. We compare classical models and a variational quantum classifier on the XOR problem. Logistic regression, a one-hidden-layer multilayer perceptron, and a two-qubit variational quantum classifier with circuit depths 1 and 2 are evaluated on synthetic XOR datasets with varying Gaussian noise and sample sizes using accuracy and binary cross-entropy. Performance is determined primarily by model expressivity. Logistic regression and the depth-1 quantum circuit fail to represent XOR reliably, whereas the multilayer perceptron and the depth-2 quantum circuit achieve perfect test accuracy under representative conditions. Robustness analyses across noise levels, dataset sizes, and random seeds confirm that circuit depth is decisive for quantum performance on this task. Despite matching accuracy, the multilayer perceptron achieves lower binary cross-entropy and substantially shorter training time. Hardware execution preserves the global XOR structure but introduces structured deviations in the decision function. Overall, deeper variational quantum classifiers can match classical neural networks in accuracy on low-dimensional XOR benchmarks, but no clear empirical advantage in robustness or efficiency is observed in the examined settings.

Comparing Classical and Quantum Variational Classifiers on the XOR Problem

TL;DR

Overall, deeper variational quantum classifiers can match classical neural networks in accuracy on low-dimensional XOR benchmarks, but no clear empirical advantage in robustness or efficiency is observed in the examined settings.

Abstract

Quantum machine learning applies principles such as superposition and entanglement to data processing and optimization. Variational quantum models operate on qubits in high-dimensional Hilbert spaces and provide an alternative approach to model expressivity. We compare classical models and a variational quantum classifier on the XOR problem. Logistic regression, a one-hidden-layer multilayer perceptron, and a two-qubit variational quantum classifier with circuit depths 1 and 2 are evaluated on synthetic XOR datasets with varying Gaussian noise and sample sizes using accuracy and binary cross-entropy. Performance is determined primarily by model expressivity. Logistic regression and the depth-1 quantum circuit fail to represent XOR reliably, whereas the multilayer perceptron and the depth-2 quantum circuit achieve perfect test accuracy under representative conditions. Robustness analyses across noise levels, dataset sizes, and random seeds confirm that circuit depth is decisive for quantum performance on this task. Despite matching accuracy, the multilayer perceptron achieves lower binary cross-entropy and substantially shorter training time. Hardware execution preserves the global XOR structure but introduces structured deviations in the decision function. Overall, deeper variational quantum classifiers can match classical neural networks in accuracy on low-dimensional XOR benchmarks, but no clear empirical advantage in robustness or efficiency is observed in the examined settings.
Paper Structure (46 sections, 37 equations, 17 figures, 5 tables)

This paper contains 46 sections, 37 equations, 17 figures, 5 tables.

Figures (17)

  • Figure 1: Illustration of the XOR classification problem. The two classes (black and white points) cannot be separated by a single straight line, demonstrating the linear inseparability of XOR.
  • Figure 2: Schematic illustration of a one-hidden-layer multilayer perceptron (MLP). Only a subset of hidden units is shown; the total number of hidden units $h$ is a tunable hyperparameter.
  • Figure 3: Bloch sphere representation of a single qubit. Any pure qubit state can be visualized as a point on the unit sphere, parameterized by the polar and azimuthal angles $(\theta,\phi)$. Source: Wikipedia -- Bloch sphere wiki_bloch.
  • Figure 4: High-level structure of a Variational Quantum Classifier (VQC): feature map, trainable ansatz, and measurement.
  • Figure 5: Illustration of the three XOR dataset variants used in this study: (a) Dataset A — clean, discrete XOR; (b) Dataset B — clustered XOR with additive Gaussian noise; (c) Dataset C — continuous XOR defined by a threshold-based rule.
  • ...and 12 more figures