Comparative Analysis of Classical and Quantum Machine Learning Algorithms in Breast Cancer Classification | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Comparative Analysis of Classical and Quantum Machine Learning Algorithms in Breast Cancer Classification Kelvin Mpofu, Patience Mthunzi-Kufa This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9675941/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract This study presents a comparison between classical machine learning (ML) algorithms and their quantum-enhanced counterparts in classifying scikit’s breast cancer dataset. Specifically, the research focused on evaluating the accuracy and time computational efficiency of quantum-enhanced machine learning (QEML) algorithms against traditional or classical machine learning algorithms. The quantum algorithms employed include the quantum support vector machine (qSVM), variational quantum classifier (VQC) and quantum k-nearest neighbor (qkNN). The qSVM and qkNN algorithms discussed here are really kernel-based hybrid classical-quantum algorithms as opposed to fully quantum algorithms and the VQC is a hybrid classical-quantum algorithm. These algorithms were tested against their classical equivalents: support vector machine (SVM), k-nearest neighbor (kNN), and artificial neural network (ANN). The qSVM algorithm demonstrated an 90% accuracy in distinguishing malignant from benign cancer cases (the classical support vector machine algorithm had a 99% accuracy), while qkNN achieved 90% accuracy (the classical kNN algorithm had an accuracy of 97%), and VQC reported 88.77± 0.26% (averaged over 5 runs) (this was compared with an ANN which had an accuracy of 96%). The accuracies of the classical SVM, kNN, and ANN algorithms were recorded, to provide a basis for comparison. The results indicated that while QEML algorithms perform reasonably well in classification tasks, however they do not consistently outperform classical algorithms. Additionally, the study measured the time efficiency of each algorithm. The ANN required 33.8 seconds, kNN required 0.21 seconds, and SVM required 1.98 seconds to perform the classification tasks. In contrast, the quantum algorithms were significantly slower, with the VQC taking 632.53 seconds, qkNN requiring 495.34 seconds, and qSVM requiring 538.05 seconds (This is not fixed per run but give an impression of the time scales to run the algorithms). We emphasize that this simulation runtime does not reflect actual quantum hardware performance, where gate execution and circuit depth constraints differ significantly. To mitigate this ambiguity, we distinguish between simulation runtime and estimated quantum runtime where relevant. This work potentially highlights the cases where it may not offer any advantage to use quantum machine learning algorithms. The Receiver Operating Characteristic (ROC) curve and the Area Under the Curve (AUC) analysis are also considered in this work where the values measured for the SVM, kNN and ANN were 99%, 99% and 99% respectively and for the qSVM, qkNN and VQC were 87%, 86% and 86± 0.2% (averaged over 5 runs) respectively. Overall, this research contributes valuable insights into the comparative performance of classical and quantum ML algorithms in a specific application, underscoring the potential and current limitations of quantum approaches in machine learning tasks. Hyperparameter optimization was done for all the algorithms, both quantum and classical, with Optuna. This was primarily because the QEML algorithms had more parameters and required considerable computational resources to optimize. This could have influenced the performance outcomes and is the basis for future work. The development of key comparison criteria is critical in the development of quantum machine learning, and this work offers some building blocks for this. Artificial Intelligence and Machine Learning Quantum machine learning hyperparameter optimization classical machine learing cancer diagnostics Full Text Additional Declarations The authors declare no competing interests. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-9675941","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":638017582,"identity":"590004d0-0f7c-4207-8ce3-215728b36b7d","order_by":0,"name":"Kelvin Mpofu","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAwUlEQVRIiWNgGAWjYBACCRBRwWDDwMBMkpYzDGmkazlMgsMkp509+OBg23l5+XbeBww/Khjs+RsIaJGWzks2ONh223DDYXYDxp4zDMwSBwhokZPOMZP+2HY7wYCZjYGZsY2BjYEYLRIH284lyDdDtPDIE9IiDdFyIIHhMESLhAEhLZKzgX45cC4Z6Bc2hoM9ZyQMDAlpkbide/DBgTI7efn+Y4wPflTY2MsR0sLAwINgHoDGEwlaRsEoGAWjYBRgBQBcszf7ODcDnAAAAABJRU5ErkJggg==","orcid":"https://orcid.org/0000-0001-8986-2253","institution":"Council of Scientific and Industrial Research (CSIR)","correspondingAuthor":true,"prefix":"","firstName":"Kelvin","middleName":"","lastName":"Mpofu","suffix":""},{"id":638017583,"identity":"885a2901-a632-42c6-a832-5d1100743e2e","order_by":1,"name":"Patience Mthunzi-Kufa","email":"","orcid":"https://orcid.org/0000-0003-1664-7995","institution":"University of South Africa (UNISA)","correspondingAuthor":false,"prefix":"","firstName":"Patience","middleName":"","lastName":"Mthunzi-Kufa","suffix":""}],"badges":[],"createdAt":"2026-05-11 07:22:38","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-9675941/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9675941/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":109097395,"identity":"cd53e70d-db1f-480e-a066-3b12ee074727","added_by":"auto","created_at":"2026-05-12 14:08:33","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1950296,"visible":true,"origin":"","legend":"","description":"","filename":"ComparisonofQuantumversusClassicalMachinelearningalgorithms2.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9675941/v1_covered_7f153990-d672-4043-9642-4821302a6216.pdf"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003eComparative Analysis of Classical and Quantum Machine Learning Algorithms in Breast Cancer Classification\u003c/p\u003e","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Quantum machine learning, hyperparameter optimization, classical machine learing, cancer, diagnostics","lastPublishedDoi":"10.21203/rs.3.rs-9675941/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9675941/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThis study presents a comparison between classical machine learning (ML) algorithms and their quantum-enhanced counterparts in classifying scikit’s breast cancer dataset. Specifically, the research focused on evaluating the accuracy and time computational efficiency of quantum-enhanced machine learning (QEML) algorithms against traditional or classical machine learning algorithms. The quantum algorithms employed include the quantum support vector machine (qSVM), variational quantum classifier (VQC) and quantum k-nearest neighbor (qkNN). The qSVM and qkNN algorithms discussed here are really kernel-based hybrid classical-quantum algorithms as opposed to fully quantum algorithms and the VQC is a hybrid classical-quantum algorithm. These algorithms were tested against their classical equivalents: support vector machine (SVM), k-nearest neighbor (kNN), and artificial neural network (ANN). The qSVM algorithm demonstrated an 90% accuracy in distinguishing malignant from benign cancer cases (the classical support vector machine algorithm had a 99% accuracy), while qkNN achieved 90% accuracy (the classical kNN algorithm had an accuracy of 97%), and VQC reported 88.77± 0.26% (averaged over 5 runs) (this was compared with an ANN which had an accuracy of 96%). The accuracies of the classical SVM, kNN, and ANN algorithms were recorded, to provide a basis for comparison. The results indicated that while QEML algorithms perform reasonably well in classification tasks, however they do not consistently outperform classical algorithms. Additionally, the study measured the time efficiency of each algorithm. The ANN required 33.8 seconds, kNN required 0.21 seconds, and SVM required 1.98 seconds to perform the classification tasks. In contrast, the quantum algorithms were significantly slower, with the VQC taking 632.53 seconds, qkNN requiring 495.34 seconds, and qSVM requiring 538.05 seconds (This is not fixed per run but give an impression of the time scales to run the algorithms). We emphasize that this simulation runtime does not reflect actual quantum hardware performance, where gate execution and circuit depth constraints differ significantly. To mitigate this ambiguity, we distinguish between simulation runtime and estimated quantum runtime where relevant. This work potentially highlights the cases where it may not offer any advantage to use quantum machine learning algorithms. The Receiver Operating Characteristic (ROC) curve and the Area Under the Curve (AUC) analysis are also considered in this work where the values measured for the SVM, kNN and ANN were 99%, 99% and 99% respectively and for the qSVM, qkNN and VQC were 87%, 86% and 86± 0.2% (averaged over 5 runs) respectively. Overall, this research contributes valuable insights into the comparative performance of classical and quantum ML algorithms in a specific application, underscoring the potential and current limitations of quantum approaches in machine learning tasks. Hyperparameter optimization was done for all the algorithms, both quantum and classical, with Optuna. This was primarily because the QEML algorithms had more parameters and required considerable computational resources to optimize. This could have influenced the performance outcomes and is the basis for future work. The development of key comparison criteria is critical in the development of quantum machine learning, and this work offers some building blocks for this.\u003c/p\u003e","manuscriptTitle":"Comparative Analysis of Classical and Quantum Machine Learning Algorithms in Breast Cancer Classification","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-05-12 13:47:13","doi":"10.21203/rs.3.rs-9675941/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"0ec7dbe2-8322-4617-9396-35928e9f5c78","owner":[],"postedDate":"May 12th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":68017064,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2026-05-12T13:47:13+00:00","versionOfRecord":[],"versionCreatedAt":"2026-05-12 13:47:13","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9675941","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9675941","identity":"rs-9675941","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.