Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Shor Factoring Algorithm and the Quantum Fourier Transform

Alice Flarend, Robert Hilborn

Published Jul 9, 2026• 0 citations
Publisher

Abstract

Abstract Expanding on the factoring and periodicity in Chapter 14, the Shor algorithm is explained in detail, with a warning that this is one of the toughest chapters in the book. While the steps of Shor algorithm may look just like the RSA in reverse, the quantum computer is needed to find the periodicity of the factors and thereby the prime factors themselves. Fourier analysis is the tool for this. The quantum Fourier transform is described, including the quantum circuit, after first showing what the classical Fourier transform accomplishes. Extensive examples of all the steps are given.

DOI
10.1093/oso/9780197904930.003.0015

Related papers

RSA Encryption and the Shor Factoring Algorithm

Alice Flarend, Bob Hilborn

Abstract This chapter is the most formidable in the book, but it provides a deep and complete understanding of the classic Shor factoring algorithm. Alice and Bob set the context for the algorithm by explaining how the difficulty of factoring large numbers plays a critical role in securing encrypted communications channels, using RSA encryption as an example. The Shor algorithm, if implemented on a sufficiently large quantum computer, could defeat those encryption schemes by finding those factors relatively quickly, a task that would take years or more on even the fastest classical supercomputers. Alice and Bob lead us through some number theory to establish the connection between factoring and finding the period of a periodic function. They then show how the clever use of quantum algorithms—this is Shor’s main contribution—leads to a fast way to find the required period using quantum Fourier transforms.

•Apr 15, 2022•0 citations

Implementation of the Shor Algorithm on a Quantum Circuit

Alexei Petrenko, Sergei Petrenko

This chapter analyzes the applicability of Fourier transformations to determine the periodic structure of finite-length sequences. The classical factorization problem is reformulated to solve it on modern quantum computers with 16 or more qubits. The chapter presents Shor's algorithm for factorization of natural numbers. Performing two basic quantum operations is required to implement the described Shor algorithm, namely exponentiation and quantum discrete Fourier transformation. The chapter estimates the amount of quantum resources needed to solve some asymmetric cryptographic problems using derivatives of the Shor algorithm, with different parameters of these problems, and compares them with the complexity of solving the iterative problem when searching for the key of a symmetric cryptosystem. Using the example of solving the problem of finding the exponent (multiplicative order) of a simple integer modulo by another simple integer, the chapter shows the main features of modeling and engineering implementation of the quantum Shor algorithm.

River Publishers eBooks•Feb 7, 2023•0 citations

Simulation of a Quantum Prime Factoring Algorithm

Elizabeth Ellen Parsons

The intent of this thesis is to elucidate the quantum computing algorithm developed by Peter Shor called Shor's algorithm. We will provide a detailed description and simulation of the algorithm using MATLAB. Precursory information regarding quantum phenomena such as superposition, entanglement, and Dirac notation, will be described in great detail so that the reader may have a better understanding of the operations in Shor's algorithm. Quantum computers store and transport information quite differently than their classical counterparts. We will provide a quick overview of these differences to high- light the benefit of utilizing quantum phenomena in a computer in order to create massive parallel computations. Thus, reducing the complexity time for classical algorithms used to solve problems such as the prime factorization problem and the period finding problem. The Quantum Fourier Transform is a principle component in Shor's algorithm. We will explicitly define the Quantum Fourier Transform and show that it is a unitary transformation. We will also show how the Quantum Fourier Transform, as well as another unitary transformation called the Hadamard transform, functions in Shor's algorithm. One of the initial parameters in Shor's algorithm is to select a random variable. We will examine the erratic effects of this random variable as well as how it effects the probability of us successfully reducing an integer into a product of two primes. We will provide a thorough analysis of the randomness in Shor's algorithm. We will also show how measuring the state of our quantum system as well as selecting a suitable random variable impacts finding the period of the Quantum Fourier Transform which in turn will either give a high or low probability of obtaining a factor of some integer.

•Jan 1, 2016•0 citations

Shor's Algorithm: Factoring and Cryptanalysis

Bhupendra Singh, Mohankumar Mylsamy, Thamaraimanalan Thangarajan

“Shor's Algorithm: Factoring and Cryptanalysis” focuses on Shor's Algorithm, particularly its application to factoring and cryptanalysis. It begins with an overview of Shor's algorithm, detailing the classical extraction of periods from measured values and the quantum gates required for the Quantum Fourier Transform (QFT). Further, this chapter explores the applications and limitations of Shor's algorithm, including its impact on RSA encryption. A literature review follows, discussing Shor's algorithm in the context of quantum computation, its effectiveness on RSA, and the effects of imperfections on its factorization process. The section also includes an experimental study of Shor's algorithm using IBM Q, followed by a practical implementation of factoring numbers N=21 and N=35. Further, it covers resource estimation, quantum simulations, and different types of simulators in IBM Qiskit, including state vector, QASM, Matrix Product State (MPS), and stabilizer simulators, providing insights into their use cases and the limits of classical simulation.

CRC Press eBooks•Nov 14, 2025•0 citations

Shor's algorithm

Nežka Rugelj

