Cancer Cell Detection Using a Hybrid Quantum and Classical
Machine Learning Model
Kalluru Hitesh and Pushpa P. V
Department of Electronics & Communications Engineering,Dayananda Sagar University, Bangalore, India
Keywords: Quantum Computing, Quantum Machine Learning, Feature Mapping, Support Vector Machine, Quantum
Kernel, Optimization.
Abstract: The early diagnosis of cancer using MRI is vital in medical diagnostics. Traditional machine learning
approaches struggle with the high dimensionality and complexity of medical image data. As quantum
computing technology progresses, such hybrid approaches are expected to become increasingly practical,
leading to significant advancements in the early detection and diagnosis of cancer. This research
investigates quantum machine learning for the classification task, utilizing a Support Vector Machine
(SVM) with a quantum kernel to detect cancer cells from MRI scans with improved accuracy and
efficiency. The quantum feature space is created through quantum feature mapping of classical data,
enhancing the SVM's ability to classify cancerous and non-cancerous cells. The proposed solution consists
of a quantum machine learning model, that utilizes the classical algorithm with quantum kernel, showing a
significant potential to revolutionize medical diagnostics. By integrating the strengths of quantum
computing with classical machine learning techniques, this approach provides a powerful and efficient tool
for medical image analysis. The proposed quantum machine learning model gives the accurate analysis of
cancer cells detection present in MRI scans of the brain.
1 INTRODUCTION
Detecting cancer is crucial in medical diagnosis,
with MRI and other imaging techniques playing a
key role. Traditional image analysis methods,
though effective, require significant computational
power and miss small but critical details that
distinguish cancerous cells from healthy ones
(Biamonte, Wittek, et al. , 2017). Quantum Machine
Learning (QML) offers a promising solution to
improve medical image analysis. By leveraging
quantum phenomena like superposition and
entanglement, QML algorithms can process complex
datasets and identify subtle patterns that
conventional methods overlook (Havlíček, Córcoles,
et al. , 2019). The proposed optimized solution
combines Classical Machine Learning and Quantum
Computing, utilizing a classical Support Vector
Machine (SVM) model with a quantum kernel
(Schuld, and, Petruccione, 2018). This hybrid
approach aims to enhance the accuracy and
reliability of cancer cell detection from MRI scans
of brain. The quantum kernel maps the input datasets
into a high-dimensional quantum feature space,
making data points more separable (Farhi and
Neven, 2020). This integration of classical and
quantum techniques can significantly improve
detection performance.
The core of this approach is the quantum feature
map, which transforms classical input data into
quantum states. This mapping enables the SVM
model to operate within a quantum-enhanced
framework. The quantum kernel computes the inner
product of these quantum states, providing a
similarity measure that feeds into the SVM. By
reformulating the problem in this manner, the SVM
provides a better and more expressive feature space,
improving its ability to distinguish between
cancerous and non-cancerous cells. QML's potential
advantages over traditional methods are numerous.
The higher dimensionality of the quantum feature
space can reveal intricate structures in the data,
enhancing pattern recognition capabilities.
Additionally, the inherent parallelism of quantum
computing allows for the simultaneous processing of
multiple states, potentially speeding up
computations and improving efficiency(Mohseni
and Lloyd, 2018).
Hitesh, K. and P. V, P.
Cancer Cell Detection Using a Hybrid Quantum and Classical Machine Learning Model.
DOI: 10.5220/0013589100004664
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 3rd International Conference on Futuristic Technology (INCOFT 2025) - Volume 2, pages 189-194
ISBN: 978-989-758-763-4
Proceedings Copyright © 2025 by SCITEPRESS Science and Technology Publications, Lda.
189
These benefits are particularly valuable in
medical imaging, where accurate and timely
diagnosis is critical. Implementing this hybrid
quantum-classical approach involves several key
steps. Initially, classical MRI data is pre-processed
and converted into a format suitable for quantum
processing. The quantum feature map then
transforms this data into quantum states. This
research work is expected to yield higher accuracy
in cancer detection compared to traditional machine
learning methods.
In this paper, we discuss the related work in
section II. The section III describes about the
process of the detection of cancer cells using the
quantum machine learning model. Simulation results
and discussions are presented in section IV,
followed by the conclusion in section V.
2 RELATED WORK
The following is related work performed in various
papers, journals, and books in the field of quantum
machine learning and medical image analysis. In the
work by Havlíček et al. (2019), the authors
introduced the concept of quantum-enhanced feature
spaces, demonstrating how quantum kernels can be
used to improve the performance of classical
machine learning algorithms like support vector
machines (SVM). Schuld and Petruccione (2018)
highlighted applications of quantum computing in
chemistry, with implications for medical imaging.
The work by Biamonte et al. (2017) provided an
overview of quantum machine learning algorithms
and their applications, including medical imaging.
Farhi and Neven (2020) investigated the use of
quantum neural networks for classification tasks. A
detailed review of advancements in quantum
machine learning and its potential applications,
including healthcare, is presented by Mohseni and
Lloyd (2018). Adcock et al. (2015) discussed
quantum information processing techniques relevant
to quantum machine learning. McArdle et al. (2020)
introduced foundational quantum algorithms for
machine learning, emphasizing the potential speed-
ups for data processing. Zhu et al. (2019) provided a
comprehensive review of quantum machine learning
algorithms and their potential for various
applications, including medical diagnostics. In the
paper by El Maouaki et al. (2024), a Quantum
Support Vector Machine (QVSM) was applied to
prostate cancer detection. Mari et al. (2020)
reviewed a high-dimensional QSVM framework and
its application to image classification. The paper by
Mishra et al. (2019) demonstrated quantum neural
networks on a quantum computer by detecting breast
cancer.
3 QUANTUM MACHINE
LEARNING ALGORITHM FOR
THE CANCER CELLS
DETECTION
Quantum Machine Learning is the integration of
machine learning programs with quantum
algorithms. In this research work, we developed a
quantum machine learning model for detecting the
cancer cells from the MRI scans of images.
There are two types of datasets taken for this
work, testing and training. Each dataset consists of
cancer and non-cancer MRI scans of brain. Fig. 1
shows one of the training MRI scans of the cancer
cells belonging to the tumor called glioma.
Figure 1: MRI scan of brain consistingglioma
Figure 2: MRI scan of benign cells
INCOFT 2025 - International Conference on Futuristic Technology
190
The Fig. 2 shows one of the training MRI scans
of benign cells (non-cancer cells).
These datasets are then incorporated into the
quantum states. The study of Support Vector
Machine and Quantum Kernel is performed using
the following steps:
3.1 Data Encoding
A collection of 24 datasets comprising MRI scans of
both glioma (cancer) and benign (non-cancer) cells,
distinguishing between cancerous and non-
cancerous cell samples are considered in this work,
each described by D features. Each feature is
encoded into quantum states using qubits. Let |𝑥
represent the quantum state corresponding to the 𝑖

