yields deeper circuits. Conversely, the swap test, de-
picted in FigureFig. 2c, is applicable to both pure and
mixed states but necessitates wider circuits. It is based
on the swap trick (Hubregtsen et al., 2022), which de-
duces the inner product from the tensor product of
density matrices ρ
i
and ρ
j
utilizing a swap gate S,
expressed in Eq. 5:
Tr(ρ
i
ρ
j
) = Tr(Sρ
i
⊗ρ
j
). (5)
2.3 Time Complexity for Quantum
Kernels
Quantum one-class Support Vector Machines provide
a nuanced method for detection but are hindered by
formidable time complexity, particularly given the ex-
isting operational frequencies of quantum hardware.
The intrinsic quadratic time complexity of one-class
SVMs is significantly amplified in a quantum com-
puting context, requiring a substantial number of rep-
etitions (shots) to accurately measure fidelity between
points due to its probabilistic nature; typically, at
least 1000 shots per circuit measurement are neces-
sary to obtain replicable results. Training a quantum
one-class SVM on a large dataset, exemplified by the
284,000 instances from the Credit Card dataset in our
experiments, would theoretically necessitate approxi-
mately 4 ×10
10
kernel function value calculations to
construct the symmetrical kernel matrix. This implies
a staggering requirement of 4 × 10
13
shots, which,
with a measurement rate of 5kHz (Haug et al., 2021),
equates to a minimum training time of 255 years us-
ing a swap or inversion test kernel.
Reducing the dataset may abbreviate training time
but risks degrading algorithmic performance and sta-
bility due to decreased representativity of training
samples. This diminution can result in less depend-
able support vectors and decision functions, jeopar-
dizing the reliability and consistency of the one-class
SVM, especially when training data substantially de-
viates from the overall distribution. The challenge
also permeates inference times, as predicting a new
point demands evaluating the kernel function against
all training points, elongating detection times and hin-
dering real-time applications like patient monitoring
and fraud prevention.
To surmount these obstacles, optimization of ker-
nel calculation algorithms and investigation into in-
novative quantum measurement techniques, which
could minimize the requisite shots, are pivotal. Viable
approaches may encompass adapting classical meth-
ods to minimize data needed for kernel matrix com-
putations while preserving performance, employing
clustering, and applying matrix decomposition and
approximation methods to avoid evaluating the kernel
across the entire training set.
3 RELATED WORK
3.1 Quantum Anomaly Detection
This work augments the methodology propounded in
(Kyriienko and Magnusson, 2022), amalgamating the
one-class SVM with a computationally intricate ker-
nel based on the IQP feature map (FigureFig. 2a) to
secure a 20% enhancement in average precision vis-
`
a-vis their classical benchmark. Subsequent exper-
iments herein adhere to this protocol as a quantum
yardstick, exploring two strategies to diminish the
time complexity relative to data size.
Hybrid quantum-classical models manifest as a
prominent archetype in anomaly detection research.
For instance, (Sakhnenko et al., 2022) innovatively
refines the auto-encoder (AE) hidden representation
by interfacing a parameterized quantum circuit (PQC)
with its bottleneck, segueing into an unsupervised
model post-training by substituting the decoder with
an isolation forest, and vetting performance across
multifarious data sets and PQC architectures. Concur-
rently, (Herr et al., 2021) pioneers an adaptation of the
classical AnoGAN (Schlegl et al., 2017) by deploying
a Wasserstein GAN, wherein the generator is substi-
tuted with a hybrid quantum-classical neural network,
and subsequently trained via a variational algorithm.
Contrastingly, quantum annealing approaches,
such as the QUBO-SVM presented in (Wang
et al., 2022), reformulate the conventional SVM
optimization predicament into a quadratic uncon-
strained binary optimization problem (QUBO) which
is amenable to resolution via quantum annealing
solvers. Although retaining the conventional SVM
optimization problem, this methodology expedites
accurate predictions through adept kernel function
identification, thereby facilitating plausible real-time
anomaly detection.
(Ray et al., 2022) explores hybrid ensembles, con-
structing an amalgamation of bagging and stacking
ensembles from assorted quantum and classical com-
ponents, each playing a pivotal role in the anomaly
detection framework. The amalgamated quantum
components encapsulate disparate variable quan-
tum circuit architectures, kernel-based, and quan-
tum annealing-based SVMs, while the classical con-
stituents encompass logistic regression, graph convo-
lutional neural networks, and light gradient boosting
models. Despite superficial similarity to the variable
subsampling utilized herein, it’s noteworthy that the
ICAART 2024 - 16th International Conference on Agents and Artificial Intelligence
326