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

arXiv:1712.07311 · Quantum

Optimising Matrix Product State Simulations of Shor's Algorithm

Aidan Dang, Charles D. Hill, Lloyd C. L. Hollenberg

Published Jan 25, 2019• 43 citations
arXivHTMLPDF

Abstract

We detail techniques to optimise high-level classical simulations of Shor's quantum factoring algorithm. Chief among these is to examine the entangling properties of the circuit and to effectively map it across the one-dimensional structure of a matrix product state. Compared to previous approaches whose space requirements depend on r , the solution to the underlying order-finding problem of Shor's algorithm, our approach depends on its factors. We performed a matrix product state simulation of a 60-qubit instance of Shor's algorithm that would otherwise be infeasible to complete without an optimised entanglement mapping.

DOI
10.22331/q-2019-01-25-116

Related papers

Distributed Matrix Product State Simulations of Large-Scale Quantum Circuits

Aidan Dang

Before large-scale, robust quantum computers are developed, it is valuable to be able to classically simulate quantum algorithms to study their properties.To do so, we developed a numerical library for simulating quantum circuits via the matrix product state formalism on distributed memory architectures.By examining the multipartite entanglement present across Shor's algorithm, we were able to effectively map a high-level circuit of Shor's algorithm to the one-dimensional structure of a matrix product state, enabling us to perform a simulation of a specific 60 qubit instance in approximately 14 TB of memory: potentially the largest non-trivial quantum circuit simulation ever performed.We then applied matrix product state and matrix product density operator techniques to simulating one-dimensional circuits from Google's quantum supremacy problem with errors and found it mostly resistant to our methods.Most importantly, I give my gratitude to Doctor Charles Hill and Professor Lloyd Hollenberg for their guidance and vision in directing this work, for providing me with the resources necessary to produce the results of this thesis and for pushing me to realise my potential.In aiding the development of our numerical library and the production of our results, I acknowledge that this work was supported by resources provided by the Pawsey Supercomputing Centre with funding from the Australian Government and the Government of Western Australia.To The University of Melbourne, and especially the School of Physics, I am thankful to have been in an environment that would fuel the growth of my abilities.In order that I may focus on my studies, I would also like to thank Ms Rose Cooney, Ms Jenny de Boer and Associate Professor Michelle Livett for greatly simplifying the daunting administrative matters that I was faced with.Finally, to all the friends, classmates, teachers and students that I have ever had, and anyone else I have ever learned something from, I hope that you might have gained something from me in return.

•Jan 1, 2017•2 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

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

Matrix Product Operator Simulations of Quantum Algorithms

Kieran J. Woolfe

We develop simulation methods for matrix product operators, and perform simulations of the Quantum Fourier Transform, Shor’s algorithm and Grover’s algorithm using matrix product states and matrix product operators. By doing so, we provide numerical evidence that a constant number of QFTs can be efficiently classically simulated on any state whose Schmidt rank grows only polynomially with the number of qubits, and quantify the amount of entanglement present in Shor’s algorithm. The efficiency of the matrix product state and operator representation allows us to perform moderately large simulations of both Shor’s algorithm with Z errors and Grover’s algorithm with up to 15 X, Y and Z errors. While larger simulations have been performed, our results have been computed with little computational power and provide new methods to perform large-scale quantum algorithm simulations.

•Feb 1, 2015•6 citations

Entanglement in Shor's Factoring Algorithm

Jianing Tan, Zhihao Liu, Hanwu Chen

Quantum algorithms are well known for their higher efficiency compared to their classical counterparts.However, the origin of the speed-up offered by quantum algorithms is a debatable question.Using entanglement measure based on coefficient matrix, we investigate the entanglement features of the quantum states used in Shor's factoring algorithm.The results show that if and only if the order r is 1, the algorithm generates no entanglement.Finally, compare with published studies results (Proceedings: Mathematical, Physical and Engineering Sciences, 459(2036): 2011-2032, 2003, Physical Review A, 72(6): 062308, 2005), we give counter examples to show that previous researches neglect partially entanglement.

•Mar 28, 2020•0 citations

Entanglement simulations of Shor's algorithm

S. Parker, Martin Bodo Plenio

We demonstrate that, in the case of Shor's algorithm for factoring, highly mixed states will allow efficient quantum computation, indeed factorization can be achieved efficiently with just one initial pure qubit and a supply of initially maximally mixed qubits (Parker, S. and Plenio, M. B., 2000, Phys. Rev. Lett., 85, 3049). This leads us to ask how this affects the entanglement in the algorithm. We thus investigate the behaviour of entanglement in Shor's algorithm for small numbers of qubits by classical computer simulation of the quantum computer at different stages of the algorithm. We find that entanglement is an intrinsic part of the algorithm and that the entanglement through the algorithm appears to be closely related to the amount of mixing. Furthermore, if the computer is in a highly mixed state any attempt to remove entanglement by further mixing of the algorithm results in a significant decrease in its efficiency.

