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:quant-ph/0408006 · Physical Review A

Fast quantum modular exponentiation

Rodney Van Meter, Kohei M. Itoh

Published May 17, 2005• 181 citations
arXivHTMLPDF

Abstract

We present a detailed analysis of the impact on quantum modular exponentiation of architectural features and possible concurrent gate execution. Various arithmetic algorithms are evaluated for execution time, potential concurrency, and space trade-offs. We find that to exponentiate an $n\text{\ensuremath{-}}\text{bit}$ number, for storage space $100n$ (20 times the minimum $5n$), we can execute modular exponentiation 200--700 times faster than optimized versions of the basic algorithms, depending on architecture, for $n=128$. Addition on a neighbor-only architecture is limited to $O(n)$ time, whereas non-neighbor architectures can reach $O(\mathrm{log}\phantom{\rule{0.2em}{0ex}}n)$, demonstrating that physical characteristics of a computing device have an important impact on both real-world running time and asymptotic behavior. Our results will help guide experimental implementations of quantum algorithms and devices.

DOI
10.1103/physreva.71.052320

Related papers

Quantum Arithmetic Algorithms: Implementation, Resource Estimation, and Comparison

Dmytro Fedoriaka, Brian Goldsmith, Yingrong Chen

As quantum computing technology advances, the need for optimized arithmetic circuits continues to grow. This paper presents the implementation and resource estimation of a library of quantum arithmetic algorithms, including addition, multiplication, division, and modular exponentiation. Using the Azure Quantum Resource Estimator, we evaluate runtime, qubit usage, and space-time trade-offs and identify the best-performing algorithm for each arithmetic operation. We explore the design space for division, optimize windowed modular exponentiation, and identify the tipping point between multipliers, demonstrating effective applications of resource estimation in quantum research. Additionally, we highlight the impact of parallelization, reset operations, and uncomputation techniques on implementation and resource estimation. Our findings provide both a practical library and a valuable knowledge base for selecting and optimizing quantum arithmetic algorithms in real-world applications.

arXiv:2509.07015•IEEE International Conference on Quantum Computing and Engineering (QCE)•Aug 30, 2025•0 citations

Optimizing Quantum Circuits for Modular Exponentiation

Rakesh Das, Anupam Chattopadhyay, Hafizur Rahaman

Today's rapid progress in the physical implementation of quantum computers demands scalable synthesis methods to map practical logic designs to quantum architectures. There exist many quantum algorithms which use classical functions with superposition of states. Motivated by recent trends, in this paper, we show the design of quantum circuit to perform modular exponentiation functions using two different approaches. In the design phase, first we generate quantum circuit from a verilog implementation of exponentiation functions using synthesis tools and then apply two different Quantum Error Correction techniques. Finally the circuit is further optimized using the Linear Nearest Neighbor (LNN) Property. We demonstrate the effectiveness of our approach by generating a set of networks for the reversible modular exponentiation function for a set of input values. At the end of the work, we have summarized the obtained results, where a cost analysis over our developed approaches has been made. Experimental results show that depending on the choice of different QECC methods the performance figures can vary by up to 11%, 10%, 8% in T-count, number of qubits, number of gates respectively.

International Conference on VLSI Design•Jan 1, 2019•2 citations

Optimized circuits for windowed modular arithmetic with applications to quantum attacks against RSA

Alessandro Luongo, Varun Narasimhachar, Adithya Sireesh

Windowed arithmetic [Gidney, 2019] is a technique for reducing the cost of quantum arithmetic circuits with space--time tradeoffs using memory queries to precomputed tables. It can reduce the asymptotic cost of modular exponentiation from $O\left(n^3\right)$ to $O\left(n^3/\log^2 n\right)$ operations, resulting in the current state-of-the-art compilations of quantum attacks against modern cryptography. In this work we introduce four optimizations to windowed modular exponentiation. We (1) show how the cost of unlookups can be reduced by $66\%$ asymptotically in the number of bits, (2) illustrate how certain addresses can be bypassed, reducing both circuit depth and the overall lookup cost, (3) demonstrate that multiple lookup--addition operations can be merged into a single, larger lookup at the start of the modular exponentiation circuit, and (4) reduce the depth of the unary conversion for unlookups. On a logical level, this leads to a $3\%$ improvement in Toffoli count and Toffoli depth for modular exponentiation circuits relevant to cryptographic applications. This translates to some improvements on [Gidney and Ekerå, 2021]'s factoring algorithm: for a given number of physical qubits, our improvements show a reduction in the expected runtime from $2\%$ to $6\%$ for factoring $\mathsf{RSA}$-$2048$ integers.

