Pith. sign in

REVIEW 3 major objections 5 minor 1 cited by

New Circuit for Quantum Adder by Constant

T0 review · 3 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash

Pith's one-line read A new circuit performs in-place addition of a classical n-bit constant to a quantum register with only n-3 ancilla qubits and 4n-5 T-gates, beating all previously known constructions built from quantum adders.

desk verdict A solid incremental improvement to adder-by-constant, but the controlled-adder T-count needs a missing analysis of AND-gate uncomputation. read the letter →

arxiv 2501.07060 v1 pith:56ZYIN2F submitted 2025-01-13 quant-ph

classification quant-ph
keywords quantumadderadditionbyconstantT-countancillaqubitstemporarylogical-ANDgateToffoliincrementerClifford+T
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

This paper proposes a new quantum circuit for adding a classical n-bit constant to an n-qubit register in-place, modulo 2^n. The constructed circuit uses n-3 ancilla qubits and a T-count of 4n-5, and the controlled version uses n-2 ancillas with a T-count of 11n-15. The construction generalizes an existing quantum incrementer circuit and replaces Toffoli gates with pairs of temporary-logical AND gates to cut T-count. The author claims this is more efficient than any adder-by-constant built from any known quantum-by-quantum adder, the standard approach for this problem. If correct, the result lowers the resource cost of a common arithmetic subroutine used in Shor's algorithm and other quantum computations.

What carries the argument

The circuit is built on three components. First, a classically controlled X gate, denoted X_a(q), applies X only when the classical bit a equals 1, so the constant is embedded for free with no T-gates. Second, the temporary logical-AND gate, which behaves like a Toffoli but requires the target to be in the zero state, is paired with its adjoint AND-dagger for uncomputation; a pair costs 4 T-gates instead of the 7 needed for one Toffoli. Third, the majority gate MAJ(x,y,a)=floor((x+y+a)/2), implemented with one Toffoli and five classically controlled X gates, propagates carry bits through the standard carry recurrence. The circuit is then optimized by cancelling adjacent inverse blocks (the same pattern used to build a quantum incrementer), merging and eliminating classically controlled X gates, using b0 directly as the first carry to drop one ancilla, and pushing the final Toffoli onto an output qubit to drop another. The uncontrolled version therefore contains n-3 AND-pairs and one Toffoli, giving a T-count of 4(n-3)+7=4n-5. The controlled version skips the final-ancilla elimination to avoid a doubly-controlled gate, so it contains n-2 AND-pairs and n-1 Toffolis, giving 4(n-2)+7(n-1)=11n-15.

What would settle it

Count the T-gates in the controlled circuit for a specific n (for example n=5) using the provided implementation: if the total exceeds 11n-15, the assumed Clifford corrections are not all Clifford in the controlled setting. Equivalently, compile the circuit for a small n with a tool that resolves the measurement-based AND uncomputations and count the resulting Toffoli and AND pairs.

Watch

Extended reading notes

Core claim

The paper's central claim is that in-place addition of a classical constant to a quantum register does not require the usual overhead of loading the constant into n ancilla qubits and then running a quantum-quantum adder. Instead, by generalizing a quantum incrementer, it constructs a circuit that directly computes the carries using majority (MAJ) gates, cancels adjacent adjoint blocks, and replaces every Toffoli that targets an ancilla initially in the zero state with a temporary-logical AND/AND-dagger pair. The resulting uncontrolled circuit has exactly n-3 ancillas and a T-count of 4n-5; the controlled version, which keeps one extra ancilla to avoid needing a doubly-controlled gate, has n-2 ancillas and a T-count of 11n-15. The author states that, to his knowledge, this is more efficient than any circuit constructed using any known quantum-by-quantum adder, and provides an implementation of both circuits.

Load-bearing premise

The controlled circuit's stated T-count of 11n-15 assumes that every correction gate produced by the uncomputation of the temporary AND gates remains a simple Clifford gate once the whole circuit is made controlled; if one of those corrections is a single-qubit flip on an input/output qubit, it turns into an additional Toffoli gate and raises the T-count.

Editorial extensions

