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/0408173

Reversible addition circuit using one ancillary bit with application to quantum computing

Phillip Kaye

Published Aug 28, 2004• 32 citations
arXivHTMLPDF

Abstract

Most of the work on implementing arithmetic on a quantum computer has borrowed from results in classical reversible computing (e.g. [VBE95], [BBF02], [DKR04]). These quantum networks are inherently classical, as they can be implemented with only the Toffoli gate. Draper [D00] has proposed an inherently "quantum" network for addition based on the quantum Fourier transform. His approach has the advantage that it requires no carry qubits (the previous approaches required O(n) carry qubits). The network in [D00] uses quantum rotation gates, which must either be implemented with exponential precision, or else be approximated. In this paper I give a network of O(n^3) Toffoli gates for reversibly performing in-place addition with only a single ancillary bit, demonstrating that inherently quantum techniques are not required to achieve this goal (provided we are willing to sacrifice quadratic circuit depth). After posting the original version of this note it was pointed out to me by C. Zalka that essentially the same technique for addition was used in [BCD+96]. The scenario in that paper was different, but it is clear how the technique they described generalizes to that in this paper.

DOI
10.48550/arxiv.quant-ph/0408173

Related papers

Ancilla-free optimal quantum adder

Junhong Nie, Jialiang Tang, Xiaoming Sun +1 more

We construct an exact $n$-bit quantum adder with $O(n)$ gates and $O(\log n)$ depth that requires no ancillary qubits. The circuit uses only $X$, CNOT, and Toffoli gates under all-to-all connectivity and is classically reversible. Our construction accelerates the controlled ladder underlying addition. Grouping the data into blocks and use existing control qubits as conditional workspace gives a recursive construction with $O(n\log\log n)$ gates and $O(\log n)$ depth. We then coordinate inter-block propagation via two short-path forest operations to cut the per-block workspace requirement, yielding a nonrecursive implementation with $O(n)$ gates. Both the gate count and circuit depth are asymptotically optimal.

quant-pharXiv:2610.34446•Oct 27, 2026•0 citations

Matrix analysis of quantum addition with Toffoli gates

Pedro Juan Roig, Salvador Alcaraz, Katja Gilly +2 more

Addition is a key arithmetic operation in computing, as the rest of arithmetic operations are somewhat based on it. Focusing on quantum computing, addition can be implemented in different ways, such as adapting the ripple-carry adder from classical computing, or using a QFT-based adder, which is more efficient than the former. However, a Toffoli-based adder is in fact an alternative way to optimize QFT-based adders by merging rotation gates into a string of controlled-NOT and Toffoli gates with different control qubits. In this paper, the basics of matrix analysis of quantum circuits are described, which in turn are used to perform a matrix analysis of Toffoli adder circuits.

International Conference on Engineering and Emerging Technologies (ICEET)•Oct 22, 2025•0 citations

Design and Optimization of Quantum Arithmetic Circuits for Next-Generation Quantum Systems

Yogeswari Palanisamy, Murugan Kathirvelu, G.B. Mohankumar +3 more

Quantum computing (Q-computing) is a revolutionary technology that applies quantum mechanics (QM) to implement calculations significantly quicker than traditional computers. Q-computing employs Q-bits (qubits) rather than classical bits, which can take on a superposition state, making it possible to represent both 0 and 1 at once. This distinctive property allows qubits to perform multiple calculations simultaneously, making Q computers exponentially more powerful as more qubits are added, compared to the linear scaling of classical computers. However, challenges such as qubit instability and error rates remain significant obstacles to fully realizing this potential. A vital aspect of this technology is the development of Q arithmetic circuits, which act as the foundational blocks for efficiently executing Q algorithms. Q half-adder and full-adder circuits are integral to performing fundamental arithmetic operations within Q computers. In contrast to classical adders, Q adders rely on Q gates such as Controlled NOT (CNOT) and Toffoli gates. These gates exploit Q phenomena like entanglement and superposition, allowing for more efficient computations. The Q half-adder consists of two qubits and adds two single bits, producing a carry and sum output. It utilizes the CNOT gate to compute the sum and the Toffoli gate (controlled-controlled-NOT [CCNOT]) to compute the carry. The Q full-adder builds on this, adding three qubits to produce a sum and a carry output, further increasing computational capacity. Through the entanglement of qubits, these circuits allow for more parallelism and speed compared to classical adders. Q carry-look-ahead adders (QCLAs) and Q ripple-carry adders (QRCAs) are used to perform more complex arithmetic operations based on these half-adder and full-adder structures. Q arithmetic circuits have broad applications, boosting secure key generation in cryptography, speeding up matrix operations for faster model training in machine learning, and enabling more precise, efficient image transformations in Q image processing, benefiting fields like medical imaging and computer vision.