arXiv:2502.17325•Feb 24, 2025•5 citations

Optimizing windowed arithmetic for quantum attacks against RSA-2048

Alessandro Luongo, Varun Narasimhachar, Adithya Sireesh

Windowed arithmetic is a technique for reducing the cost of quantum arithmetic circuits with space-time trade-offs using memory queries to precomputed tables. It can reduce the asymptotic cost of modular exponentiation from $\mathcal{O}\left(n^{2}\right)$ to $\mathcal{O}\left(n^{2} / \log ^{2} n\right)$ operations, resulting in the current state-of-the-art compilations of quantum attacks against modern cryptography. We introduce several optimizations to windowed arithmetic. Notably, we effect an approximate $50 \%$ reduction in the costs of uncomputing memory lookups in quantum factoring applications. We validate our optimizations by improving the gate count of quantum attacks against public-key cryptography by $1.5 \%$ to $3.4 \%$, depending on the key size. We also enable a $16 \%$ runtime reduction at the cost of a $12 \%$ increase in qubit count. Our techniques can be used to reduce the complexity of not only factoring algorithms but also a wide range of quantum algorithms that rely on windowed arithmetic.

ACM/IEEE Design Automation Conference (DAC)•Jun 22, 2025•1 citation

Quantum networks for elementary arithmetic operations

Vlatko Vedral, Adriano Barenco, ARTUR K. EKERT

Quantum computers require quantum arithmetic. We provide an explicit construction of quantum networks effecting basic arithmetic operations: from addition to modular exponentiation. Quantum modular exponentiation seems to be the most difficult (time and space consuming) part of Shor's quantum factorizing algorithm. We show that the auxiliary memory required to perform this operation in a reversible way grows linearly with the size of the number to be factorized. \textcopyright{} 1996 The American Physical Society.

arXiv:quant-ph/9511018•Physical Review A•Jul 1, 1996•852 citations

ARCHITECTURE-DEPENDENT EXECUTION TIME OF SHOR'S ALGORITHM

Rodney Van Meter, Kohei M. Itoh, Thaddeus D. Ladd

We show how the execution time of algorithms on quantum computers depends on the architecture of the quantum computer, the choice of algorithms (including subroutines such as arithmetic), and the ``clock speed'' of the quantum computer. The primary architectural features of interest are the ability to execute multiple gates concurrently, the number of application-level qubits available, and the interconnection network of qubits. We analyze Shor's algorithm for factoring large numbers in this context. Our results show that, if arbitrary interconnection of qubits is possible, a machine with an application-level clock speed of as low as one-third of a (possibly encoded) gate per second could factor a 576-bit number in under one month, potentially outperforming a large network of classical computers. For nearest-neighbor-only architectures, a clock speed of around twenty-seven gates per second is required.

