Publication Date
7-22-2026
Document Type
Article
Publication Title
IEEE Access
Volume
14
DOI
10.1109/ACCESS.2026.3716184
First Page
112622
Last Page
112638
Abstract
Quantum computing is inherently abstract and often counterintuitive from the perspective of classical physics. For learners to develop a deeper understanding, it is useful to study a practical example thoroughly, from its mathematical formalism to quantum circuit implementation. Shor's algorithm for period finding, which can then be used for prime factorization, is demonstrated in this paper due to its practical significance. While numerous publications on Shor's algorithm exist, they tend to focus on advanced theoretical analysis, specific implementation details, or narrowly defined research aspects; consequently, they are often not well-suited for educational purposes for beginning and intermediate learners. This paper presents a rigorous step-by-step walkthrough of Shor's algorithm, utilizing the conventional approach, and discusses the construction of the quantum oracle with illustrative numerical examples. This is followed by classical simulations and implementations on actual quantum hardware. The aim is to allow learners with minimal mathematical background to follow and understand the algorithm. Through this process, the paper also attempts to interpret and connect the key underlying quantum computing concepts of superposition, entanglement, interference, quantum oracle, and phase kick-back that are often assumed to be trivial and omitted in research papers, yet are particularly challenging for novice learners to internalize. In the numerical examples, reduced-qubit cases are included. By contrasting the results from the reduced-qubit configurations with the standard ones, learners can better appreciate the key enablers in Shor's algorithm and how the accuracy decreases with a smaller number of qubits. Moreover, reduced-qubit examples (e.g., 5 qubits) are small enough to be implemented in a hardware emulator, such as a low-cost and low-capacity Field Programmable Gate Array (FPGA), which can be used in experimental hardware classes for students to understand how to use an FPGA to simulate quantum circuits.
Funding Number
2125906
Funding Sponsor
National Science Foundation
Keywords
inverse quantum Fourier transform (IQFT), quantum education, quantum Fourier transform (QFT), quantum phase estimation (QPE), Shor s algorithm
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Department
Physics and Astronomy; Electrical Engineering
Recommended Citation
Trung Nguyen, Samuel Petruescu, Shrikant Jadhav, and Hiu Yung Wong. "A Step-by-Step Shor's Algorithm Walkthrough: From Theory to Implementation" IEEE Access (2026): 112622-112638. https://doi.org/10.1109/ACCESS.2026.3716184