data point.This encoding transforms classical data
into quantum states, which can then be processed
using quantum feature maps.
Any text or material outside the aforementioned
margins will not be printed.
3.2 Feature Mapping
Quantum feature mapping is a step that allows
classical data to be encoded in quantum states so as
to leverage some intrinsic properties of quantum
mechanics in capturing the intricate patterns existing
in the data. By applying a feature map Φ, input data
points are mapped into a higher-dimensional
quantum feature space, enhancing the ability to
detect complex relationships within the data.
|𝑥
|Φ(𝑥
)
(1)
3.3 Quantum Kernal
A quantum kernel K(x, y) measures the
similarity between two quantum states |φ(x) and
|φ(y). This quantum kernel is fundamental in the
Support Vector Classifier (SVC) optimization
process. It helps find the optimal hyperplane that
separates data points into various classes. The
quantum kernel enables the SVC to operate in a
higher-dimensional space, thus improving its ability
to distinguish between cancerous and non-cancerous
cells. Following equation establishes the relation
between the quantum kernel and the quantum states.
K(𝑥
,𝑥
) = Φ(𝑥
)| Φ(𝑥
)
(2)
3.4 Optimization
The Support Vector Classifier (SVC) optimization
using quantum kernel is used to find the optimal
hyperplane, which separates the data points into
various classes. High accuracy obtained proves the
effectiveness of the quantum-enhanced approach in
identifying cancerous cells from MRI scans of brain.
Consider 𝛼
, 𝛼
to be the Lagrange multipliers, then
𝑚𝑖
𝑛
(𝛴
,
𝛼
𝛼
𝑦
𝑦
K(𝑥
,𝑥
)) - 𝛴
𝛼
; 0
𝛼
≤ C &𝛴
𝛼
𝑦
= 0
(3)
.
In traditional Support Vector Machines (SVMs),
an optimal hyperplane is identified to distinguish
between different data classes. However, by
applying a quantum feature map like ZZFeatureMap,
classical image data can be elevated to a high-
dimensional Hilbert space. Our approach leverages
the FidelityQuantumKernel, which measures the
similarity between data point pairs by assessing the
fidelity of their corresponding quantum state
representations. This quantum kernel is then
seamlessly integrated into a classical SVM, enabling
the creation of a robust classifier. This classifier
excels at identifying complex, non-linear decision
boundaries within the quantum feature space,
enhancing its ability to accurately categorize data.
3.5 Execution
The implementation of the SVM algorithm utilizing
a quantum kernel involves a series of steps. First,
MRI scans of brain images are retrieved from the
datasets and resized to a uniform scale. The input
data is then categorized into testing and training sets,
with each set containing both cancerous and non-
cancerous images. To prevent feature imbalance,
standard scaling is applied to normalize the MRI
scan features. Following scaling, the data is divided
into training and testing sets to assess the model's
performance.
A quantum circuit comprising 8 qubits is
developed using the PauliFeatureMap, mirroring the
feature dimension. Subsequently, a quantum kernel
fidelity object is created using the feature map and
quantum simulator backend. The backend operation
is performed using QASM Simulator. With the
precomputed kernel, an SVC classifier is initialized
using the quantum kernel. The SVM model is then
trained using the quantum kernel matrix computed
on the training data. The model's performance is
evaluated on the testing data by calculating accuracy
and fine-tuning parameters such as the C value and
(
1)
Cancer Cell Detection Using a Hybrid Quantum and Classical Machine Learning Model
191
number of repetitions. This iterative process enables
optimization of the model's performance.
Throughout this process, the quantum kernel
facilitates the exploration of complex relationships
within the data, enhancing the model's ability to
accurately distinguish between cancerous and non-
cancerous images. By leveraging quantum
computing's capabilities, this approach offers a
promising avenue for improving medical diagnosis
and treatment.
The pseudo code for the implementation of
support vector machine using quantum kernel for the
cancer cells detection is given below.
LOAD & PREPROCESS MRI scans (resize,
normalize, flatten)
SPLIT DATA into training and test sets
SCALE FEATURES using StandardScaler
INITIALIZE ZZFeatureMap with input
feature dimension
CREATE FidelityQuantumKernel using the
feature map
SETUP SVC with precomputed kernel
PIPELINE with scaler and SVC
COMPUTE training kernel matrix with
quantum kernel on training data
TRAIN SVM model with training kernel
matrix
𝐾