arXiv:quant-ph/0102136•Journal of Modern Optics•Jul 1, 2002•33 citations
We detail techniques to optimise high-level classical simulations of Shor's quantum factoring algorithm. Chief among these is to examine the entangling properties of the circuit and to effectively map it across the one-dimensional structure of a matrix product state. Compared to previous approaches whose space requirements depend on r , the solution to the underlying order-finding problem of Shor's algorithm, our approach depends on its factors. We performed a matrix product state simulation of a 60-qubit instance of Shor's algorithm that would otherwise be infeasible to complete without an optimised entanglement mapping.
Before large-scale, robust quantum computers are developed, it is valuable to be able to classically simulate quantum algorithms to study their properties.To do so, we developed a numerical library for simulating quantum circuits via the matrix product state formalism on distributed memory architectures.By examining the multipartite entanglement present across Shor's algorithm, we were able to effectively map a high-level circuit of Shor's algorithm to the one-dimensional structure of a matrix product state, enabling us to perform a simulation of a specific 60 qubit instance in approximately 14 TB of memory: potentially the largest non-trivial quantum circuit simulation ever performed.We then applied matrix product state and matrix product density operator techniques to simulating one-dimensional circuits from Google's quantum supremacy problem with errors and found it mostly resistant to our methods.Most importantly, I give my gratitude to Doctor Charles Hill and Professor Lloyd Hollenberg for their guidance and vision in directing this work, for providing me with the resources necessary to produce the results of this thesis and for pushing me to realise my potential.In aiding the development of our numerical library and the production of our results, I acknowledge that this work was supported by resources provided by the Pawsey Supercomputing Centre with funding from the Australian Government and the Government of Western Australia.To The University of Melbourne, and especially the School of Physics, I am thankful to have been in an environment that would fuel the growth of my abilities.In order that I may focus on my studies, I would also like to thank Ms Rose Cooney, Ms Jenny de Boer and Associate Professor Michelle Livett for greatly simplifying the daunting administrative matters that I was faced with.Finally, to all the friends, classmates, teachers and students that I have ever had, and anyone else I have ever learned something from, I hope that you might have gained something from me in return.
“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.
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.
We develop simulation methods for matrix product operators, and perform simulations of the Quantum Fourier Transform, Shor’s algorithm and Grover’s algorithm using matrix product states and matrix product operators. By doing so, we provide numerical evidence that a constant number of QFTs can be efficiently classically simulated on any state whose Schmidt rank grows only polynomially with the number of qubits, and quantify the amount of entanglement present in Shor’s algorithm. The efficiency of the matrix product state and operator representation allows us to perform moderately large simulations of both Shor’s algorithm with Z errors and Grover’s algorithm with up to 15 X, Y and Z errors. While larger simulations have been performed, our results have been computed with little computational power and provide new methods to perform large-scale quantum algorithm simulations.
Quantum algorithms are well known for their higher efficiency compared to their classical counterparts.However, the origin of the speed-up offered by quantum algorithms is a debatable question.Using entanglement measure based on coefficient matrix, we investigate the entanglement features of the quantum states used in Shor's factoring algorithm.The results show that if and only if the order r is 1, the algorithm generates no entanglement.Finally, compare with published studies results (Proceedings: Mathematical, Physical and Engineering Sciences, 459(2036): 2011-2032, 2003, Physical Review A, 72(6): 062308, 2005), we give counter examples to show that previous researches neglect partially entanglement.
We demonstrate that, in the case of Shor's algorithm for factoring, highly mixed states will allow efficient quantum computation, indeed factorization can be achieved efficiently with just one initial pure qubit and a supply of initially maximally mixed qubits (Parker, S. and Plenio, M. B., 2000, Phys. Rev. Lett., 85, 3049). This leads us to ask how this affects the entanglement in the algorithm. We thus investigate the behaviour of entanglement in Shor's algorithm for small numbers of qubits by classical computer simulation of the quantum computer at different stages of the algorithm. We find that entanglement is an intrinsic part of the algorithm and that the entanglement through the algorithm appears to be closely related to the amount of mixing. Furthermore, if the computer is in a highly mixed state any attempt to remove entanglement by further mixing of the algorithm results in a significant decrease in its efficiency.