Comparing Classical and Quantum Variational Classifiers on the XOR Problem
| Authors | Miras Seilkhan & Adilbek Taizhanov |
| Year | 2026 |
| Field | Machine Learning |
| arXiv | 2602.24220 |
| Download | |
| Categories | cs.LG |
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.
Engineering Breakdown
Plain English
This paper directly compares how well classical machine learning models and quantum machine learning models solve the XOR problem—a canonical non-linear classification task. The researchers evaluated logistic regression, a one-hidden-layer neural network, and two variants of a two-qubit variational quantum classifier (with circuit depths 1 and 2) across synthetic XOR datasets with varying noise levels and sample sizes, measuring accuracy and binary cross-entropy loss. The key finding is that model expressivity determines performance: logistic regression and the depth-1 quantum circuit cannot reliably represent XOR, while the multilayer perceptron and depth-2 quantum circuit succeed. This provides empirical evidence that quantum circuits need sufficient depth (complexity) to match or exceed classical neural network capacity on nonlinear problems.
Core Technical Contribution
The core contribution is a systematic empirical comparison framework that isolates the role of model expressivity in classical versus quantum learning. Rather than making theoretical claims, the authors directly measure how circuit depth in variational quantum classifiers maps to representational power—showing that a depth-1 circuit is fundamentally incapable of the XOR task, whereas depth-2 succeeds. This benchmarking approach is novel because it controls for other variables (optimizer, data distribution, noise) and focuses on the relationship between quantum circuit architecture and non-linear separability. The work provides concrete evidence that quantum advantage, if any, depends critically on circuit depth and that shallow quantum circuits have expressivity limitations analogous to linear classical models.
How It Works
The experimental setup involves three classical baselines and one quantum model. Logistic regression applies a sigmoid function to a linear combination of inputs, inherently limited to linear decision boundaries. The multilayer perceptron adds a hidden layer with nonlinear activation (typically ReLU or sigmoid), enabling it to learn curved boundaries. The variational quantum classifier encodes input features into a two-qubit system, applies a parameterized quantum circuit (ansatz) of varying depth, and measures the expectation value of a Pauli operator to produce a classification prediction. For the depth-1 circuit, the ansatz performs single-qubit rotations and limited entanglement; depth-2 adds another layer of rotations and entanglement gates, increasing the effective Hilbert space dimension the model can explore. During training, all models optimize their parameters (weights for classical, rotation angles for quantum) using gradient-based methods to minimize binary cross-entropy. The evaluation systematically varies Gaussian noise levels and training set sizes to assess robustness and sample efficiency.
Production Impact
For production systems, this work provides a reality check: quantum classifiers are not inherently superior to classical neural networks and require careful architecture design (sufficient circuit depth) to solve even simple nonlinear problems. If you were considering quantum ML for a production pipeline, this paper suggests you cannot use shallow quantum circuits as a drop-in replacement for classical MLPs—you would need deeper circuits, which increases qubit count, gate complexity, and noise susceptibility on near-term quantum hardware. The practical implication is that quantum advantage on real-world datasets likely requires either significantly deeper circuits (which current hardware cannot reliably run) or hybrid approaches where quantum modules augment classical backbones. For teams evaluating quantum investments, this paper indicates that on standard ML tasks like XOR, classical models remain more practical: lower latency, no quantum hardware dependency, and fully differentiable optimization. The tradeoff is clear—use quantum only if you have evidence of exponential speedup on your specific problem, not as a general-purpose upgrade.
Limitations and When Not to Use This
The paper evaluates only the XOR problem, which is synthetic and low-dimensional; results may not generalize to high-dimensional real-world datasets where quantum circuits could exhibit different scaling properties. The variational quantum classifier uses a fixed two-qubit architecture, so the depth-2 quantum circuit may still be too limited for complex tasks where classical MLPs excel with many hidden layers. The paper assumes access to a perfect, noise-free quantum simulator; real quantum hardware introduces decoherence and gate errors that would degrade performance far below what the theory predicts, potentially eliminating any quantum advantage. The study does not explore hybrid methods (quantum-classical combinations), parameterized circuit architectures beyond fixed ansätze, or problem domains where quantum mechanics provides exponential speedup (e.g., sampling from hard distributions). Additionally, the paper lacks analysis of trainability—whether optimization landscapes for quantum circuits become barren at larger scales, a known challenge in variational quantum algorithms.
Research Context
This work sits at the intersection of quantum machine learning and classical ML benchmarking, building on the theoretical foundations of variational quantum algorithms (VQAs) pioneered by Cerezo, Arrasmith, and others. It addresses a fundamental question in quantum ML: under what conditions do quantum models outperform classical ones? The XOR problem is a historical touchstone in neural network research (famously used to motivate hidden layers in the 1980s), making it an appropriate benchmark for comparing quantum and classical expressivity. The paper contributes to a growing body of empirical work that tempers early quantum ML hype by showing that naive quantum circuits are not automatically more powerful—a necessary reality check as the field moves toward practical applications. Future work likely includes evaluating quantum circuits on higher-dimensional datasets, analyzing the effect of noise on the expressivity gap, and investigating whether quantum circuits provide advantages in sample efficiency or generalization rather than raw accuracy.
:::tip Subscribe Get weekly breakdowns of papers like this in AI Letters - the newsletter for engineers building production AI systems. :::