In this diploma paper we present the Shor’s algorithm for factorising numbers, which runs on quantum computers. Initially, we explain the basics of quantum computing. Afterwards, we present a general review of the Fourier and the discrete Fourier transform, from which we derive the quantum Fourier transform. In the last part, we first give a short introduction to modular arithmetics. Later on, we describe the concept of factorization that is used in Shor’s algorithm. Diploma thesis ends with a detailed review of how the algorithm works on quantum computers and a simple example.

•Jan 1, 2017•0 citations

Quantum Fourier Transform and Applications

Eduardo R. Mucciolo

Because of quantum interference, quantum computers are very efficient at finding and enhancing periodic structures in data. In 1994, Peter Shor introduced the first quantum algorithm that explored this property to solve a mathematical problem of great practical importance: factoring semi-prime numbers. To understand the algorithm (warning: it is not simple!), we need first to review some math.

CRC Press eBooks•Aug 6, 2025•0 citations
Abstract Expanding on the factoring and periodicity in Chapter 14, the Shor algorithm is explained in detail, with a warning that this is one of the toughest chapters in the book. While the steps of Shor algorithm may look just like the RSA in reverse, the quantum computer is needed to find the periodicity of the factors and thereby the prime factors themselves. Fourier analysis is the tool for this. The quantum Fourier transform is described, including the quantum circuit, after first showing what the classical Fourier transform accomplishes. Extensive examples of all the steps are given.
Abstract This chapter is the most formidable in the book, but it provides a deep and complete understanding of the classic Shor factoring algorithm. Alice and Bob set the context for the algorithm by explaining how the difficulty of factoring large numbers plays a critical role in securing encrypted communications channels, using RSA encryption as an example. The Shor algorithm, if implemented on a sufficiently large quantum computer, could defeat those encryption schemes by finding those factors relatively quickly, a task that would take years or more on even the fastest classical supercomputers. Alice and Bob lead us through some number theory to establish the connection between factoring and finding the period of a periodic function. They then show how the clever use of quantum algorithms—this is Shor’s main contribution—leads to a fast way to find the required period using quantum Fourier transforms.
This chapter analyzes the applicability of Fourier transformations to determine the periodic structure of finite-length sequences. The classical factorization problem is reformulated to solve it on modern quantum computers with 16 or more qubits. The chapter presents Shor's algorithm for factorization of natural numbers. Performing two basic quantum operations is required to implement the described Shor algorithm, namely exponentiation and quantum discrete Fourier transformation. The chapter estimates the amount of quantum resources needed to solve some asymmetric cryptographic problems using derivatives of the Shor algorithm, with different parameters of these problems, and compares them with the complexity of solving the iterative problem when searching for the key of a symmetric cryptosystem. Using the example of solving the problem of finding the exponent (multiplicative order) of a simple integer modulo by another simple integer, the chapter shows the main features of modeling and engineering implementation of the quantum Shor algorithm.
The intent of this thesis is to elucidate the quantum computing algorithm developed by Peter Shor called Shor's algorithm. We will provide a detailed description and simulation of the algorithm using MATLAB. Precursory information regarding quantum phenomena such as superposition, entanglement, and Dirac notation, will be described in great detail so that the reader may have a better understanding of the operations in Shor's algorithm. Quantum computers store and transport information quite differently than their classical counterparts. We will provide a quick overview of these differences to high- light the benefit of utilizing quantum phenomena in a computer in order to create massive parallel computations. Thus, reducing the complexity time for classical algorithms used to solve problems such as the prime factorization problem and the period finding problem. The Quantum Fourier Transform is a principle component in Shor's algorithm. We will explicitly define the Quantum Fourier Transform and show that it is a unitary transformation. We will also show how the Quantum Fourier Transform, as well as another unitary transformation called the Hadamard transform, functions in Shor's algorithm. One of the initial parameters in Shor's algorithm is to select a random variable. We will examine the erratic effects of this random variable as well as how it effects the probability of us successfully reducing an integer into a product of two primes. We will provide a thorough analysis of the randomness in Shor's algorithm. We will also show how measuring the state of our quantum system as well as selecting a suitable random variable impacts finding the period of the Quantum Fourier Transform which in turn will either give a high or low probability of obtaining a factor of some integer.
“Shor's Algorithm: Factoring and Cryptanalysis” focuses on Shor's Algorithm, particularly its application to factoring and cryptanalysis. It begins with an overview of Shor's algorithm, detailing the classical extraction of periods from measured values and the quantum gates required for the Quantum Fourier Transform (QFT). Further, this chapter explores the applications and limitations of Shor's algorithm, including its impact on RSA encryption. A literature review follows, discussing Shor's algorithm in the context of quantum computation, its effectiveness on RSA, and the effects of imperfections on its factorization process. The section also includes an experimental study of Shor's algorithm using IBM Q, followed by a practical implementation of factoring numbers N=21 and N=35. Further, it covers resource estimation, quantum simulations, and different types of simulators in IBM Qiskit, including state vector, QASM, Matrix Product State (MPS), and stabilizer simulators, providing insights into their use cases and the limits of classical simulation.
In this diploma paper we present the Shor’s algorithm for factorising numbers, which runs on quantum computers. Initially, we explain the basics of quantum computing. Afterwards, we present a general review of the Fourier and the discrete Fourier transform, from which we derive the quantum Fourier transform. In the last part, we first give a short introduction to modular arithmetics. Later on, we describe the concept of factorization that is used in Shor’s algorithm. Diploma thesis ends with a detailed review of how the algorithm works on quantum computers and a simple example.