If this is right

  • Any quantum routine that uses adder-by-constant as a subroutine, notably modular exponentiation in Shor's algorithm, can replace the standard n-ancilla construction with this circuit and thereby reduce ancilla overhead to n-3 while keeping the T-count lower.
  • The T-count gap over the compared ripple-carry adders grows linearly: for the Cuccaro adder the reduction is from 14n-21 to 4n-5, a saving of 10n-16 T-gates.
  • The controlled version gives a cheaper way to compute conditional constant additions, which appear in modular exponentiation and in many controlled arithmetic operations.
  • Because the circuit uses only Clifford+T gates and avoids the arbitrary rotations of QFT-based adders, it fits naturally into fault-tolerant implementations.
  • The included implementation lets a user verify the exact T-count and ancilla count for any n by direct gate counting.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The same carry-recurrence simplification could be applied to other arithmetic circuits, such as comparison-by-constant circuits, which the author mentions implementing alongside this work, potentially lowering their T-count similarly.
  • The paper counts T-gates but not T-depth or the cost of logical-level measurement and feedforward needed for the measurement-based AND uncomputation; in an error-corrected setting the relative advantage over other adders may shift.
  • The claimed efficiency is relative to adders-by-constants built by loading the constant into ancillas; circuits based on the QFT approach trade T-count for rotation precision and are not included in the comparison, so the optimal choice may depend on the fault-tolerance budget.
  • A direct test of the controlled circuit's T-count for several small n values would show whether any correction in the AND-uncomputation becomes a Toffoli when controlled, refining the 11n-15 formula if that assumption fails.
Share X Bluesky LinkedIn Reddit HN

Formalized claims in Lean

  1. Claim #1: The uncontrolled circuit for adding an n-bit constant uses n-3 ancilla qubits and has T-count 4n-5.

  2. Claim #2: Controlled version of the circuit uses n-2 ancillas and has T-count 11n-15.

  3. Claim #3: The new circuits are more efficient than any circuit constructed using any known quantum-by-quantum adder.

Signed reviews

No signed human review yet.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 5 minor

Summary. The paper proposes a quantum circuit for in-place addition of a classical n-bit constant to an n-qubit register modulo 2^n. The construction generalizes an incrementer circuit from [9], replaces certain Toffoli gates with Gidney's temporary logical-AND/AND† pairs, and applies several optimizations. For the uncontrolled adder the paper claims n−3 ancillas and T-count 4n−5; for the controlled version it claims n−2 ancillas and T-count 11n−15. The circuits are implemented in Q# and compared against several known quantum adders used with a constant-loading construction.

Significance. If the claims hold, the uncontrolled circuit improves on the standard constant-loading approach by using substantially fewer ancillas (n−3 versus about n plus the adder's ancillas) while matching or slightly improving the best T-count (4n−5 versus 4n−4 for Gidney's RCA). The paper's concrete gate counts, explicit T-count formulas, and release of Q# code are useful strengths. The controlled-adder claim, however, is not yet supported by a complete gate-level analysis, so the significance of the controlled result is conditional on that analysis.

major comments (3)
  1. [Section 3.4] The T-count 11n−15 for the controlled adder assumes that n−2 AND/AND† pairs cost 4 T each after imposing an external control. This is not justified, because the AND† gate from [5] is implemented by measurement and classically conditioned corrections. The sentence 'make all the gates that target input/output qubits (but not ancillas) controlled' does not specify how these measurement-based corrections are controlled. If any correction becomes a controlled non-Clifford gate when conditioned on the external control, the T-count increases. Please provide the explicit controlled implementation of each AND/AND† pair, or prove that all corrections remain Clifford after conditioning; otherwise 11n−15 is an unverified upper bound rather than a proven resource count.
  2. [Sections 3.1–3.3] Correctness and T-count for arbitrary n are asserted from the n=5 diagrams and the analogy to [9], but no inductive proof or machine-checked verification is given. The Q# repository [10] is referenced but not auditable from the text. Since the central claim is an exact T-count of 4n−5, please add a rigorous correctness proof for general n, or a formal verification trace, so that the gate cancellations and the final gate inventory can be checked for all n.
  3. [Section 4, Table I] The comparison methodology is ambiguous: the text says the fig. 1 construction 'adds n ancillas', but the table's 'Ancilla' column does not state whether those n ancillas are included in the listed counts. Without this clarification, the table cannot be reproduced and the claim that the proposed adder uses fewer ancillas than all compared constructions is not precisely supported. Please state the convention explicitly and, if the listed numbers exclude the constant-loading ancillas, provide the total ancilla counts.