= [K (𝑥
,𝑥
)] 𝑥
,𝑥
∈𝑋

COMPUTE test kernel matrix with quantum
kernel on test data
PREDICT with SVM model on test kernel
matrix
𝐾

= [K (𝑥
,𝑥
)] 𝑥
∈𝑋

,𝑥
∈𝑋

CALCULATE & DISPLAY accuracy with test
labels and
p
redictions
4 SIMULATION RESULTS AND
DISCUSSIONS
The simulation is performed using qiskit. Fig.3
illustrates the quantum circuit architecture,
accompanied by a cross-validation accuracy of 0.88
± 0.24. The model's accuracy reaches 1.00 when
rounded-off to two digits. The specific values inside
the PauliFeatureMap define the transformations
applied to each qubit within the feature map. These
parameters are essential as they determine the
encoding of classical data into quantum states,
directly impacting the effectiveness of the quantum
machine learning model.
The maximum accuracy is achieved by altering
C-Value, randomness, repetitions of the circuit’s
execution. In quantum machine learning, the
concepts of the `C value`, randomness, and
repetition are pivotal. The `C value`, used in Support
Vector Machines (SVM), balances model
complexity and training accuracy, with higher values
focusing on minimizing training errors and lower
values promoting generalization. Randomness in
machine learning and quantum computing appears in
random initialization of model parameters, data
sampling, and the inherent probabilistic nature of
quantum states and measurements. Repetition is
essential for obtaining reliable results, whether
through averaging outcomes of multiple quantum
measurements or cross-validation in classical
machine learning to ensure stability and
generalization of models. These elements interplay
in quantum kernels and SVMs, where the quantum
instance executes numerous trials to average out the
inherent randomness and stabilize the model’s
predictions, all while carefully tuning the `C value`
to achieve an optimal balance between overfitting
and underfitting.
Figure 3: Output of the SVM model using Quantum
Kernel
The graph in Fig.4 represents support vector
machine using quantum kernel.The contour lines of
red and blue colours indicate the probability of
finding cancer and non-cancer cells respectively.
The black-coloured contour lines indicate the
difficulty in classification of cancer and non-cancer
cells, due to the similarities within the training and
testing datasets.
INCOFT 2025 - International Conference on Futuristic Technology
192
Figure 4: Graph of Support Vector Machine using
Quantum Kernel
Fig.5 shows the graph of number of Repetitions
vs C Value vs Accuracy, keeping Randomness
constant. The accuracy increases as the number of
repetitions and the C value increases.
Figure 5: Graph of Repetitions vs C Value vs Accuracy
5 CONCLUSION
The proposed work illustrates the potential of
Quantum Machine Learning in the medical field. By
using Support Vector Machine (SVM) with
Quantum Kernel, cancer detection from MRI scans
is achieved with a higher accuracy. The pre-
processing of classical MRI data using quantum
feature mapping, and with the quantum kernel to
calculate similarity measures, the hybrid model
accurately classifies cancerous and non-cancerous
cells. This model combines the strengths of both
quantum and classical computing, providing a
powerful and efficient tool for medical image
analysis. As quantum computing technology
progresses, such hybrid approaches are expected to
become more feasible, leading to significant
advancements in early cancer detection and
diagnosis. The proposed model gives accurate
detection of cancer cells using quantum machine
learning, thereby enhancing the analysis of medical
image diagnostics.
ACKNOWLEDGEMENTS
Kalluru Hiteshand Pushpa P.V acknowledge funding
support for Chanakya UGfellowship from the
National Mission on Interdisciplinary Cyber
Physical Systems, of the Department of Science and
Technology, Govt. of India through the I-HUB
Quantum Technology Foundation.
REFERENCES
Havlíček, V., Córcoles, A. D., Temme, K., Harrow, A. W.,
Kandala, A., Chow, J. M., & Gambetta, J. M. (2019).
Supervised learning with quantum-enhanced feature
spaces. Nature, 567(7747), 209–212.
https://doi.org/10.1038/s41586-019-0980-2
Schuld, M., &Petruccione, F. (2018). Supervised Learning
with Quantum Computers. In Quantum science and
technology. https://doi.org/10.1007/978-3-319-96424-
9
Biamonte, J., Wittek, P., Pancotti, N., Rebentrost, P.,
Wiebe, N., & Lloyd, S. (2017). Quantum machine
learning. Nature, 549(7671), 195–202.
https://doi.org/10.1038/nature23474
Farhi, E., & Neven, H. (2020). Classification with
Quantum Neural Networks on Near Term Processors.
https://doi.org/10.37686/qrl.v1i2.80
Mohseni, M., & Lloyd, S. (2018). Quantum algorithms for
supervised and unsupervised machine learning.
Springer International Publishing.
https://doi.org/10.1007/978-3-319-96424-9
Adcock, J., Allen, E., Day, M., Frick, S., Hinchliff, J.,
Johnson, M., ... &Wossnig, L. (2015). Advances in
quantum machine learning. arXiv preprint
arXiv:1512.02900. https://arxiv.org/abs/1512.02900
McArdle, S., Endo, S., Aspuru-Guzik, A., Benjamin, S.
C., &Yuan, X. (2020). Quantum computational
chemistry. Reviews of Modern Physics, 92(1).
https://doi.org/10.1103/revmodphys.92.015003
Zhu, D., Linke, N. M., Benedetti, M., Landsman, K. A.,
Nguyen, N. H., Alderete, C. H., Perdomo-Ortiz, A.,
Korda, N., Garfoot, A., Brecque, C., Egan, L.,
Perdomo, O., & Monroe, C. (2019). Training of
quantum circuits on a hybrid quantum computer.
Science Advances, 5(10).
https://doi.org/10.1126/sciadv.aaw9918
El Maouaki, W., Said, T., & Bennai, M. (2024). Quantum
support vector machine for prostate cancer detection:
Cancer Cell Detection Using a Hybrid Quantum and Classical Machine Learning Model
193
A performance analysis. arXiv,
https://doi.org/10.48550/arXiv.2403.07856
Mari, A., Bromley, T. R., Izaac, J., Schuld, M., &
Killoran, N. (2020). Transfer learning in hybrid
classical-quantum neural networks. Quantum, 4, 340.
https://doi.org/10.22331/q-2020-10-09-340
Mishra, N., Bisarya, A., Kumar, S., Behera, B. K.,
Mukhopadhyay, S., & Panigrahi, P. K. (2019). Cancer
detection using quantum neural networks: A
demonstration on a quantum computer. arXiv preprint
arXiv:1911.00504. https://arxiv.org/abs/1911.00504
quantum computing means to data mining. http://hb.diva-
portal.org/smash/record.jsf?pid=diva2:877090
INCOFT 2025 - International Conference on Futuristic Technology
194