arXiv:quant-ph/0507023•International Symposium on Mesoscopic Superconductivity and Spintronics (MS+S)•Oct 1, 2008•29 citations
We present a detailed analysis of the impact on quantum modular exponentiation of architectural features and possible concurrent gate execution. Various arithmetic algorithms are evaluated for execution time, potential concurrency, and space trade-offs. We find that to exponentiate an n\ensuremath-bitn\text{\ensuremath{-}}\text{bit}n\ensuremath-bit number, for storage space 100n100n100n (20 times the minimum 5n5n5n), we can execute modular exponentiation 200--700 times faster than optimized versions of the basic algorithms, depending on architecture, for n=128n=128n=128. Addition on a neighbor-only architecture is limited to O(n)O(n)O(n) time, whereas non-neighbor architectures can reach O(logn)O(\mathrm{log}\phantom{\rule{0.2em}{0ex}}n)O(logn), demonstrating that physical characteristics of a computing device have an important impact on both real-world running time and asymptotic behavior. Our results will help guide experimental implementations of quantum algorithms and devices.
As quantum computing technology advances, the need for optimized arithmetic circuits continues to grow. This paper presents the implementation and resource estimation of a library of quantum arithmetic algorithms, including addition, multiplication, division, and modular exponentiation. Using the Azure Quantum Resource Estimator, we evaluate runtime, qubit usage, and space-time trade-offs and identify the best-performing algorithm for each arithmetic operation. We explore the design space for division, optimize windowed modular exponentiation, and identify the tipping point between multipliers, demonstrating effective applications of resource estimation in quantum research. Additionally, we highlight the impact of parallelization, reset operations, and uncomputation techniques on implementation and resource estimation. Our findings provide both a practical library and a valuable knowledge base for selecting and optimizing quantum arithmetic algorithms in real-world applications.
Today's rapid progress in the physical implementation of quantum computers demands scalable synthesis methods to map practical logic designs to quantum architectures. There exist many quantum algorithms which use classical functions with superposition of states. Motivated by recent trends, in this paper, we show the design of quantum circuit to perform modular exponentiation functions using two different approaches. In the design phase, first we generate quantum circuit from a verilog implementation of exponentiation functions using synthesis tools and then apply two different Quantum Error Correction techniques. Finally the circuit is further optimized using the Linear Nearest Neighbor (LNN) Property. We demonstrate the effectiveness of our approach by generating a set of networks for the reversible modular exponentiation function for a set of input values. At the end of the work, we have summarized the obtained results, where a cost analysis over our developed approaches has been made. Experimental results show that depending on the choice of different QECC methods the performance figures can vary by up to 11%, 10%, 8% in T-count, number of qubits, number of gates respectively.
Windowed arithmetic [Gidney, 2019] is a technique for reducing the cost of quantum arithmetic circuits with space--time tradeoffs using memory queries to precomputed tables. It can reduce the asymptotic cost of modular exponentiation from O(n3)O\left(n^3\right)O(n3) to O(n3/log⁡2n)O\left(n^3/\log^2 n\right)O(n3/log2n) operations, resulting in the current state-of-the-art compilations of quantum attacks against modern cryptography. In this work we introduce four optimizations to windowed modular exponentiation. We (1) show how the cost of unlookups can be reduced by 66%66\%66% asymptotically in the number of bits, (2) illustrate how certain addresses can be bypassed, reducing both circuit depth and the overall lookup cost, (3) demonstrate that multiple lookup--addition operations can be merged into a single, larger lookup at the start of the modular exponentiation circuit, and (4) reduce the depth of the unary conversion for unlookups. On a logical level, this leads to a 3%3\%3% improvement in Toffoli count and Toffoli depth for modular exponentiation circuits relevant to cryptographic applications. This translates to some improvements on [Gidney and Ekerå, 2021]'s factoring algorithm: for a given number of physical qubits, our improvements show a reduction in the expected runtime from 2%2\%2% to 6%6\%6% for factoring RSA\mathsf{RSA}RSA-204820482048 integers.
Windowed arithmetic is a technique for reducing the cost of quantum arithmetic circuits with space-time trade-offs using memory queries to precomputed tables. It can reduce the asymptotic cost of modular exponentiation from O(n2)\mathcal{O}\left(n^{2}\right)O(n2) to O(n2/log⁡2n)\mathcal{O}\left(n^{2} / \log ^{2} n\right)O(n2/log2n) operations, resulting in the current state-of-the-art compilations of quantum attacks against modern cryptography. We introduce several optimizations to windowed arithmetic. Notably, we effect an approximate 50%50 \%50% reduction in the costs of uncomputing memory lookups in quantum factoring applications. We validate our optimizations by improving the gate count of quantum attacks against public-key cryptography by 1.5%1.5 \%1.5% to 3.4%3.4 \%3.4%, depending on the key size. We also enable a 16%16 \%16% runtime reduction at the cost of a 12%12 \%12% increase in qubit count. Our techniques can be used to reduce the complexity of not only factoring algorithms but also a wide range of quantum algorithms that rely on windowed arithmetic.
Quantum computers require quantum arithmetic. We provide an explicit construction of quantum networks effecting basic arithmetic operations: from addition to modular exponentiation. Quantum modular exponentiation seems to be the most difficult (time and space consuming) part of Shor's quantum factorizing algorithm. We show that the auxiliary memory required to perform this operation in a reversible way grows linearly with the size of the number to be factorized. \textcopyright{} 1996 The American Physical Society.
We show how the execution time of algorithms on quantum computers depends on the architecture of the quantum computer, the choice of algorithms (including subroutines such as arithmetic), and the ``clock speed'' of the quantum computer. The primary architectural features of interest are the ability to execute multiple gates concurrently, the number of application-level qubits available, and the interconnection network of qubits. We analyze Shor's algorithm for factoring large numbers in this context. Our results show that, if arbitrary interconnection of qubits is possible, a machine with an application-level clock speed of as low as one-third of a (possibly encoded) gate per second could factor a 576-bit number in under one month, potentially outperforming a large network of classical computers. For nearest-neighbor-only architectures, a clock speed of around twenty-seven gates per second is required.