minor comments (5)
  1. [Section 2] The displayed formula for MAJ(x, y, a) contains a typo: the second conjunct should be (y⊕a), not (x⊕a), so the expression should read ((x⊕a)∧(y⊕a))⊕a.
  2. [Section 2, Figure 3 caption] The sentence 'We denote this Xa(q)... as shown on fig. 3' appears to refer to Figure 2, not Figure 3; please correct the cross-reference.
  3. [Section 3.3] Optimization item 3 ('Eliminate the first ancilla, because c1 = b0') is not self-evident from the text; a short explanation or relabeled diagram would make the ancilla count n−3 transparent.
  4. [Section 3.5] The GitHub implementation link should include a commit hash or version, so that the code can be audited reproducibly.
  5. [Section 5] The statement 'more efficient than any circuit that can be constructed using any known quantum-by-quantum adder' is a strong claim; it would be more precise to say 'among the constructions compared here, to our knowledge' unless an exhaustive survey is intended.

Circularity Check

0 steps flagged · score 0.0 of 10

No significant circularity: the adder-by-constant circuit and its T-counts are derived from explicit gate counts and externally cited gate costs.

full rationale

The paper's central derivation constructs the adder from the carry recurrence c_i = MAJ(a_{i-1}, b_{i-1}, c_{i-1}), then optimizes the resulting circuit by canceling adjoint blocks and reducing ancillas. The claimed T-count 4n-5 is an arithmetic consequence of the optimized gate inventory: 4*(n-3) T-gates for n-3 AND/AND-dagger pairs plus 7 T-gates for one Toffoli. Similarly, the controlled version's 11n-15 count follows from the stated inventory of n-2 AND/AND-dagger pairs and n-1 Toffoli gates. No parameter is fitted to the target quantity, and no target quantity is used as an input. The only external dependencies are the AND gate and its T-cost from Gidney's paper, and the incrementer construction of Li et al.; these are prior independent results used as components and benchmarks, not as the source of the claimed efficiency. The paper's GitHub reference is an implementation artifact, not load-bearing evidence for the resource counts. The possible weakness in the controlled-adder T-count (whether measurement-based AND-uncomputation corrections remain Clifford when controlled) is a correctness or completeness concern about an unstated assumption, not a circularity: the count is not established by assuming the conclusion. The comparison table uses published T-counts for other adders, which are external benchmarks. Thus no circular step is present, and the derivation is self-contained apart from standard cited gate constructions.

Assumptions & free parameters 0 free parameters · 4 assumptions · 0 invented entities

The construction itself introduces no free parameters or new physical entities. The central claim rests on four external assumptions: the AND gate T-cost, the standard carry-save formulas, the Clifford cost of X/CNOT gates, and a specific control strategy for the controlled version. The first three are standard; the fourth is the load-bearing assumption highlighted in the report.

assumptions (4)
  • domain assumption The temporary logical-AND gate pair has T-cost 4.
    Taken from Gidney [5]; used to compute T-counts in Sections 3.3 and 3.4.
  • standard math Standard ripple-carry addition formulas: s_i = a_i xor b_i xor c_i and c_i = MAJ(a_{i-1}, b_{i-1}, c_{i-1}).
    Basis for the carry chain in Section 3.1; not proved in the paper.
  • domain assumption Classically controlled X gates and X-gate merges have no T-count; CNOTs are Clifford.
    Used throughout the T-count accounting; standard in the Clifford+T model.
  • ad hoc to paper In the controlled version, it suffices to control only gates that target input/output qubits, and the measurement-based uncomputation of AND gates introduces no additional T gates on the control path.
    Stated without proof in Section 3.4; the T-count 11n-15 depends on this.

how reviews work

0 comments
Cite this review

Pith. "Pith review of New Circuit for Quantum Adder by Constant." pith.science (2026). https://pith.science/paper/56ZYIN2F

@misc{pith2026250107060,
  author       = {Pith},
  title        = {Pith review of: New Circuit for Quantum Adder by Constant},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/56ZYIN2F}},
  note         = {Machine review of arXiv:2501.07060}
}
abstract

We propose a new circuit for in-place addition of a classical $n$-bit constant to a quantum $n$-qubit integer modulo $2^n$. Our circuit uses $n-3$ ancilla qubits and has a T-count of $4n-5$. We also propose controlled version of this circuit that uses $n-2$ ancillas and has a T-count of $11n-15$. We implement these circuits in Q#.

