kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
A comparative study on Shor’s quantum algorithm and classical integer factorization algorithms based on runtime and accuracy
KTH, School of Electrical Engineering and Computer Science (EECS).
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
En jämförande studie av Shors algoritm och klassiska heltalsfaktoriseringsalgoritmer baserat på exekveringstid och noggrannhet (Swedish)
Abstract [en]

Quantum computing has sparked much interest and discussion in recent years due to its potential in speeding up computations and algorithms that can revolutionize multiple technical fields. In this study, we have used a quantum integer factorization algorithm and compared it with classical algorithms in terms of runtime and accuracy. In particular, the comparison involved Shor’s algorithm against Trial division and Pollard’s Rho algorithm for factoring the integer N = 15. IBM’s Qiskit library in Python was used to implement and simulate the quantum circuits necessary to run Shor’s algorithm. The Shor’s implementation was coded specifically for factoring N = 15 due to larger integers requiring significantly more resources to simulate. It was found that Shor’s algorithm was slower and less accurate than the classical counterparts. This was due to using a simulator instead of real quantum hardware and only being able to run the algorithm on a small integer value such as N = 15. However, in the future, if a similar study is conducted on real quantum hardware and on larger integers, it is possible that the results will be vastly different.

Abstract [sv]

Kvantberäkningar har väckt mycket intresse och diskussion under de senaste åren på grund av dess möjligheter att effektivisera beräkningar och algoritmer inom flera tekniska områden. I denna studie har vi använt en kvantalgoritm för faktorisering av heltal och jämfört denna med klassiska algoritmer utifrån ex-ekveringstid och noggrannhet. Jämförelsen i fråga involverade Shors algoritm gentemot Trial division (eng.) och Pollards Rho-algoritm för att faktorisera heltalet N = 15. IBM:s Qiskit bibliotek i Python användes i syfte att implementera och simulera kvantkretsarna som var nödvändiga för att köra Shors algoritm. Implementationen av Shors algoritm kodades specifikt för faktorisering av N = 15 på grund av att simuleringen av större heltal kräver betydligt mer resurser. Det visade sig att Shors algoritm var långsammare och mindre precis än de klassiska algoritmerna. Detta orsakades till följd av att en simulator användes istället för faktisk kvanthårdvara och att faktoriseringen tillämpades på ett litet heltalsvärde som N = 15. Dock, om en liknande framtida studie genomförs på kvanthårdvara och på större heltal skulle det vara möjligt att resultaten blir betydligt olika.

Place, publisher, year, edition, pages
2025. , p. 33
Series
TRITA-EECS-EX ; 2025:310
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-367649OAI: oai:DiVA.org:kth-367649DiVA, id: diva2:1985720
Supervisors
Examiners
Available from: 2025-08-05 Created: 2025-07-27 Last updated: 2025-08-05Bibliographically approved

Open Access in DiVA

fulltext(767 kB)147 downloads
File information
File name FULLTEXT01.pdfFile size 767 kBChecksum SHA-512
68519ebf5196567e7748bd5850b8d16686665a165ea2d9e9da1311bad3a008ec8eecf89ceb19c8ffdca343ab1af665ac18c92f5905ebfbaf922e6e2d6fd01858
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 149 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 325 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf