This paper investigates the effectiveness and structural limits of Variational Quantum Classifiers (VQC) for detecting network anomalies in the era of Noisy Intermediate-Scale Quantum (NISQ) systems. Using the official 20\% research subset of the NSL-KDD dataset, a 4-qubit classifier featuring a 24-parameter trainable ansatz was developed, utilizing amplitude encoding to embed 16 principal components. On a held-out partition of this subset, the model achieved a consistent binary-classification accuracy of 88\%. A comparative evaluation with two fundamentally different optimizers, COBYLA and SPSA, found that the observed performance plateau is not attributable to convergence to local minima, a result we interpret as consistent with an encoding-related expressibility limit rather than an optimization artifact. An architectural parity comparison with a classical neural network (a Tiny MLP with four nodes, achieving 97\% accuracy) highlighted the expressiveness gap associated with data overcompression into restricted quantum states. The model was trained on a class-balanced set spanning the 22 raw NSL-KDD attack categories and evaluated in-sample as a probe of representational capacity: under this configuration the VQC reached only 9\% accuracy and exhibited a degenerate mode collapse onto a small subset of classes. We interpret this behavior as consistent with the loss of linear separability induced by excessive compression in the quantum probability space, while explicitly noting that our experiments do not isolate the encoding from the ansatz depth, optimizer budget, and measurement-decoding scheme (see Limitations). Motivated by these observations and by Cover's theorem, we outline an alternative paradigm: a 16-qubit VQC with angle encoding that expands the Hilbert-space representation rather than relying on aggressive classical dimensionality reduction.
This paper investigates the effectiveness and structural limits of Variational Quantum Classifiers (VQC) for detecting network anomalies in the era of Noisy Intermediate-Scale Quantum (NISQ) systems. Using the official 20% research subset of the NSL-KDD dataset, a 4-qubit classifier featuring a 24-parameter trainable ansatz was developed, utilizing amplitude encoding to embed 16 principal components. On a held-out partition of this subset, the model achieved a consistent binary-classification accuracy of 88%. A comparative evaluation with two fundamentally different optimizers, COBYLA and SPSA, found that the observed performance plateau is not attributable to convergence to local minima, a result we interpret as consistent with an encoding-related expressibility limit rather than an optimization artifact. An architectural parity comparison with a classical neural network (a Tiny MLP with four nodes, achieving 97% accuracy) highlighted the expressiveness gap associated with data overcompression into restricted quantum states. The model was trained on a class-balanced set spanning the 22 raw NSL-KDD attack categories and evaluated in-sample as a probe of representational capacity: under this configuration the VQC reached only 9% accuracy and exhibited a degenerate mode collapse onto a small subset of classes. We interpret this behavior as consistent with the loss of linear separability induced by excessive compression in the quantum probability space, while explicitly noting that our experiments do not isolate the encoding from the ansatz depth, optimizer budget, and measurement-decoding scheme (see Limitations). Motivated by these observations and by Cover's theorem, we outline an alternative paradigm: a 16-qubit VQC with angle encoding that expands the Hilbert-space representation rather than relying on aggressive classical dimensionality reduction.
Recent investigations into Quantum Machine Learning (QML) techniques have unveiled methodologies that accelerate training in established machine learning models to provide an alternative for capturing complex patterns. This study focuses on implementing a practical QML Algorithm, Variational Quantum Classification (VQC) for cybersecurity dataset so that detecting anomalies can be improved and faster by reducing number of attributeslog2Mwhile training the model using Qiskit. Also, we study quantum algorithms to understand how it impacts on cyber datasets to detect anomalies in a improved way as it follows logarithms in the dimensionality reduction of quantum states which opens new horizons to quantum big data applications. Most importantly, we aim to also investigate the impact of various parameterized quantum circuits on VQC using quantum data as quantum states encoded by the cyber security dataset, NSL-KDD. In this research, we train VQC with various structures and parameters of quantum circuits as well as optimizers to adjust parameters of quantum circuits (ansatz) to minimize the objective function values so as to improve accuracy of the model in which quantum circuit, EfficientSU2, along with optimizer, COBYLA, outperforms the accuracy than other circuits and optimizers which shows great potential for improving cybersecurity systems. The research could effectively bridge in the gap between theory and implementation based quantum machine learning on cybersecurity systems.
The increasingly complex cybersecurity landscape requires more advanced network anomaly detection systems. Although, classical machine learning models are known to be effective, they reach computational bottlenecks when processing high-dimensional data. This study investigates the potential of Quantum Machine Learning (QML) for network traffic anomaly detection by evaluating four distinct Variational Quantum Classifier (VQC) architectures. A synthetic network traffic dataset is generated for the evaluations. The VQC models systematically varied feature encoding methods, parameterized ansatz circuits, quantum neural network types, and classical optimizers. Experimental results show that a trade-off exists between circuit expressivity and optimization stability. Deeper circuits (VQC-4) achieved higher accuracy of upto 89.0\%, while simultaneously being sensitive to training conditions. A shallower variant (VQC-1) under performed, although it had consistent and stable optimization curves. Class-dependent biases were also observed such as in VQC-2, where the model struggled to find an effective decision boundary, and produced a large number of false negatives. The best performing model in this study (VQC-3) combined ZFeatureMap with RealAmplitudes ansatz, optimized using ADAM. Comparative analysis against classical machine learning models such as Support Vector Machine and Random Forest reveal a performance gap, where classical models are able to achieve perfect classification performance on the synthetic data. It is concluded that classical algorithms remain dominant in their ability to classify structured data with relatively simple class separations. However, due to the observed potential of certain VQC configurations to learn decision boundaries to classify data, their utility for future applications in noisier, higher-dimensional problems is highlighted.
Quantum Machine Learning (QML) leverages superposition, entanglement, and high-dimensional Hilbert spaces to model complex data structures that can be difficult for classical algorithms to approximate efficiency. In the Noisy Intermediate-Scale Quantum (NISQ) era, limited qubit counts, shallow circuits, and hardware noise constrain practically realizable quantum circuits and motivate the study of variational and hybrid approaches.This work presents a small-scale empirical benchmark of a two-qubit Variational Quantum Classifier (VQC) on the Iris dataset compared with a classical RBF-SVM baseline under noiseless and simulated depolarizing noise conditions. The VQC, implemented in Qiskit Aer with angle encoding and COBYLA optimization, achieves an accuracy of 0.93 ± 0.02 and an F1-score of 0.92 ± 0.03, close to the SVM’s 0.94 ± 0.01 and 0.93 ± 0.02, with a small but statistically detectable advantage for the classical model (p = 0.04, Cohen’s d = 0.48). Under a 2% depolarizing noise channel, the VQC exhibits a smaller relative drop in accuracy than the SVM, suggesting favorable behavior under mild simulated noise. The study serves as an educational, reproducible benchmark rather than a demonstration of quantum advantage.
When a variational quantum classifier performs poorly at detecting network attacks, it is hard to tell which part is to blame: the encoding, the trained circuit or the readout, which turns measurements into a class. In this work, we build upon a recent amplitude-encoded classifier, and we try to separate their contributions to the NSL-KDD benchmark in noiseless simulation. We compare angle and amplitude encoding, vary one component at a time, and measure each circuit against a classical yardstick: a support-vector machine on the encoded states, whose accuracy estimates what a well-trained circuit can reach. Most of the shortfall lies in the readout. Reading one qubit, or the parity of all qubits, leaves several percentage points unused, while a readout trained together with the circuit recovers most of them from the same measurements. This also explains why some classifiers stop improving as further layers are added. The encodings suit different needs. Angle encoding gives the more accurate detector on traffic like the training data and, from eight features up, shallower circuits; amplitude encoding needs far fewer qubits and catches more attacks of types never seen in training. Finally, we report that classical models, given the same inputs, are about as accurate as the best circuits, thus, registering no quantum advantage.
This thesis presents a systematic empirical evaluation of quantum machine learning performance under noisy intermediate-scale quantum (NISQ) era constraints. Through 670 controlled experiments, it evaluated quantum kernel support vector machines and variational quantum classifiers against classical baselines on MNIST binary and multiclass classification tasks with systematic variation of problem difficulty, feature dimensionality (4, 8 qubits), and training set size (n ∈{100, 250, 400, 500, 2000, 4000}). Statistical rigor was ensured through five random seeds per condition and comprehensive significance testing. During the testing with binary datasets, classical methods (SVM, logistic regression, k-NN, neural networks) achieved 85.9% to 99.6% accuracy with training times under one second across all sample sizes. Quantum kernel methods utilizing ZZ feature maps yielded 70.5% to 96.0% accuracy, requiring 129 to 2,140 seconds training with quadratic sample size scaling. Larger scale quantum experiments (n = 4000 for both architectures, 8-qubit encoding with n = 2000 for quantum kernels) proved computationally impossible on available hardware leading to out of memory errors, highlighting practical NISQ-era scalability constraints. Variational quantum classifiers exhibited persistent performance stagnation, failing to exceed 66.5% accuracy despite increases in training data and feature dimensionality. Performance gaps ranged from 3.3 to 35.2 percentage points. All quantum classical differences achieved statistical significance (p< 0.05, with 13 of 14 comparisons meeting p< 0.01) and exhibited large to very large efect sizes (d> 1.0, with 13 of 14 comparisons exceeding d> 2.0). To further evaluate performance and scalability, a 4 class classification experiment was conducted following an identical experimental protocol, with training set sizes of n ∈{100, 250, 400}. Across 180 runs, classical baselines achieved mean accuracies between 87.2% and 95% across both 4 and 8 dimensional data. Quantum Kernel SVM struggled during runs with 4 dimensions, accuracy varying between 64.6% and 74%. Quantum Kernel SVM accuracy declined 16%-25% when the dimension and qubit count were increased to 8, showing findings of exponential kernel concentration. The Variational Quantum Classifier also performed poorly, with accuracy ranging from 43.4% to 44.6% across all runs, providing further evidence that it failed to leverage additional features or training data. Experiments employed noiseless statevector simulation, establishing that quantum underperformance stems from fundamental algorithmic limitations independent of hardware noise. A further extension to 8 class classification (digits 0–7) confirmed and amplified these findings: classical methods maintained 65–83% accuracy while Quantum Kernel SVM degraded to 34–47% and VQC collapsed to 21–23%, approaching the 12.5% random baseline. Supplementary appendix experiments further examined amplitude encoding on raw 784 dimensional pixel features and an alternative angle encoding scheme on the 8-class task; the latter demonstrated that replacing the ZZ Feature Map with simple per qubit rotations substantially recovered quantum kernel performance, suggesting feature map design as a more consequential variable than circuit depth or qubit count in near-term quantum classification.
This study presents a comparative empirical evaluation of Variational Quantum Classifier (VQC) performance within the Quantum Machine Learning (QML) framework, focusing on VQC architectural analysis under NISQ-era qubit constraints. The VQC was designed utilizing ZFeatureMap for data encoding and EfficientSU2 as the ansatz. A systematic test was performed to evaluate the impact of three entanglement topologies (default, circular, pairwise) and two qubit scales (4 and 8) with four classical optimizers on standard classification datasets: Iris, Wine, and Breast Cancer. The results demonstrated that no single configuration is universally optimal. The default topology achieved the highest peak accuracy on multi-class datasets (Iris: 97% with P-BFGS), suggesting its efficiency in simpler parameter landscapes. Conversely, the pairwise and circular topologies showed superior stability and competitive accuracy (up to 92%) on the high-dimensional Breast Cancer dataset, confirming that richer qubit connectivity is essential for effective feature separation in more complex classification problems. Increasing the scale from 4 to 8 qubits was found to be crucial for improving the overall stability and consistency of performance rather than merely increasing peak accuracy. These findings provide essential empirical guidance for designing optimal and trainable VQC architectures under current quantum device limitations.