Auerbach Publications eBooks•Feb 24, 2026•0 citations

Design and Implementation of a Quantum Reversible Full Adder-Subtractor

Indra J, Siva Prasanna E, Sushma V.R

Arithmetic units are the computational cores of any processor, and among them, the full adder-subtractor circuit can be regarded as the most fundamental, as it can support the entire spectrum of computation, ranging from integer arithmetic to filtering and cryptographic functions. In the context of quantum computing, these units must be implemented using reversible logic gates that preserve the information processed, as any loss of information violates the principles of the unitary dynamics of quantum mechanics and the thermodynamic principle of bit erasure. In the context of the full adder-subtractor circuit, the previous implementations had three main drawbacks, namely, the use of multiple ancilla input qubits, the generation of garbage qubits, and the use of non-native gates. In this paper, a novel implementation of the reversible full adder-subtractor circuit using the IBM Quantum Composer tool, with the support of only the native gates of the IBM Quantum device, namely, the Hadamard, the Controlled-NOT, and the Toffoli gates, is proposed. The proposed circuit works with six qubits and thirteen gates, with a quantum cost of 13, zero ancilla inputs, and zero garbage outputs simultaneously. The circuit uses only one mode select qubit (M) for operation. When M is 0, the circuit works for full addition with Sum and Carry-out. When M is 1, the circuit works for full subtraction with Difference and Borrow-out through a two's complement B-inversion method. The circuit is simulated using the IBM Quantum composer Simulator with 1024 shots. The Hadamard-based superposition method is used to test all eight input combinations simultaneously in a single run.

International Conference Inventive Material Science Applications•May 1, 2026•0 citations

Truncated phase-based quantum arithmetic: Error propagation and resource reduction

Gregory A. L. White, Charles D. Hill, Lloyd C. L. Hollenberg

There are two important, and potentially interconnecting, avenues to the realization of large-scale quantum algorithms: improvement of the hardware, and reduction of resource requirements demanded by algorithm components. In focusing on the latter, one crucial subroutine to many sought-after applications is the quantum adder. A variety of different implementations exist with idiosyncratic pros and cons. One of these, the Draper quantum Fourier adder, offers the lowest qubit count of any adder, but requires a substantial number of gates as well as extremely fine rotations. In this work we present a modification of the Draper adder which eliminates small-angle rotations to highly coarse levels, matched with some strategic corrections. This reduces hardware requirements without sacrificing the qubit saving. We show that the inherited loss of fidelity is directly given by the rate of carry and borrow bits in the computation. We derive formulas to predict this, complemented by complete gate-level matrix product state simulations of the circuit. Moreover, we analytically describe the effects of possible stochastic control error. We present an in-depth analysis of this approach in the context of Shor's algorithm, focusing on the factoring of RSA-2048. Surprisingly, we find that each of the $7\ifmmode\times\else\texttimes\fi{}{10}^{7}$ quantum Fourier transforms may be truncated down to $\ensuremath{\pi}/64$, with additive rotations left only slightly finer. This result is much more efficient than previously realized. We quantify savings in terms of both logical resources and raw magic states, demonstrating that phase adders can be competitive with Toffoli-based constructions.

arXiv:2110.00217•Physical Review A•Nov 16, 2023•0 citations

