Machine Learning (ML) approaches have achieved high performance by discovering underlying data patterns and structures. Diabetes is a life-threatening disease that affects vital organs such as the eyes (retinopathy), nerves (neuropathy), heart and kidneys (nephropathy). Although various ML models have been proposed for diabetes prediction, most struggle to effectively handle large, multi-feature datasets. Quantum Machine Learning (QML), which integrates quantum computing principles with machine learning, offers a promising solution for complex classification tasks. However, effective feature extraction remains challenging on current NISQ (Noisy Intermediate-Scale Quantum) devices due to hardware limitations. In this study, a Differentiable Quantum Circuit with Classical PCA Feature Compression is proposed for medical disease classification using a SMOTE-ENN resampled dataset and a penalized binary cross-entropy cost function to enhance quantum learning. The efficient ansatz designed in this work plays a crucial role in determining the model’s learning capability and feature extraction performance. To evaluate the robustness and generalization capability of the proposed model, three categories of medical datasets are considered. The primary focus is on diabetes classification using four diabetes-related datasets, while additional experiments are conducted on liver disease and chronic kidney disease datasets to assess the adaptability of the proposed framework across multiple healthcare domains. Six datasets from UCI, Mendeley and IEEE repositories are used: PIMA Indian Diabetes, Type-2 Diabetes, a private RTML Insulin dataset, Indian Liver Patient Dataset (ILPD), Early-Stage Diabetes Risk Prediction Dataset (ESDRPD) and Chronic Kidney Disease (CKD). The proposed quantum model is simulated using the PennyLane quantum simulator and compared against preprocessed classical classifiers. Experimental results demonstrate remarkable efficiency and rapid convergence within 10--20 epochs, achieving high F1-scores of 96.15% (PIMA), 97.50% (Type-2), 98.04% (RTML), 89.47% (ILPD), 98.66% (ESDRPD) and 97.84% (CKD). These findings demonstrate that the proposed quantum model efficiently extracts relevant features and effectively handles medical disease classification tasks, highlighting its strong potential for practical healthcare applications.
According to the World Health Organization (WHO), diabetes mellitus (including kidney disease deaths attributed to diabetes) ranked as the eighth leading cause of death globally in the most recent WHO report [1]. The WHO highlights that diabetes is responsible for millions of deaths annually and contributes significantly to the global burden of chronic diseases. Similarly, the International Diabetes Federation (IDF) Diabetes Atlas (11th Ed., 2025) reports that 11.1% of the global adult population (aged 20-79 years)-equivalent to approximately 1 in 9 adults-is currently living with diabetes [2].
Figure 1 illustrates the top countries or territories ranked by the number of adults aged 20-79 years living with diabetes in 2024, along with projections for 2050 [2]. These projections indicate that if current trends continue, the diabetes burden will nearly double in several regions, underscoring the urgent need for stronger public health policies, improved healthcare system responses and effective population-level prevention strategies. Moreover, diabetes leads to long-term damage of the human body parts causing serious, life-threatening and disabling complications such as heart attacks, strokes, kidney failure, vision loss and lower limb amputations [1]. Early prediction of diseases such as diabetes can play a crucial role in controlling the condition and preventing life-threatening complications, thereby saving human lives. Early risk prediction of diabetes can be effectively achieved using machine learning techniques. Recent studies have demonstrated promising results in predicting the risk of diabetes mellitus by leveraging various supervised learning algorithms.
Figure 1: The Top Countries or Territories Based on the Number of Adults (Aged 20-79) Living with Diabetes in 2024 and 2050 Projections
This success is primarily attributed to the computational efficiency and strong data-handling capabilities of these algorithms [3]. In Sadhu and Jadli [3], the authors studied various machine learning algorithms using the Early Stage Diabetes Risk Prediction dataset. They employed K-Nearest Neighbors (KNN), Logistic Regression (LR), Support Vector Machines (SVM) with an RBF kernel, Naive Bayes (NB), Decision Tree (DT), Random Forest (RF) and Multi-Layer Perceptron (MLP) classifiers. Among these, the Random Forest classifier achieved the highest accuracy of 98.07%. In Ihnaini et al. [4], a smart healthcare recommendation system was developed for diabetes prediction using deep ensemble learning with data fusion. The study utilized the Hospital Frankfurt Germany and Pima Indians Diabetes datasets, achieving 91 and 72.73% accuracy before data fusion and an improved 99.64% accuracy after applying data fusion. Chronic Kidney Disease (CKD) is a critical health condition that can lead to severe complications if not identified and treated early. The early detection through routine blood or urine tests is critical, enabling timely medication and monitoring to prevent disease progression to advanced stages [5]. In this study, twelve supervised machine learning classifiers were evaluated for CKD prediction using the Chronic Kidney Disease dataset. Both the original dataset and a dimensionally reduced version obtained via Principal Component Analysis (PCA) were analyzed. The XGBoost classifier demonstrated superior performance, achieving an accuracy of 98.3% on the original dataset and 99.16% on the PCA-reduced dataset, highlighting the positive impact of feature dimensionality reduction on classification performance. The Rownak Textile Mills Limited (RTML) dataset comprises medical records collected from female employees of Rownak Textile Mills Ltd., Dhaka, Bangladesh [6]. In the reported study, the RTML dataset was combined with the Pima Indian Diabetes dataset to increase sample diversity.
To mitigate class imbalance, the Synthetic Minority Oversampling Technique (SMOTE) was applied. Eight classical machine learning classifiers including DT, LR, kNN, AdaBoost, RF and Naïve Bayes (NB)-were evaluated within a supervised learning framework. The XGBoost classifier achieved the best performance, with an accuracy of 83.22% and an area under the ROC curve (AUC) of 0.86 on the combined dataset [6].
The challenge of imbalanced datasets in liver disease prediction has been effectively addressed through hybrid ensemble learning approaches. A comprehensive study by Donaire et al. [7] implemented and evaluated multiple machine learning models. The research developed novel hybrid ensemble models that integrate Recursive Feature Elimination (RFE) for optimal feature selection, SMOTE-ENN (Synthetic Minority Over-sampling Technique with Edited Nearest Neighbors) for data balancing and ensemble learning techniques to handle class imbalance effectively. These hybrid models demonstrated superior performance compared to standalone classifiers, achieving a remarkable accuracy of 93.2% on the Indian Liver Patient Dataset (ILPD) and 95.4% on the BUPA Liver Disorder Dataset. The study’s findings underscore the critical importance of combining data balancing techniques with ensemble methods to enhance diagnostic accuracy in imbalanced medical datasets, providing a robust framework for reliable liver disease prediction systems.
Although classical machine learning algorithms have demonstrated superior performance and effective learning capabilities, the exponential growth of medical healthcare data presents new challenges and opportunities. Larger training datasets typically yield more accurate predictions, enabling early diagnosis that can be crucial for saving human lives. However, to fully leverage these massive datasets and achieve further advancements in predictive accuracy, additional computational paradigms such as quantum computing are required. Since the foundational proposal of quantum computing by Feynman [8], the field has undergone significant theoretical and experimental advancements, offering promising solutions for handling large-scale medical data analysis and complex pattern recognition tasks.
The study by Hancco-Quispe et al. [9] applied quantum machine learning techniques to diabetes classification using the PIMA dataset. The research implemented various classical classifiers including LR, KNN and NB, alongside preprocessing techniques such as PCA and LDA for dimensionality reduction. Two quantum algorithms were evaluated: Quantum Support Vector Classifier (QSVC) and Variational Quantum Classifier (VQC). The experimental results demonstrated that the combination of LDA for dimensionality reduction with quantum classifiers achieved superior performance, highlighting the potential of quantum machine learning approaches in medical diagnosis applications.
In Safriandono et al. [10], Quantum Feature Engineering (QFE) was applied in conjunction with SMOTE-Tomek class balancing on the ILPD dataset. The study evaluated classical machine learning models under two configurations: without QFE and with QFE preprocessing. Using traditional preprocessing with SMOTE-Tomek, with QFE-SVM achieved the highest accuracy of 72%. When QFE was incorporated with SMOTE-Tomek balancing, XGBoost attained an improved accuracy of 81%, demonstrating a substantial 9% enhancement and validating the effectiveness of quantum-enhanced feature engineering for imbalanced medical datasets.
Donaire et al. [7] proposed a hybrid quantum-classical model, QML-Liver, for liver disease classification on the ILPD dataset. The model combines three classical neural network layers with a single quantum layer using angle embedding and basic entanglement on one qubit. Trained for 100 epochs, QML-Liver without SMOTE achieved 83% accuracy, while the SMOTE-balanced version attained 75% accuracy but a higher precision of 89%, highlighting its effectiveness in reducing false positives for medical diagnostics. A comprehensive summary of key findings from the literature on diabetes prediction, encompassing classical, quantum and hybrid machine learning models evaluated across various datasets with different data balancing techniques, is presented in Table 8.
Motivation and Contributions
Advanced machine learning methods, including support vector machines, neural networks and decision tree classifiers, are frequently employed for disease diagnosis in healthcare systems [3-6]. However, classical models face significant challenges including requirements for large balanced datasets, computational limitations and difficulty capturing complex medical patterns [7].
Quantum machine learning offers a promising alternative by exploiting superposition and entanglement to learn complex patterns from smaller datasets through efficient ansatz representations. Despite this potential, current quantum systems face critical limitations: restricted qubit availability, noise and decoherence errors, challenges in encoding classical data into quantum states and difficulties in optimizing quantum neural network parameters [7]. These gaps between quantum computing’s theoretical advantages and practical constraints motivate the development of resource-efficient quantum algorithms for medical diagnostics. In this work, we design and optimize a Differentiable Quantum Circuit with Classical PCA Feature Compression for diabetes classification. Our model integrates classical advantages in the preprocessing phase with quantum computing’s capability to learn complex patterns from training data through efficient quantum state representations. The main contributions of this study are as follows:
The paper follows the following structure: Sec. 3 presents the Proposed Model Design, detailing the Classical Preprocessing Phase, Quantum Training Phase, Prediction and Inference Phase, Parameter Optimization Phase and Test Data Validation Phase. Sec. 4 provides Experimental Setup and Performance Analysis, including Dataset Information, Comparative Methods, Results & discussion and Sec. 5 Concludes the paper.
Model Design
Figure 2 illustrates the overall workflow of the proposed Differentiable Quantum Circuit with Classical PCA Feature Compression for Diabetes Classification. The workflow is divided into two major phases: (i) The Classical Preprocessing Phase and (ii) The Quantum Main Phase. In the Classical Preprocessing Phase, the raw medical dataset is transformed into a suitable format for quantum computation. The Quantum Main Phase is responsible for the core learning process. Each of these phases and modules is discussed in detail in the following sections.
Classical Preprocessing Phase
In this phase, the raw medical data is transformed into a suitable input format for quantum processing. Proper preprocessing is essential, as it directly influences the performance of the quantum circuit during training. This stage typically includes tasks such as Data Cleaning, Feature Engineering, Handling Class Imbalance and Quantum Feature Scaling.
Data Cleaning
The raw diabetes dataset is represented as:
where, denotes the number of features, is the set of class labels, is the number of classes and is the total number of samples.
The first step in preprocessing is to remove any duplicate entries from the dataset. Following this, missing values (denoted as NaN) and biologically invalid zeros are handled using median imputation, ensuring that all features contain meaningful and valid values.
Figure 2: Overall Workflow of the Proposed Quantum Diabetes Classification Algorithm
Let the dataset after duplicate removal be denoted as:
For each feature , missing or invalid entries in the -th feature vector are replaced by the median of the observed valid values for that feature. Mathematically, the imputation for (the -th feature of the -th sample) can be expressed as:
(1)
Equation 1 ensures that the dataset is free from duplicates and invalid entries, providing a reliable foundation for subsequent quantum feature encoding and learning.
Feature engineering is applied to enhance the predictive capability of the dataset by generating new meaningful features from existing ones. This process includes the creation of categorical variables, interaction features and domain-specific transformations, which help the quantum model learn more discriminative patterns. Categorical feature creation converts continuous variables into clinically interpretable classes.
For example, Body Mass Index (BMI), Glucose level and Age are grouped into medically relevant categories such as normal, overweight, obese or diabetic. In addition to this, interaction features are generated by combining two or more significant risk factors associated with diabetes prediction. As discussed in Changpetch et al. [12], classification models that include interaction features perform better than those using only individual features, as interactions capture complex relationships between variables. Likewise, the study in Phongying and Hiriote [13] demonstrates that incorporating interactions among key diabetes risk factors-such as BMI, glucose levels and family history-significantly improves prediction accuracy. These enriched features, as presented in Table 1, provide deeper insights into the dataset, thereby enhancing both classical preprocessing and the learning performance of the proposed quantum model.
Table 1: Categorical Feature Creation for BMI, Glucose and Age
|
Feature |
Category |
Condition |
|
BMI |
BMI_Normal |
BMI<25 |
|
BMI_Overweight |
25≤BMI<30 |
|
|
BMI_Obese |
BMI≥30 |
|
|
Glucose |
Glucose_Normal |
Glucose<100 |
|
Glucose_Prediabetic |
100≤Glucose<126 |
|
|
Glucose_Diabetic |
Glucose≥126 |
|
|
Age |
Age_Young |
Age<30 |
|
Age_Middle |
30≤Age<50 |
|
|
Age_Senior |
Age≥50 |
Two interaction features were defined to capture combined effects of key attributes:
and:
These newly created categorical and interaction features are added to the dataset before training, enabling the model to capture more comprehensive relationships among variables.
The next step in preprocessing is dimensionality reduction. In this study, PCA is employed, which is a widely used statistical technique for reducing the dimensions. PCA identifies a new set of orthogonal variables, called principal components, that capture the maximum variance present in the data [14]. The objective of PCA is to retain the most informative features while eliminating redundant or less significant ones, thereby preserving essential information without substantial loss. This reduction is particularly important in quantum machine learning, as it minimizes the number of qubits required during the quantum training phase. By applying PCA, the number of qubits required in the quantum circuit is significantly reduced. This enables efficient quantum training while still retaining essential information from all input features in the form of linear combinations.
After applying PCA, a set of d new principal component features is obtained. From these, the top p principal components that contribute the most to the total variance are selected for training. The optimal number of principal components is determined through hyperparameter tuning to ensure the best trade-off between accuracy and computational efficiency.
Handling Class Imbalance
To effectively address the issue of class imbalance in the dataset, the Synthetic Minority Oversampling Technique combined with Edited Nearest Neighbors (SMOTE-ENN) is applied. This hybrid approach, proposed by Batista and Prati in Batista et al. [15], integrates the strengths of both SMOTE and ENN. SMOTE generates synthetic minority class samples to balance the dataset; however, this may also introduce noisy or unreliable samples. To overcome this, ENN is used to clean the dataset by removing misclassified and ambiguous samples using the nearest neighbor rule. As a result, the training dataset becomes more robust, enabling the quantum model to learn more discriminative and reliable patterns for diabetes classification.
Quantum Feature Scaling
After completing all previous preprocessing steps, the dataset is prepared for quantum processing by scaling all feature values to the range using Min-Max normalization. This ensures that each input value (corresponding to the -th feature of the -th sample) satisfies: . The normalization is performed according to the following Equation 2:
(2)
Scaling features to this range is essential for quantum circuits, as it allows each value to be directly encoded as a rotation angle in quantum gates. This ensures that the quantum state can fully capture the rotational impact of all input features, facilitating effective quantum feature encoding and improving the model’s learning performance. After normalization, the dataset is divided into training and testing sets, where 70% of the data is used for training and the remaining 30% for testing.
Quantum Main Phase
In this stage, the preprocessed classical data is encoded into a quantum circuit for further processing. The proposed model, consisting of a sequence of quantum gates with trainable parameters that are optimized during the learning process. The architecture is structured into four key phases: The Quantum Training Phase, Prediction and Inference Phase, Parameters Optimization Phase and Test Data Validation Phase.
The qubit register for this model is divided into two distinct parts: feature qubits, which extract information from the input data and target qubits, which are utilized for classification tasks. Figure 3 illustrates the detailed workflow of the proposed model for diabetes classification across various diabetes datasets, providing a clear representation of the overall process.
Figure 3: Workflow of The Proposed Quantum Training Framework for Diabetes Classification
The Diagram Depicts the Complete Quantum Learning Process, Where the Blue Path Represents the Training Pipeline and the Red Path Indicates the Testing (Inference) Phase
Quantum Training Phase
The Quantum Training Phase is responsible for learning patterns from the input features to extract meaningful knowledge from the data. The proposed framework for this phase consists of six core modules: Data Encoder, Data Qubit Gates, Data Qubit Dynamic Entanglements, Data & Target Qubit Dynamic Entanglement, Target Qubit Gates and Measurement on Data and Target Qubits.
Each module performs a distinct role in the quantum learning process, collectively enabling efficient feature encoding, meaningful interaction between data and target qubits and accurate measurement for classification. The detailed design and operation of each module are presented in the following subsections.
Data Encoder
Let denote the number of feature qubits, where and represents the number of principal components selected by hyperparameter optimization.
The top PCA-transformed features are encoded and fed into the quantum circuit layers. Let denote the number of target qubits (here ), the number of circuit layers and the number of training epochs. The classical input vector after PCA transformation is given by: . The initial quantum state is prepared in the all-zero computational basis state: . The data encoding is performed using the angle embedding unitary operator , defined as:
(3)
where the gate product is evaluated from right to left, meaning is applied first, followed by . Here and are single-qubit rotation gates around the -axis and -axis, respectively, applied to the -th qubit. These are defined as:
where, and denote the Pauli- and Pauli- operators, respectively. The general single qubit rotation gate is defined as:
where, is the single-qubit rotation around the -axis applied to the -th qubit and denotes the corresponding Pauli matrix. The identity operator acts on the target qubits, which remain unaltered during this encoding step.
Data Qubit Gates
To extract meaningful features from the input data distribution, a parameterized quantum gate block is applied to the feature qubit register. Let the learnable parameters of the -th layer be denoted as , where represents the number of feature qubits and . The parameter matrix for the -th layer is expressed as:
The corresponding unitary transformation applied to the feature qubits is defined as:
(4)
where, denotes the identity operation acting on the target qubits. This block introduces learnable parameters per layer and enables the circuit to capture the input features through tunable single-qubit rotations.
Data Qubit Dynamic Entanglements
This module introduces dynamic learnable entanglement among the data qubits. The purpose is to enable controlled information sharing between neighboring feature qubits, guided by tunable entanglement strengths. Only data qubits participate in these interactions. The Ising entangling gate between two qubits and is defined as:
where, and are the Pauli matrices corresponding to the axes and , respectively [16]. Let be the vector of learnable entanglement parameters for the -th layer, where:
The unitary operator for the data-qubit entanglement module in the -th layer is defined in Equation 5:
(5)
This configuration ensures that each data qubit is entangled with its nearest neighbor, including a wrap-around entanglement between the last and the first qubit. Hence, this module introduces trainable entanglement parameters per layer.
Data and Target Qubit Dynamic Entanglement
This module establishes dynamic interactions between the data qubits and the target qubits using parameterized two-qubit entangling gates. These interactions allow information to flow from selected wrapped data qubits to the target qubits during each layer of the circuit. Let be the vector of learnable entanglement parameters for the -th layer, defined as:
The unitary operation for this module is defined in Equation 6:
(6)
where, the Ising interaction is applied between the first data qubit and the target qubit . The parameter controls the entanglement strength of this interaction. In this way, information is effectively transferred from the feature qubits to the target qubits, with the flow being modulated by the learnable parameter This module introduces one learnable parameter per layer.
This module applies unitary transformations exclusively to the target qubit(s) . Since in this architecture , these gates enable the network to further process and reshape the entangled information received from the feature qubits. Let denote the learnable parameters of this module for the -th layer, defined as:
Each row corresponds to the rotation angles applied to a single target qubit. The unitary operator for this module is defined in Equation 7:
(7)
where, denotes the index of the target qubit in the full quantum register, is the identity operator acting on the feature qubits and represents a general single-qubit rotation gate defined as: This module allows the target qubit to capture non-linear combinations of the entangled information, enhancing the circuit’s capability to model complex decision boundaries. This module introduces learnable parameters per layer.
The quantum circuit begins with an initial quantum state. By sequentially applying the modules, the cumulative unitary for the -th layer (Ansatz) is defined as using Equation 3-7: where, . Here, the product is evaluated from right to left, reflecting the order of unitary gate applications in quantum circuits. Here the data is re-encoded at each layer, similar to the data re-uploading strategy used in variational quantum circuits [17]. This mechanism increases the expressive power of the model and allows better feature interaction across layers, analogous to how neurons in one layer of a classical neural network connect to all neurons in the next layer. The total Learnable Parameter per layer is: . The final quantum state after layer is presented in Equation 8:
(8)
Measurement on Data and Target Qubits
After applying all the preceding unitary modules, the final quantum state encapsulates the transformed information distributed across both feature (data) and target qubits. To extract class-relevant information, measurements are performed on the first data qubit and the target qubit , indexed as , using the Pauli- observable. The expectation value of a qubit with respect to the Pauli- operator is defined as:
(9)
Here, denotes the Pauli- operator acting only on qubit , while the identity operator is implicitly applied to all other qubits. The quantum measurement outcomes are represented as: where, both and take values within the range . These expectation values serve as the quantum outputs, encoding the probabilistic information of the respective classes. The resulting values are subsequently passed to the classical post-processing layer for final decision-making or classification.
Prediction and Inference Phase
Once the final quantum state is measured on the data and target qubits, the resulting values represent the expectation values of the Pauli- measurements on the respective qubits, as described in Equation 9. To convert these values into a usable positive scale, each component is rescaled to the interval using the following transformation:
(10)
The rescaled output vector becomes and . To interpret these rescaled outputs as class probabilities, the softmax activation function is applied, producing a normalized probability distribution across the classes:
(11)
By using Equation 11, the resulting probability vector is expressed as , which satisfies the normalization condition . Finally, the predicted class label is determined by selecting the index corresponding to the highest probability value:
(12)
Parameter Optimization Phase
The Quantum Neural Network (QNN) is trained by optimizing all tunable parameters, including those associated with data-qubit rotations, target-qubit rotations, intra-data entanglement and data-target entanglement. The primary objective is to minimize the prediction error between the network’s output probabilities and the true class labels.
The model outputs a probability vector (Equation 11), where represents the complete set of trainable parameters across all circuit layers. For a given training sample , where, and , the penalized binary cross entropy loss function is defined as:
(13)
Here, and represent the predicted probabilities for Class 0 and Class 1, respectively, corresponding to the input sample . The final term introduces an regularization over the trainable parameters to prevent overfitting and improve generalization. To minimize this cost function, the pennylane.AdamOptimizer() is employed. This optimizer supports hybrid quantum-classical training through automatic differentiation. Gradients of the quantum circuit with respect to ‘’ are computed using the parameter-shift rule, which ensures full compatibility with both simulation and real quantum hardware. During each training epoch , the parameters are iteratively updated to minimize the loss and enhance classification accuracy. The key hyperparameters used during Adam optimization are summarized in Table 2.
Table 2: Hyperparameters used for Training the Quantum Model During Optimization
|
Hyperparameter |
Value |
|
Learning rate () |
0.01 |
|
β1 |
0.9 |
|
Β2 |
0.999 |
|
ϵ |
1×10₋8 |
|
Regularization coefficient () |
0.001 |
|
Batch size () |
16 |
Test Data Validation Phase
After completing the parameter optimization, the final optimized parameters are employed to evaluate the model’s performance on the unseen test dataset. Here, the optimized parameter set is defined as:
This evaluation phase assesses the generalization capability of the variational quantum circuit, how effectively it has learned the underlying data distribution during training and how well it can predict the class labels of new, previously unseen inputs based on the learned parameters .
Experimental Setup and Performance Analysis
Dataset Information: Six publicly available and private datasets are used in this study to evaluate the generalization capability of the proposed algorithm, encompassing three disease classification categories: diabetes disease classification, liver disease classification and chronic kidney disease classification. The descriptions of the independent features from six different diabetes datasets are provided in Table 3 and 4.
Table 3: Descriptions of Independent Features from Six Datasets PIMA, RTML, Type-2 and ILPD Features (Table 1/2)
|
Attribute |
Description |
Type |
Dataset |
|
Pregnancies |
Number of times pregnant |
Integer |
PIMA, RTML, Type-2 |
|
Glucose |
Plasma glucose concentration at 2 hours in an oral glucose tolerance test (mg/dL) |
Integer |
PIMA, Type-2, RTML |
|
BloodPressure |
Diastolic blood pressure (mm Hg) |
Integer |
PIMA, CKD, RTML, Type-2 |
|
SkinThickness |
Triceps skin fold thickness (mm) |
Integer |
PIMA, RTML, Type-2 |
|
Insulin |
2-Hour serum insulin (μU/ml) |
Integer |
PIMA, Type-2, RTML |
|
BMI |
Body Mass Index (weight in kg/(height in m)²) |
Decimal |
PIMA, Type-2, RTML |
|
Diabetes Pedigree Function |
Diabetes pedigree function |
Decimal |
PIMA, Type-2 |
|
Age |
Age (years) |
Integer |
PIMA, Type-2, RTML, ILPD, ESDRPD, CKD |
|
Gender |
Gender of the patient (Male/Female) |
Categorical |
ILPD, ESDRPD |
|
Total Bilirubin |
Total bilirubin level in blood (mg/dL) |
Decimal |
ILPD |
|
Direct Bilirubin |
Direct bilirubin level in blood (mg/dL) |
Decimal |
ILPD |
|
Alkaline Phosphatase, Alanine Aminotransferase, Aspartate Aminotransferase |
Alkaline phosphatase enzyme level in blood (IU/L); Alanine aminotransferase enzyme level in blood (IU/L); Aspartate aminotransferase enzyme level in blood (IU/L) |
Integer |
ILPD |
|
Total Proteins |
Total protein level in blood (g/dL) |
Decimal |
ILPD |
|
Albumin |
Albumin level in blood (g/dL) |
Decimal |
ILPD, CKD |
|
Albumin and Globulin Ratio |
Ratio of albumin to globulin in blood |
Decimal |
ILPD |
Table 4: Descriptions of Independent Features from Six Datasets PIMA, RTML, Type-2 and ILPD Features (Table 2/2)
|
Attribute |
Description |
Type |
Dataset |
|
sg |
Specific gravity (1.005-1.025) |
Decimal |
CKD |
|
Polyuria, Polydipsia, Sudden Weight Loss, Weakness, Polyphagia, Genital Thrush, Visual Blurring, Itching, Irritability, Delayed Healing, Partial Paresis, Muscle Stiffness, Alopecia, Obesity |
Indicates the presence or absence of each symptom (Yes = 1, No = 0) |
Categorical |
ESDRPD |
|
su, bgr, bu, sod, pcv, wc |
Sugar (0-5); Blood glucose random (mg/dL); Blood urea (mg/dL); Sodium (mEq/L); Packed cell volume; White blood cell count (cells/cumm) |
Integer |
CKD |
|
sc, pot, hemo, rc |
Serum creatinine (mg/dL); Potassium (mEq/L); Hemoglobin (gms); Red blood cell count (millions/cmm) |
Decimal |
CKD |
|
Red Blood Cells, Pus Cell |
Normal = 1, Abnormal = 0 |
Categorical |
CKD |
|
Pus Cell Clumps, Bacteria |
Present = 1, Not Present = 0 |
Categorical |
CKD |
|
Hypertension, Diabetes Mellitus, Coronary Artery Disease, Pedal Edema, Anemia |
Yes = 1, No = 0 |
Categorical |
CKD |
|
Appetite |
Good = 0, Poor = 1 |
Categorical |
CKD |
Diabetes Disease Classification
The third dataset, referred to as the RTML with Insulin Dataset, comprises 109 medical records of female patients from Rownak Textile Mills Ltd., Dhaka, Bangladesh and is available at https://github.com/tansin-nabil/Diabetes-Prediction-Using-Machine-Learning
Liver Disease Classification
UCI Machine Learning Repository at https://archive.ics. uci.edu/dataset/225/ilpd+indian+liver+patient+dataset
Chronic Kidney Disease Classification
Experimental Results
The simulation experiments were conducted using the PennyLane framework with the default.qubit device as the quantum simulator backend. Table 5 presents the experimental outcomes of the proposed trainable quantum circuit, including hyperparameter tuning across multiple diabetes datasets. The tuned hyperparameters include the number of PCA components and the number of circuit layers, with the corresponding training and testing accuracies reported for each dataset. Various combinations of these parameters were systematically explored to identify optimal configurations and the best-performing settings are highlighted in bold. The proposed quantum model exhibits effective pattern learning across all six datasets, as reflected by the balanced training and testing accuracies, demonstrating strong generalization without overfitting.
Table 5: Experimental Results of the Proposed Trainable Quantum Circuit with Different PCA Components and Circuit Layers Across Multiple Diabetes Datasets. The best-performing configurations are highlighted in bold
|
Dataset |
No. of Epochs (t) |
PCA Components |
No. of Layers (k) |
No. of Qubits |
Training Acc. (%) |
Test Acc.(%) |
|
PIMA |
20 |
3 |
5 |
4 |
91.71 |
94.67 |
|
20 |
4 |
3 |
5 |
92.29 |
96 |
|
|
Type-2 |
20 |
3 |
7 |
4 |
94.03 |
97.35 |
|
20 |
4 |
5 |
5 |
90.59 |
88.76 |
|
|
RTML |
10 |
3 |
5 |
4 |
95.55 |
95.83 |
|
10 |
4 |
4 |
5 |
98.82 |
97.92 |
|
|
ILPD |
20 |
3 |
9 |
4 |
89.95 |
90.24 |
|
20 |
4 |
9 |
5 |
88.83 |
90.24 |
|
|
ESDRPD |
10 |
3 |
3 |
4 |
98.24 |
98.64 |
|
10 |
4 |
5 |
5 |
97.6 |
98.64 |
|
|
CKD |
10 |
3 |
9 |
4 |
99.09 |
97.9 |
|
10 |
4 |
6 |
5 |
96.42 |
93.06 |
The model achieves convergence within 10-20 epochs, indicating stable and efficient training behavior. The circuit architecture employs a two-register configuration: one register encodes the PCA-transformed input features, while the other consists of a single class qubit responsible for classification output. The total number of qubits required is computed as: .
From the hyperparameter tuning experiments, the optimal configurations and their corresponding results were determined for each dataset. The PIMA dataset, using 4 PCA components, 5 qubits and 3 layers, attained a test accuracy of 96%. The Type-II Diabetes dataset, with 3 PCA components, 4 qubits and 7 layers, achieved 97.35% accuracy. The RTML dataset, configured with 4 PCA components, 5 qubits and 4 layers, reached 97.92% accuracy. For the ILPD dataset, using 3 PCA components, 4 qubits and 9 layers, the model achieved 90.24% accuracy. Since the configuration with 4 PCA components required 5 qubits and yielded similar accuracy, the setup with fewer qubits was preferred for efficiency.
The ESDRPD dataset, with 3 PCA components, 4 qubits and 3 layers, achieved the highest test accuracy of 98.64%, while the CKD dataset, configured with 3 PCA components, 4 qubits and 9 layers, attained 97.90% accuracy. The model consistently converged within 10-20 epochs across all datasets. Notably, the proposed framework effectively learned feature patterns using only 4-5 qubits, demonstrating its resource efficiency and scalability for medical data classification.
Figure 4 illustrates the proposed Differentiable Hybrid Classical-Quantum Circuit with five PCA components and two variational layers, including the measurement process. This framework consists of all six proposed modules.
Figure 4: Architecture of the Proposed DQC Circuit with 5 PCA Components and 2 Variational Layers
Comparative Methods and Discussions
The performance of the proposed quantum algorithm was evaluated using confusion matrices for all six diabetes datasets, as illustrated in Figure 5. These matrices represent the detailed classification outcomes of the quantum model across each dataset. Furthermore, comprehensive performance metrics were computed to quantitatively assess the classification process. These include Accuracy, Precision, Recall, F1-Score and the Area Under the Curve of the Receiver Operating Characteristic (AUC-ROC). Table 6 summarizes the performance metrics of the proposed Differentiable Quantum Circuit for diabetes classification. The F1-scores for all six datasets exceed 95%, except for the ILPD dataset, which achieved an accuracy of 90.24%. Notably, the AUC-ROC scores for all datasets are above 0.9, demonstrating the strong discriminative ability of the proposed model, with the ILPD dataset achieving an AUC-ROC of 0.9408.
Table 6: Classification Performance Metrics of Proposed Differentiable Quantum Circuit Across Various Diabetes Datasets
|
Dataset |
Train Accuracy (%) |
Test Accuracy (%) |
Precision (%) |
Recall (%) |
F1 Score (%) |
AUC-ROC |
|
PIMA |
97.85 |
96 |
96.13 |
96 |
96.15 |
0.9651 |
|
Type-2 |
98.5 |
97.35 |
97.38 |
97.35 |
97.5 |
0.9856 |
|
RTML |
98.9 |
97.92 |
98 |
97.92 |
98.04 |
0.9826 |
|
ILPD |
92.1 |
90.24 |
90.24 |
90.24 |
89.47 |
0.9408 |
|
ESDRPD |
99.2 |
98.65 |
98.69 |
98.69 |
98.66 |
1 |
|
CKD |
98.4 |
97.9 |
97.99 |
97.9 |
97.84 |
0.9924 |
Figure 5(a-f): Confusion Matrices of the Proposed Quantum Classification Results across Six Diabetes Datasets
For the classical baseline, Nine standard classifiers-SVM, LR, KNN, RF and Naive Bayes (NB), LDA, DT, Adaptive Boosting Technique (AdaB.) and Extreme Gradient Boosting (XGB.) were implemented using the classical preprocessing phase described in Figure 2. The corresponding Test Accuracy, Precision, Recall and F1 Score results for each classifier are summarized in Table 7.
Table 7: Experimental Results of Classical Classifiers with Preprocessing Phase Applied to Different Diabetes Datasets
|
Dataset |
Metric |
SVM |
LR |
KNN |
RF |
NB |
LDA |
DT |
AdaB. |
XGB. |
|
PIMA |
Accuracy |
88.83 |
88.27 |
93.3 |
93.85 |
85.47 |
89.38 |
88.88 |
94.97 |
89.94 |
|
Precision |
86.54 |
87.13 |
93.75 |
92.93 |
88.04 |
90.52 |
91.3 |
93.93 |
94.94 |
|
|
Recall |
93.75 |
91.67 |
93.75 |
95.83 |
84.38 |
89.58 |
87.5 |
96.87 |
97.91 |
|
|
F1 Score |
90 |
89.34 |
93.75 |
94.36 |
86.17 |
90.05 |
89.36 |
95.38 |
96.41 |
|
|
Type-2 |
Accuracy |
92.45 |
91.19 |
91.19 |
91.82 |
91.82 |
91.19 |
93.08 |
92.45 |
94.96 |
|
Precision |
92.39 |
92.22 |
88.78 |
91.4 |
94.25 |
95.23 |
90.72 |
90.62 |
93.61 |
|
|
Recall |
94.44 |
92.22 |
96.67 |
94.44 |
91.11 |
88.88 |
97.77 |
96.66 |
97.77 |
|
|
F1 Score |
93.41 |
92.22 |
92.55 |
92.9 |
92.66 |
91.95 |
94.11 |
93.54 |
95.65 |
|
|
RTML |
Accuracy |
96.15 |
96.15 |
88.46 |
96.15 |
96.15 |
96.15 |
94.23 |
94.23 |
96.15 |
|
Precision |
96.15 |
96.15 |
81.25 |
92.86 |
96.15 |
96.15 |
92.59 |
92.59 |
96.15 |
|
|
Recall |
96.15 |
96.15 |
100 |
100 |
96.15 |
96.15 |
96.15 |
96.15 |
96.15 |
|
|
F1 Score |
96.15 |
96.15 |
89.66 |
96.3 |
96.15 |
96.15 |
94.33 |
94.33 |
96.15 |
|
|
ILPD |
Accuracy |
87.22 |
86.47 |
81.2 |
84.96 |
85.71 |
81.95 |
85.71 |
87.21 |
88.72 |
|
Precision |
85.71 |
84.71 |
77.08 |
93.85 |
80.85 |
78.49 |
90.27 |
92.85 |
94.28 |
|
|
Recall |
93.51 |
93.51 |
96.1 |
79.22 |
98.7 |
94.8 |
84.41 |
84.41 |
85.71 |
|
|
F1 Score |
89.44 |
88.89 |
85.55 |
85.92 |
88.89 |
85.88 |
87.24 |
88.43 |
89.48 |
|
|
ESDRPD |
Accuracy |
85.53 |
76.32 |
73.68 |
86.84 |
85.53 |
73.68 |
75 |
78.95 |
80.26 |
|
Precision |
93.62 |
97.22 |
100 |
100 |
93.62 |
99.98 |
82.35 |
95 |
95.12 |
|
|
Recall |
84.62 |
67.31 |
61.54 |
80.77 |
84.62 |
61.54 |
80.77 |
73.08 |
75 |
|
|
F1 Score |
88.89 |
79.55 |
76.19 |
89.36 |
88.89 |
76.19 |
81.55 |
82.61 |
83.87 |
|
|
CKD |
Accuracy |
94.17 |
93.33 |
93.33 |
96.67 |
96.67 |
93.01 |
92.86 |
93.57 |
96.43 |
|
Precision |
100 |
100 |
100 |
100 |
100 |
99.98 |
92.65 |
99.98 |
97.01 |
|
|
Recall |
90.67 |
89.33 |
89.33 |
94.67 |
94.67 |
86.11 |
92.65 |
86.76 |
95.59 |
|
|
F1 Score |
95.1 |
94.37 |
94.37 |
97.26 |
97.26 |
92.54 |
92.65 |
92.91 |
96.3 |
Some of the literature key performance metric comparisons between classical and existing quantum algorithms across the six diabetes datasets are presented in Table 8.
Using the proposed preprocessing phase, the classical standard classifiers achieved the following results: For the PIMA dataset, Adaptive Boosting Technique attained the highest accuracy and F1 Score of 94.97 and 96.87%, respectively. In the case of the Type-2 Diabetes dataset, Extreme Gradient Boosting achieved an accuracy of 94.96% and an F1 Score of 95.65%.
Table 8: Summary of Key Literature Results on Various Diabetes Datasets
|
Reference |
Dataset Used |
Preprocess Techniques |
Classical Classifier |
Test Acc. (%) |
Quantum Classifier |
Test Acc. (%) |
|
Islam et al. [5] |
Chronic Kidney Disease |
Applied |
AdaBoost |
98.3 |
Not Applied |
None |
|
XGBoost |
99.1 |
|||||
|
SVM |
96.7 |
|||||
|
KNN |
59 |
|||||
|
NB |
88.3 |
|||||
|
Donaire et al. [7] |
Combined Pima and RTML |
Applied |
LR |
75.6 |
Not Applied |
None |
|
KNN |
68.18 |
|||||
|
XGB |
83.22 |
|||||
|
RF |
80.68 |
|||||
|
Safriandono et al. [10] |
Indian Liver Patient (ILPD) |
Applied |
Without QFE |
With QFE |
||
|
SVM |
72 |
QFE-SVM |
75 |
|||
|
RF |
69 |
QFE-RF |
78 |
|||
|
XGB |
69 |
QFE-XGB |
81 |
|||
|
Rubini et al. [18] |
Indian Liver Ptient (ILPD) |
Applied (SMOTE-ENN) |
LR |
79.72 |
Not Applied |
None |
|
SVM |
78.37 |
|||||
|
RF |
87.83 |
|||||
|
KNN |
91.89 |
|||||
|
XGB |
90.54 |
|||||
|
Feynman [8] |
ILPD |
Applied |
- |
- |
QML-Liver+ SMOTE |
75 |
|
Not Applied |
- |
- |
QML-Liver |
83 |
||
|
Proposed Algorithm |
PIMA |
Applied |
RF |
93.85 |
Proposed Quantum Circuit |
96 |
|
Type 2 |
SVM |
92.45 |
97.35 |
|||
|
RTML |
SVM, LR, RF, NB |
96.15 |
97.92 |
|||
|
ILPD |
SVM |
87.22 |
90.24 |
|||
|
ESDRPD |
RF |
86.84 |
98.65 |
|||
|
CKD |
RF, NB |
96.67 |
97.9 |
|||
For the RTML dataset, all classifiers performed competitively with an accuracy of around 96.15%, except KNN, which achieved a comparatively lower accuracy of 88.46%; however, in terms of F1 Score, RF achieved the highest value of 96.30%. For the ILPD dataset, Extreme Gradient Boosting recorded the best accuracy of 88.72% and an F1 Score of 89.48%. In the ESDRPD dataset, RF again outperformed other classifiers with 86.84% accuracy and 89.36% F1 Score. Finally, for the CKD dataset, both RF and Naive Bayes (NB) achieved the highest performance, with 96.67% accuracy and 97.26% F1 Score. The detailed description of results for all classifiers Table 9: Performance Comparison between best classical classifier baseline and the proposed quantum circuist across the datasets are summarized in Table 7.
The graphical representation comparing the proposed quantum circuit’s accuracy with the preprocessed classical classifiers is shown in Figure 6.
Table 9: Performance Comparison Between Best Classical and Proposed Quantum Classifier
|
Dataset |
Category |
Best Classical |
Metric (%) |
Score (%) |
Epoch (Proposed) |
|
|
Classical |
Proposed QML |
|||||
|
PIMA |
Diabetes Classification |
AdaBoost |
Accuracy |
94.97 |
96 |
20 |
|
F1 Score |
95.38 |
96.15 |
||||
|
Type-2 |
Diabetes Classification |
XGBoost |
Accuracy |
94.96 |
97.35 |
20 |
|
F1 Score |
95.65 |
97.5 |
||||
|
RTML |
Diabetes Classification |
SVM |
Accuracy |
96.15 |
97.92 |
10 |
|
F1 Score |
96.15 |
98.04 |
||||
|
ESDRPD |
Diabetes Classification |
Random Forest |
Accuracy |
86.84 |
98.65 |
10 |
|
F1 Score |
89.36 |
98.66 |
||||
|
ILPD |
Liver Disease Classification |
XGBoost |
Accuracy |
88.72 |
90.24 |
20 |
|
F1 Score |
89.48 |
89.47 |
||||
|
CKD |
Kidney Disease Classification |
Random Forest |
Accuracy |
96.67 |
97.9 |
10 |
|
F1 Score |
97.26 |
97.84 |
||||
Figure 6: Classification Accuracy Between Classical Models and the Proposed Quantum Method
Similarly, the visual histogram representation comparing the proposed quantum circuit’s F1 Score with the preprocessed classical classifiers is illustrated in Figure 7.
By referring to the statistical metrics and the clear visualizations in Figure 6 and 7, we conclude that the results highlight the effectiveness of the proposed Differentiable Quantum Circuit algorithm, which achieves the highest F1 Score with a minimal number of false positives and false negatives in diabetes classification. This architecture, incorporating data re-uploading, dynamic entanglement and separate target qubits, demonstrates strong capability in learning complex data distributions and generalizing to unseen data. Table 9 presents the performance comparison of Accuracy and F1 Score between the best-performing classical baseline classifier and the proposed Differentiable Hybrid Classical-Quantum Circuit across diabetes, liver disease and chronic kidney disease classification datasets, along with the number of epochs required for convergence by the proposed model. Bold values indicate the superior score in each metric.
Classical machine learning models’ performance is heavily relied upon by the distribution and characteristics of features in underlying data of individual datasets, that have different performance in various medical classification tasks. In contrast, the proposed differentiable hybrid classical-quantum framework shows conceptually that Great performance stability and consistently best performance in various categories of datasets. This work was mainly geared towards diabetes classification, but some experiments are also done on a different application, which is experiments performed on liver disease and chronic kidney disease datasets further validates the robustness, adaptability and generalization ability of the proposed quantum framework.
Figure 7: Classification F1 Score Between Classical Models and the Proposed Quantum Method
The proposed Differential Quantum Circuit (DQC) framework with the Classical PCA feature compression classifies diabetes disease with resampled dataset as shown in this study. For six diabetes datasets, the proposed model is used to find structural patterns in the features that are projected onto the PCA and a penalized binary cross-entropy cost function is used to prevent overfitting. Specifically, the model has demonstrated rapid convergence, converging to high accuracy within 10-20 training epochs, showcasing excellent generalization performance and learning of the underlying data distributions with few iterations. The high classification accuracy and F1-scores confirm the effectiveness of the proposed variational ansatz to improve the feature extraction and decrease the quantum circuit execution. This efficiency is the most beneficial when implementing on NISQ devices that have a limited number of qubits. In addition, the proposed model is always superior to the classical classifiers with preprocessed data on all assessment sets. Its good AUC-ROC scores also validate its strong discriminative power for distinguishing diabetic from non-diabetic cases. Putting all these results together suggests that the proposed quantum framework could be useful in the development of practical quantum machine learning real life applications.
Limitations
Although the proposed Differentiable Hybrid Classical-Quantum Circuit demonstrates outperformed multiple widely-used classical baseline classifiers, the current implementation is solely tested with the PennyLane simulator. A practical quantum device is a device that is practical for intermediate scale quantum technologies, which is known as the NISQ era. An open quantum system can be disturbed by environmental noise and decoherence because they are in a state of superposition, resulting in information loss [19]. If noise reduction and quantum error correction methods don’t work, the claimed performance could suffer in quantum devices. So, the proposed framework is currently more reliable in the simulated closed quantum system containing error correction strategies.
Acknowledgement
The first author expresses gratitude to Vellore Institute of Technology, Vellore, for providing financial support that enabled this research work. The authors also thank the anonymous reviewers for their valuable comments and suggestions.