Figures

Figures reproduced from arXiv: 2501.07060 by the authors.

Figure 2
Figure 2. Classically controlled X gate [PITH_FULL_IMAGE:figures/full_fig_p001_2.png] view at source ↗
Figure 3
Figure 3. Temporary logical-AND gate and its adjoint a = 0. We denote this Xa(q). In a circuit diagram, we denote it by “a” in a circle, as shown on fig. 3. AND gate. We use “temporary logical-AND” gate, or simply “AND gate”, as introduced in [5] by Craig Gidney. This gate always comes in a pair with its adjoint AND† . This gate is equivalent to the Toffoli gate, except the target qubit must be in state |0⟩ before applying th… view at source ↗
Figure 1
Figure 1. Quantum adder by constant built from in-place [PITH_FULL_IMAGE:figures/full_fig_p001_1.png] view at source ↗
Figures from the paper (5 more)
Figure 4
Figure 4. Figure 4: Implementing MAJa gate 3. CIRCUIT CONSTRUCTION 3.1. The basic idea First, note that if a is even, then a = 2z · a ′ where a ′ is odd, so the task is reduced to adding number a ′ to n − z most significant bits of b. If a = 0, the adder is an empty circuit. If a /∈ [0, 2…
Figure 5
Figure 5. Figure 5: 5-qubit Quantum Adder by Constant (unoptimized) [PITH_FULL_IMAGE:figures/full_fig_p004_5.png]
Figure 6
Figure 6. Figure 6: 5-qubit Quantum Adder by Constant (partially optimized) [PITH_FULL_IMAGE:figures/full_fig_p004_6.png]
Figure 7
Figure 7. Figure 7: 5-qubit Quantum Adder by Constant (optimized) [PITH_FULL_IMAGE:figures/full_fig_p005_7.png]
Figure 8
Figure 8. Figure 8: 5-qubit Controlled Quantum Adder by Constant [PITH_FULL_IMAGE:figures/full_fig_p005_8.png]

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. QRTlib: A Library for Fast Quantum Real Transforms

    quant-ph 2025-10 conditional novelty 6.0 of 10

    A new Qiskit library implements quantum Hartley, cosine, and sine transforms, with an LCU-based Hartley circuit whose leading gate-complexity term is four times smaller than the previous best.

Reference graph

Works this paper leans on

24 extracted references · 20 canonical work pages · cited by 1 Pith paper

  1. [9]

    Eliminate the last ancilla and one Toffoli gate, by acting with the last Toffoli directly on the bn−1

  2. [5]

    Merge adjacent gates Xx(q) and Xy(q) into Xx⊕y(q)

  3. [10]

    The optimized circuit (shown on fig

    Replace the Toffoli gates with AN Dand AN D† gates. The optimized circuit (shown on fig. 7 for n = 5) contains 4n − 8 classically controlled X gates, n − 3 pairs of AN Dand AN D† gates, 1 Toffoli gate, n − 2 CNOT gates and one X gate. It uses n − 3 ancillas and has T-count of 4 · (n − 3) + 7 = 4n − 5. 3.4. Controlled version Proposed adder can be extended...

  4. [1]

    In particular, it is used to implement a modular exponentiation circuit for the Shor algorithm [1]

    INTRODUCTION Addition by a constant is a building block for various quantum arithmetic algorithms. In particular, it is used to implement a modular exponentiation circuit for the Shor algorithm [1]. The traditional approach for building an adder-by- constant is to reduce this problem to in-place addition of two quantum numbers: allocate n ancillas, popula...

  5. [2]

    New Circuit for Quantum Adder by Constant

    PROBLEM ST A TEMENT AND NOT A TION Problem statement. Let a = Pn−1 i=0 (ai · 2i) — a classical constant. Let b = Pn−1 i=0 (bi · 2i) — a num- ber encoded in a quantum register |b⟩. Let s = (a + b) mod 2n = Pn−1 i=0 (si · 2i). Our task is to build a quantum circuit that acts on a register of n qubits and applies an unitary matrix U+a, such that U+a|b⟩ = |s⟩...

  6. [3]

    The basic idea First, note that if a is even, then a = 2z · a′ where a′ is odd, so the task is reduced to adding number a′ to n − z most significant bits of b

    CIRCUIT CONSTRUCTION 3.1. The basic idea First, note that if a is even, then a = 2z · a′ where a′ is odd, so the task is reduced to adding number a′ to n − z most significant bits of b. If a = 0, the adder is an empty circuit. If a /∈ [0, 2n − 1], the task is reduced to adding a mod 2n. So, moving forward, we can assume that a ∈ [1, 2n − 1] and a is odd (...

  7. [4]

    Eliminate adjacent classically controlled X gates

  8. [6]

    Eliminate the first ancilla, because c1 = b0

Show all 24 references
  1. [7]

    Cancel some Xai (bi) gates in the last column

  2. [8]

    Push two Xan−2 (cn−1) gates to the qubit bn−1 and merge it with Xan−1 (bn−1) gate, resulting in the Xan−2⊕an−1 (bn−1) gate

  3. [11]

    For these adders we as- sume that adders-by-constants were built using procedure shown on fig

    COMPLEXITY ANAL YSIS We compare our circuit with several known in-place quantum adders: Cuccaro Ripple-Carry Adder (RCA) [2], Draper Carry-Lookahead Adder (CLA) [ 3], Takahashi RCA [4] and Gidney RCA [ 5]. For these adders we as- sume that adders-by-constants were built using ...

  4. [12]

    To our knowledge, it’s more efficient than any circuit that can be constructed using any known quantum-by-quantum adder

    CONCLUSION We proposed a circuit that adds a classical number to a quantum register in-place, using only n − 3 ancillas and having T-count of 4 n − 5. To our knowledge, it’s more efficient than any circuit that can be constructed using any known quantum-by-quantum adder

  5. [13]

    CNOT-count optimized quantum circuit of the Shor’s algorithm,

    X. Liu, H. Yang, and L. Yang, “CNOT-count optimized quantum circuit of the Shor’s algorithm,” 2021. https://arxiv.org/abs/2112.11358

  6. [14]

    A new quantum ripple-carry addition circuit,

    S. A. Cuccaro, T. G. Draper, S. A. Kutin, and D. P. Moulton, “A new quantum ripple-carry addition circuit,”

  7. [16]

    A logarithmic-depth quantum carry-lookahead adder,

    T. G. Draper, S. A. Kutin, E. M. Rains, and K. M. Svore, “A logarithmic-depth quantum carry-lookahead adder,”

  8. [17]

    https://arxiv.org/abs/quant-ph/0406142

  9. [18]

    Quantum addition circuits and unbounded fan-out,

    Y. Takahashi, S. Tani, and N. Kunihiro, “Quantum addition circuits and unbounded fan-out,” 2009. https://arxiv.org/abs/0910.2530

  10. [19]

    Halving the cost of quantum addition,

    C. Gidney, “Halving the cost of quantum addition,” Quantum 2 (2018) 74. https://arxiv.org/abs/1709.06648

  11. [20]

    Q# standard library

    “Q# standard library.” https://github.com/ microsoft/qsharp/tree/main/library/std

  12. [21]

    Addition on a quantum computer,

    T. G. Draper, “Addition on a quantum computer,” 2000. https://arxiv.org/abs/quant-ph/0008033

  13. [22]

    Fast quantum modular exponentiation architecture for Shor’s factorization algorithm,

    A. Pavlidis and D. Gizopoulos, “Fast quantum modular exponentiation architecture for Shor’s factorization algorithm,” Quantum Information and Computation14 (2014) no. 7&8, . https://dl.acm.org/doi/10.5555/2638682.2638690

  14. [23]

    A class of efficient quantum incrementer gates for quantum circuit synthesis,

    X. Li, G. Yang, C. M. Torres Jr, D. Zheng, and K. L. Wang, “A class of efficient quantum incrementer gates for quantum circuit synthesis,” International Journal of Modern Physics B28 (2014) no. 01, 1350191. http://dx.doi.org/10.1142/S0217979213501919

  15. [24]

    Implementation of circuits proposed in this paper

    “Implementation of circuits proposed in this paper.” https://github.com/fedimser/quant-arith-re/blob/ main/src/QuantumArithmetic/ConstAdder.qs. 4 Figure 5: 5-qubit Quantum Adder by Constant (unoptimized) Figure 6: 5-qubit Quantum Adder by Constant (partially optimized) 5 Figur...

  16. [2004]

    https://arxiv.org/abs/quant-ph/0410184

Pith tools

Reviewed August 10, 2026 · model on record in the stance chip above.