A fast quantum circuit for addition with few qubits

Yasuhiro Takahashi, Noboru Kunihiro

We show how to construct a fast quantum circuit for computing the sum of two $n$-bit binary numbers with few qubits. The constructed circuit uses $O(n/\log n)$ ancillary qubits and its depth and size are $O(\log n)$ and $O(n)$, respectively. The number of ancillary qubits is asymptotically less than that in Draper et al.'s quantum carry-lookahead adder, and the depth and size are asymptotically the same as those of Draper et al.'s. Moreover, we show that the circuit is useful for constructing an efficient quantum circuit for Shor's factoring algorithm.

Quantum Information and Computation•Jul 1, 2008•44 citations
Most of the work on implementing arithmetic on a quantum computer has borrowed from results in classical reversible computing (e.g. [VBE95], [BBF02], [DKR04]). These quantum networks are inherently classical, as they can be implemented with only the Toffoli gate. Draper [D00] has proposed an inherently "quantum" network for addition based on the quantum Fourier transform. His approach has the advantage that it requires no carry qubits (the previous approaches required O(n) carry qubits). The network in [D00] uses quantum rotation gates, which must either be implemented with exponential precision, or else be approximated. In this paper I give a network of O(n^3) Toffoli gates for reversibly performing in-place addition with only a single ancillary bit, demonstrating that inherently quantum techniques are not required to achieve this goal (provided we are willing to sacrifice quadratic circuit depth). After posting the original version of this note it was pointed out to me by C. Zalka that essentially the same technique for addition was used in [BCD+96]. The scenario in that paper was different, but it is clear how the technique they described generalizes to that in this paper.
We construct an exact nnn-bit quantum adder with O(n)O(n)O(n) gates and O(log⁡n)O(\log n)O(logn) depth that requires no ancillary qubits. The circuit uses only XXX, CNOT, and Toffoli gates under all-to-all connectivity and is classically reversible. Our construction accelerates the controlled ladder underlying addition. Grouping the data into blocks and use existing control qubits as conditional workspace gives a recursive construction with O(nlog⁡log⁡n)O(n\log\log n)O(nloglogn) gates and O(log⁡n)O(\log n)O(logn) depth. We then coordinate inter-block propagation via two short-path forest operations to cut the per-block workspace requirement, yielding a nonrecursive implementation with O(n)O(n)O(n) gates. Both the gate count and circuit depth are asymptotically optimal.
Addition is a key arithmetic operation in computing, as the rest of arithmetic operations are somewhat based on it. Focusing on quantum computing, addition can be implemented in different ways, such as adapting the ripple-carry adder from classical computing, or using a QFT-based adder, which is more efficient than the former. However, a Toffoli-based adder is in fact an alternative way to optimize QFT-based adders by merging rotation gates into a string of controlled-NOT and Toffoli gates with different control qubits. In this paper, the basics of matrix analysis of quantum circuits are described, which in turn are used to perform a matrix analysis of Toffoli adder circuits.
Quantum computing (Q-computing) is a revolutionary technology that applies quantum mechanics (QM) to implement calculations significantly quicker than traditional computers. Q-computing employs Q-bits (qubits) rather than classical bits, which can take on a superposition state, making it possible to represent both 0 and 1 at once. This distinctive property allows qubits to perform multiple calculations simultaneously, making Q computers exponentially more powerful as more qubits are added, compared to the linear scaling of classical computers. However, challenges such as qubit instability and error rates remain significant obstacles to fully realizing this potential. A vital aspect of this technology is the development of Q arithmetic circuits, which act as the foundational blocks for efficiently executing Q algorithms. Q half-adder and full-adder circuits are integral to performing fundamental arithmetic operations within Q computers. In contrast to classical adders, Q adders rely on Q gates such as Controlled NOT (CNOT) and Toffoli gates. These gates exploit Q phenomena like entanglement and superposition, allowing for more efficient computations. The Q half-adder consists of two qubits and adds two single bits, producing a carry and sum output. It utilizes the CNOT gate to compute the sum and the Toffoli gate (controlled-controlled-NOT [CCNOT]) to compute the carry. The Q full-adder builds on this, adding three qubits to produce a sum and a carry output, further increasing computational capacity. Through the entanglement of qubits, these circuits allow for more parallelism and speed compared to classical adders. Q carry-look-ahead adders (QCLAs) and Q ripple-carry adders (QRCAs) are used to perform more complex arithmetic operations based on these half-adder and full-adder structures. Q arithmetic circuits have broad applications, boosting secure key generation in cryptography, speeding up matrix operations for faster model training in machine learning, and enabling more precise, efficient image transformations in Q image processing, benefiting fields like medical imaging and computer vision.
Arithmetic units are the computational cores of any processor, and among them, the full adder-subtractor circuit can be regarded as the most fundamental, as it can support the entire spectrum of computation, ranging from integer arithmetic to filtering and cryptographic functions. In the context of quantum computing, these units must be implemented using reversible logic gates that preserve the information processed, as any loss of information violates the principles of the unitary dynamics of quantum mechanics and the thermodynamic principle of bit erasure. In the context of the full adder-subtractor circuit, the previous implementations had three main drawbacks, namely, the use of multiple ancilla input qubits, the generation of garbage qubits, and the use of non-native gates. In this paper, a novel implementation of the reversible full adder-subtractor circuit using the IBM Quantum Composer tool, with the support of only the native gates of the IBM Quantum device, namely, the Hadamard, the Controlled-NOT, and the Toffoli gates, is proposed. The proposed circuit works with six qubits and thirteen gates, with a quantum cost of 13, zero ancilla inputs, and zero garbage outputs simultaneously. The circuit uses only one mode select qubit (M) for operation. When M is 0, the circuit works for full addition with Sum and Carry-out. When M is 1, the circuit works for full subtraction with Difference and Borrow-out through a two's complement B-inversion method. The circuit is simulated using the IBM Quantum composer Simulator with 1024 shots. The Hadamard-based superposition method is used to test all eight input combinations simultaneously in a single run.
There are two important, and potentially interconnecting, avenues to the realization of large-scale quantum algorithms: improvement of the hardware, and reduction of resource requirements demanded by algorithm components. In focusing on the latter, one crucial subroutine to many sought-after applications is the quantum adder. A variety of different implementations exist with idiosyncratic pros and cons. One of these, the Draper quantum Fourier adder, offers the lowest qubit count of any adder, but requires a substantial number of gates as well as extremely fine rotations. In this work we present a modification of the Draper adder which eliminates small-angle rotations to highly coarse levels, matched with some strategic corrections. This reduces hardware requirements without sacrificing the qubit saving. We show that the inherited loss of fidelity is directly given by the rate of carry and borrow bits in the computation. We derive formulas to predict this, complemented by complete gate-level matrix product state simulations of the circuit. Moreover, we analytically describe the effects of possible stochastic control error. We present an in-depth analysis of this approach in the context of Shor's algorithm, focusing on the factoring of RSA-2048. Surprisingly, we find that each of the $7\ifmmode\times\else\texttimes\fi{}{10}^{7}$ quantum Fourier transforms may be truncated down to $\ensuremath{\pi}/64$, with additive rotations left only slightly finer. This result is much more efficient than previously realized. We quantify savings in terms of both logical resources and raw magic states, demonstrating that phase adders can be competitive with Toffoli-based constructions.
We show how to construct a fast quantum circuit for computing the sum of two nnn-bit binary numbers with few qubits. The constructed circuit uses O(n/log⁡n)O(n/\log n)O(n/logn) ancillary qubits and its depth and size are O(log⁡n)O(\log n)O(logn) and O(n)O(n)O(n), respectively. The number of ancillary qubits is asymptotically less than that in Draper et al.'s quantum carry-lookahead adder, and the depth and size are asymptotically the same as those of Draper et al.'s. Moreover, we show that the circuit is useful for constructing an efficient quantum circuit for Shor's factoring algorithm.