Elamur Research

A new quantum ripple-carry addition circuit

Paper · 2004 · Steven A. Cuccaro, Thomas G. Draper, Samuel Kutin et al.

Summary

Adding two binary numbers becomes a different engineering problem when the computation must be reversible. An ordinary addition procedure can discard intermediate carries once they have served their purpose. A reversible circuit must arrange its work so that those temporary values can be removed without losing the information needed to reverse the computation. A new quantum ripple-carry addition circuit addresses the resulting resource problem: how to perform addition with little spare quantum memory while keeping the circuit short and its gate count low.

The authors construct a ripple-carry adder that needs only a single ancillary qubit, meaning a spare qubit used during the calculation. The circuit advances from the least significant input bits towards the most significant ones, computing carries along the way. It then travels back through the bit positions, restoring the input storage that temporarily held those carries and writing the sum into the other input register. The key component is an in-place majority operation: it computes the next carry by temporarily changing existing storage instead of allocating a separate location for every intermediate value.

This changes the resource balance relative to the earlier adder of Vedral, Barenco, and Ekert, which the paper calls VBE. That construction uses an amount of scratch memory that grows with the input width. The new circuit reduces the ancillary requirement to a single qubit while also reducing the leading Toffoli count and improving depth. For inputs of width n, with n ≥ 2, the optimized circuit contains 2n−1 Toffoli gates, 5n−3 CNOT gates, and 2n−4 negations. Its depth is 2n+4 under the paper’s gate scheduling convention. These are circuit resource calculations, rather than measurements from a hardware experiment.

The paper also shows how the construction changes when the requested output changes. It gives versions for addition modulo a power of two, addition with an incoming carry, and extraction of the highest sum bit while preserving both inputs. The last version can be combined with subtraction to obtain a comparator. The conclusions remain carefully bounded: the authors do not prove that their resource tradeoff is optimal, and they explicitly leave open whether logarithmic depth can coexist with only a constant amount of ancillary storage. They also identify a setting in which a transform-based adder appears preferable: adding a fixed classical quantity to a quantum register.

Interesting ideas

Preserve information by changing its representation. The in-place majority component produces a carry without treating the majority function as an irreversible replacement for all its inputs. The surrounding reversible transformation retains enough information to recover what was there before. This is a useful design principle whenever a procedure appears to require discarding information: reconsider the representation of the whole state, instead of focusing only on the desired output. In reversible computation, this is essential for correctness. In ordinary software, the related habit can help when designing transformations that must support rollback, inspection, or exact reconstruction.

Use existing storage for temporary dependencies. The circuit writes intermediate carries into locations that initially held an addend. Those locations are restored during the return pass. The important insight is not simply to reuse memory, but to reuse it according to the dependency structure of the computation. A location can hold a temporary value when its original contents remain recoverable and when the temporary value will be consumed in a predictable order. The broader lesson applies to implementations with tight memory budgets: track when information is needed, where it can live temporarily, and what must happen before that storage becomes available again.

Combine cleanup with useful output. The backward pass does more than erase carries. Its UnMajority and Add component restores earlier information while producing the relevant sum bit. This makes cleanup part of the computation’s productive work. A similar question can guide other designs: when a temporary representation must be dismantled, can that process also produce a final result? The answer depends on the task, but the question is valuable because a simple “compute, copy, undo everything” structure may miss opportunities to share work between output production and restoration.

Optimize the schedule as well as the components. The paper presents alternative implementations of the same UnMajority and Add transformation, then chooses the one that exposes more parallel execution. It also moves gates across neighboring components when their operations commute. A component’s local gate count therefore does not fully describe its value inside a larger circuit. The same engineering lesson applies to staged transformations and dependency graphs: evaluate a component together with its neighbors, because a locally less obvious implementation may permit a better global schedule.

Exploit promises at the boundaries. Knowing that the initial carry is zero allows the authors to simplify the beginning of the calculation. Knowing that the final carry is needed only at the output allows them to avoid an unnecessary intermediate write and cleanup. These improvements come from the contract of the whole operation, rather than from changing its central carry rule. Elsewhere, an explicitly known initial state or restricted output requirement can justify similar simplifications. The condition must remain visible, because the incoming-carry variant loses a particular optimization precisely when that initial-state promise disappears.

Compute only the result the caller needs. The modular adder omits the highest carry, while the high-bit circuit avoids producing the lower sum bits. These are distinct operations with distinct resource counts. The reusable idea is to specialize around the actual output contract before optimizing an unnecessarily general implementation. For a compiler, numerical routine, or symbolic procedure, the corresponding question is whether the caller needs a complete transformed object, a truncated result, or only a predicate. The paper demonstrates that these choices can change both the work performed and the cleanup strategy.

Keep resource claims tied to their assumptions. The authors separately discuss ancillary storage, Toffoli gates, CNOT gates, time-slices, and a decomposition into controlled rotations. They also explain why adding a compile-time constant changes the comparison with a transform adder. This is a strong reporting habit: state which resource is being counted and which operations are considered elementary. It prevents an improvement under one accounting convention from becoming an unsupported claim of practical superiority.

Deep dive: A new quantum ripple-carry addition circuit

How the Cuccaro quantum ripple-carry adder uses a single spare qubit, restores temporary state, and reduces gate counts and circuit depth. · about 34 minutes to read

How Mova uses it

For Mova, a small transparent language system written in Rust, the concrete connection is a set of possible engineering practices. The paper establishes a quantum arithmetic construction; it does not establish a language-processing method or a Mova implementation. The uses described in this section are proposals for how its reasoning could inform Mova’s design.

A useful starting point is explicit accounting for temporary state. Mova could make the lifetime of intermediate representations visible in its Rust implementation: which information belongs to the input, which belongs to the result, and which exists only to connect successive processing stages. The adder is particularly clear about these roles. An input location temporarily holds a carry, a separate output location receives the highest bit, and the ancillary location has a defined role at the start and end. A language system could borrow that clarity without copying the circuit’s arithmetic structure.

This would be relevant to code and programming languages because the distinction can be expressed in interfaces and internal data structures. A transformation could specify what it reads, what it changes, and which temporary values it leaves behind. For a transparent system, those declarations could also support an execution trace that explains how a result was assembled. The proposed benefit is inspectability: a developer should be able to tell whether a piece of state is a final linguistic decision, a preserved input, or disposable working information.

The comparison between majority and UnMajority and Add also suggests a way to think about staged processing. An initial pass may create intermediate decisions that a later pass consumes while constructing the final representation. Before retaining all those intermediates permanently, Mova could examine whether some can be released as their last consumers finish. The useful analogy concerns dependencies and storage lifetimes. The paper gives no reason to assume that a language-processing pipeline can be made reversible, or that reconstructing its intermediate decisions would be inexpensive.

Another possible use is output-specific execution. The paper’s full adder, modular adder, and high-bit operation share machinery but promise different results. Mova could apply the same interface discipline when a caller requests a complete analysis, a restricted view, or a particular decision. An implementation should first make that distinction explicit, then determine whether it can avoid work that the requested output does not require. This remains a design possibility, not a claim that any particular Mova operation already supports such specialization.

The paper also offers a useful standard for performance explanations. If Mova reports a faster or smaller implementation, the report could distinguish temporary memory, total operations, and the length of the dependency chain. These quantities can move differently, just as the new adder uses fewer Toffolis while its leading CNOT count exceeds the earlier construction’s leading CNOT count. A transparent account should explain the tradeoff instead of compressing it into a single favorable adjective.

Finally, Mova could borrow the authors’ treatment of special cases. A known initial condition should be recorded as a precondition for an optimization. When that condition changes, the implementation should identify which shortcut is no longer justified. In the adder, allowing an incoming carry has exactly this effect. In Mova, the corresponding discipline would be to connect every specialized execution path to the input or output promise that makes it valid. The paper supports this as an engineering lesson; it supplies no evidence that its quantum gate savings transfer directly to language processing.

The problem and its context

Addition with a requirement to restore temporary work

The arithmetic task begins with two binary inputs of equal width. One register contains the first addend, and another contains the second. The desired circuit preserves the first addend, replaces the second with the lower sum bits, and sends the remaining high bit to an output location.

This arrangement matters because the computation must be reversible. Reversibility requires that the circuit’s transformation retain enough information to recover its starting state. A conventional description of addition often focuses only on the result and treats intermediate carries as disposable. Here, the carries are part of a physical state transformation. Their creation, use, and removal all belong to the algorithm.

Ripple-carry addition offers a straightforward dependency pattern. The lowest position determines the carry entering the next position. That position determines the following carry, and the process continues toward the highest position. Each local calculation depends on a small amount of information, but the carries form a chain. The simplicity of that chain makes the construction easy to organize; its sequential nature also creates the central depth constraint.

The reversible version adds a return journey. Once the highest carry has been obtained, the circuit works back towards the lowest position to remove the intermediate carries. A poor implementation could spend substantial storage on those intermediate values or incur unnecessary work while cleaning them up. The paper asks how much of that overhead can be avoided while retaining the ripple-carry structure.

The earlier ripple-carry construction

The direct comparison is with the VBE adder. As described by the authors, that circuit already performs an in-place sum of the same general kind: it accepts two inputs of width n and produces the highest sum bit separately. Its ancillary requirement, however, grows with n.

The paper states that requirement as:

ancillae_VBE = n − O(1)

Here, ancillae_VBE is the amount of scratch storage used by the VBE construction, n is the input width, and O(1) represents a term whose size remains bounded as n grows. The expression describes linear growth in the scratch requirement; it is not an exact count for a particular input width.

The introduction also gives leading gate counts for that baseline. Its CNOT count is 4n+O(1), and its Toffoli count is 4n+O(1). A CNOT is a controlled negation: whether a target bit is flipped depends on a control bit. A Toffoli adds another control, so the target changes only under the required joint condition. The paper describes limited parallelism in the earlier arrangement.

The new construction targets all these concerns together. Its main space improvement comes from storing carries in existing input locations. Its reduction in expensive logical work comes from the structure of the local carry components and their boundary treatment. Its depth improvement comes from scheduling gates across those components.

That combination is significant. A memory-saving construction could, in principle, become unattractive if it required substantially more sequential work. Conversely, a shallow circuit could demand more scratch storage. The paper’s contribution is a particular resource tradeoff that improves several quantities relative to the earlier ripple-carry baseline, while still leaving broader tradeoff questions unresolved.

Other addition approaches in the paper

The conclusions place the result beside a logarithmic-depth adder and a transform-based adder. These comparisons serve different purposes.

The logarithmic-depth construction illustrates the role of extra storage. The authors describe an adder that achieves logarithmic depth using 2n ancillary qubits. They also discuss a more general family in which the amount of auxiliary storage and the depth vary together. This context makes the open question precise: reducing scratch space to a single qubit is useful, but it does not establish that the resulting linear depth is unavoidable.

The transform adder illustrates dependence on the available operations. The paper says that both its ripple-carry construction and the transform alternative have linear depth. Their practical comparison depends on the relative implementation costs of Toffoli gates and controlled rotations. A statement about circuit depth alone therefore cannot decide which would be easier to realize.

There is also an important asymmetry when the second addend is a fixed classical quantity. The ripple-carry construction still requires quantum storage for that addend. The transform approach can incorporate the known value through fixed rotations. The authors regard the transform adder as preferable in that setting.

These comparisons define the scope of the paper’s achievement. It provides an economical reversible ripple-carry circuit and analyzes useful variations. It does not present ripple carry as universally preferable to every addition technique, and it does not erase the importance of the input contract or the elementary gate set.

The method, step by step

Specify the registers and the result

The authors write the first input as:

a = aₙ₋₁ ⋯ a₀

The symbol a denotes the whole binary number. Each aᵢ is its bit at position i, and a₀ is the least significant bit. The second input b is written in the same way, using bits bᵢ.

The storage locations are distinguished from the values they initially contain. Aᵢ starts with aᵢ, while Bᵢ starts with bᵢ. This distinction becomes essential because the algorithm temporarily changes some A locations. A location named Aᵢ does not contain the original input bit throughout the entire circuit.

At completion, the B locations contain the lower sum bits, written sᵢ. The A locations again contain the first addend. A separate location Z receives the contribution of the highest sum bit. In the basic construction, an ancillary location X starts at zero and supplies the initial carry.

The output location has a deliberately flexible contract. It may begin with a value z rather than being required to start at zero:

Z: z ↦ z ⊕ sₙ

Z names the output location, z is its initial bit value, and sₙ is the highest sum bit. The symbol ⊕ denotes exclusive OR. The arrow describes the change made by the circuit. If Z starts cleared, it ends with the high bit; more generally, that high bit is combined reversibly with its existing contents.

This contract is part of the result, not an incidental choice. Later in the paper, the authors distinguish their construction from a proposed version without ancillary qubits that requires the output to begin at zero.

Express carries as majority values

The carry sequence begins with a known boundary condition:

c₀ = 0

The symbol c₀ is the carry entering the lowest bit position. It is zero for ordinary addition without an external incoming carry.

Each subsequent carry is determined by the input bits at that position and the carry arriving from below:

cᵢ₊₁ = maj(aᵢ, bᵢ, cᵢ)

Here, cᵢ₊₁ is the carry leaving position i, while aᵢ and bᵢ are the original addend bits at that position. The function maj returns the majority value of its arguments. A carry is produced when enough of those bits are set to require a contribution to the next position.

The paper gives the Boolean expression:

maj(aᵢ, bᵢ, cᵢ) = aᵢbᵢ ⊕ aᵢcᵢ ⊕ bᵢcᵢ

The products aᵢbᵢ, aᵢcᵢ, and bᵢcᵢ denote Boolean AND operations. The exclusive OR symbols combine those terms. All symbols describe bits, so this is a Boolean identity rather than ordinary arithmetic over unrestricted integers.

Once the incoming carry for a position is known, its sum bit is:

sᵢ = aᵢ ⊕ bᵢ ⊕ cᵢ

The symbol sᵢ denotes the output bit at position i, with i below n. The other terms are the two original input bits and their incoming carry. Exclusive OR gives the parity needed for the local sum.

The final sum bit has a simpler definition:

sₙ = cₙ

Here, sₙ is the high output bit and cₙ is the carry leaving the highest input position. This identifies the final carry as an output that should be retained, unlike the intermediate carries that must be removed.

These equations describe the arithmetic dependency. The circuit problem is to realize them with reversible gates while arranging storage so that the original addend and temporary workspace are recovered.

Build a reversible majority component

The first local component computes a majority value in place. Its construction uses CNOT gates followed by a Toffoli gate. It changes the state of the participating locations so that the next carry is available without introducing a dedicated scratch location for that carry.

The phrase “in place” needs care. Majority on its own does not preserve all information about its inputs. The circuit therefore does more than replace a group of input bits with their majority. Its other outputs retain transformed information that makes the overall operation reversible.

Within the adder, this component writes cᵢ₊₁ into Aᵢ. The original aᵢ is temporarily no longer present there in its initial form. Nevertheless, the information needed to restore it remains distributed across the local state.

This is the central storage trick. Rather than maintaining a separate carry register whose size grows with the input width, the circuit uses the A locations as temporary homes for the carry chain. The forward pass can continue because the carry needed by the next position is now available where the construction expects it.

The paper’s explanation separates this logical role from later scheduling details. First, it establishes that a suitable reversible majority transformation exists and that it can be chained. Only afterward does it reorganize individual gates to reduce depth.

Return through UnMajority and Add

The second component is called UnMajority and Add, abbreviated UMA. It is designed to act after the forward computation has finished using the carry created at a position.

UMA restores the original addend bit in Aᵢ. It also restores the earlier carry in the preceding carry location, which lies in the A storage during the interior of the chain. At the same time, it writes sᵢ into Bᵢ.

This combination explains why the return pass is productive. A literal reversal of every forward operation would recover the initial inputs but would not leave the desired sum in the second register. UMA instead performs the cleanup needed for reversibility while preserving the useful arithmetic result in the correct place.

The authors give alternative implementations of UMA that act identically on the participating qubits. One is easier to understand directly; the other allows more parallel work when embedded in the full circuit. The optimized adder uses the version with 3 CNOT gates.

At the level of the full operation, the algorithm is:

Carry propagation, output, and restoration

The steps in order.

Carry propagation, output, and restorationStep 1: Place inputs in the addend registers1. Place inputs in the addend registersStep 2: Supply the initial carry2. Supply the initial carryStep 3: Compute carries through in-place majority3. Compute carries through in-place majorityStep 4: Write the highest sum bit4. Write the highest sum bitStep 5: Restore addend storage while producing sums5. Restore addend storage while producing sumsStep 6: Return the ancillary workspace6. Return the ancillary workspace

The forward and backward directions serve different information needs. Moving upward makes later carries available. Moving downward releases those temporary carries while completing the lower outputs. The single ancillary location supplies the boundary of this chain.

Assemble the basic ripple

The basic circuit strings majority components together from low significance to high significance. Once the highest carry has been reached, it contributes that bit to Z. UMA components then run in the reverse positional order.

At the beginning of this version, X contains c₀. Because ordinary addition has no incoming carry, X is initialized to zero. The paper’s basic circuit illustration uses n = 6, showing how the same local pattern repeats across the register.

The important role of that example is structural. It makes the carry chain and the return path visible. It is not an experimental sample or a test population, and the construction is not restricted to that input width.

A newcomer can read the whole procedure as a temporary change in the meaning of storage. During the forward pass, parts of A cease to be ordinary addend storage and become carry storage. During the backward pass, those locations recover their initial meaning, while B changes from the second addend into the sum. The circuit succeeds because these changes occur in an order that preserves every dependency.

The optimized construction retains that logic. It changes where some work is performed, when individual gates can execute, and how the ends of the chain are handled.

Move independent operations out of the carry chain

The first scheduling improvement concerns CNOT operations that do not need to wait for each preceding carry. The authors move the initial CNOTs from the majority components into a shared time-slice near the beginning. They similarly gather the final CNOTs from UMA into a shared time-slice at the end.

A time-slice is a set of operations that can be carried out together under the circuit’s scheduling assumptions. Counting time-slices measures dependency depth rather than total gate count. Several gates can contribute to a single slice if the schedule permits them to run in parallel.

This reorganization matters because a ripple-carry circuit already has an unavoidable-looking sequential core: a carry must become available before it can influence the following carry. Operations outside that dependency need not add a separate delay at every bit position.

The paper therefore distinguishes work that genuinely belongs to the carry chain from work that merely happens to appear inside the same local component diagram. Moving the latter work to the boundaries exposes parallelism without changing the arithmetic transformation.

Commute gates across adjacent components

Further scheduling improvements come from exchanging the order of operations that commute. Commuting operations can be reordered without changing the circuit’s overall action.

During the majority ripple, the authors exchange a Toffoli associated with one position and a CNOT associated with the next position. After this change, that Toffoli can overlap with a CNOT farther along the sequence.

The backward half admits a related transformation. A Toffoli from a later UMA component can change order with a CNOT from an earlier one, allowing another overlap with work elsewhere in the return sequence.

The result is not a fully parallel carry computation. The Toffoli operations still form the main sequential chain. The improvement is that supporting CNOT work no longer has to sit between every successive carry operation in the most direct arrangement.

This is also why the alternative UMA implementation matters. Equivalent local functions can expose different opportunities for neighboring operations to overlap. The paper chooses the version whose internal arrangement supports the desired global schedule.

Simplify the known initial carry

Ordinary addition supplies a special fact at the low end: c₀ is zero. Substituting that condition into the carry rule gives:

c₁ = a₀b₀

The symbol c₁ is the carry entering the next bit position, and a₀b₀ is the Boolean AND of the lowest input bits. Because the incoming carry is known, the full general majority calculation is unnecessary at this boundary.

The optimized circuit computes this carry directly with a Toffoli and stores it in the ancillary location. On the return journey, it reverses that operation and uses a CNOT to complete the lowest sum bit.

This changes the interpretation of the ancilla between the basic and optimized presentations. In the basic arrangement it initially represents c₀. In the optimized arrangement it temporarily holds c₁.

The distinction becomes important when an incoming carry is allowed. Then the initial carry is no longer known to be zero, so this boundary simplification cannot be used. The rest of the scheduling improvements remain applicable.

Send the final carry straight to its destination

The high end offers a different simplification. A direct composition would first write the final carry into an A location, transfer it to Z, and then erase the temporary copy. The optimized circuit instead produces the required output contribution directly.

In place of the central configuration of two Toffoli gates, two CNOT gates, and two negations, the authors use one Toffoli gate together with two CNOT gates. A CNOT in the replacement can overlap with other work.

This is an output-oriented optimization. Intermediate carries need temporary storage because they support subsequent calculations. The last carry has no later carry to support; it is already the desired high output. Treating it like an interior carry introduces work that the output contract does not require.

Together, these changes give the final resource counts. The construction applies beyond the particular illustration, although the printed pseudocode is stated for n ≥ 4. The exact full-adder counts are stated for n ≥ 2.

Adapt the output contract

For modular addition, the requested result is:

s = (a + b) mod 2ⁿ

The symbol s denotes the retained result, a and b are the inputs, and 2ⁿ is the modulus associated with keeping the lower n bits. The final carry is omitted.

The authors implement this by applying their addition construction to the lower n−1 positions, using the highest B location as the output destination for that smaller addition. A final CNOT contribution from the highest A location completes the highest retained sum bit. That contribution can overlap the final time-slice of the lower-position calculation.

For addition with an incoming carry, the target is:

s = a + b + y

The extra input y supplies the initial carry. It takes the role previously associated with the zero-initialized carry location in the basic construction. The circuit must now handle that input generally, so it cannot use the zero-carry shortcut.

For the high-bit-only operation, the forward half still computes the final carry and contributes it to Z. The return half changes: it simply reverses the carry computation, restoring both addends rather than writing lower sum bits into B. This is the appropriate cleanup when the lower sum is not part of the requested output.

Turn the high-bit operation into comparison

The paper connects subtraction to addition through:

a − b = (a′ + b)′

The prime denotes bitwise complementation. The symbols a and b are the operands, and the subtraction is interpreted within the complement arithmetic conventions discussed by the authors.

The circuit adaptation adds time-slices for complementing the relevant values before and after the addition. Combining subtraction with the high-bit-only calculation yields a comparator: the selected high result bit indicates whether a is less than b.

This extension shows why output-specific circuit design matters. A comparison does not need all the lower bits of a subtraction result. The high-bit construction already provides the needed pattern: compute the relevant carry-related information, retain the output contribution, and reverse the temporary work.

There is no training or data preparation procedure in this method. Its objects are registers, gate sequences, Boolean identities, and schedules. The results follow from the specified transformations and their resource accounting.

Experiments and results

What the evidence consists of

The paper reports circuit constructions and analytical resource counts. It does not evaluate accuracy on a dataset, train parameters, or report execution times from a physical device. The relevant measures are ancillary qubits, gate counts by type, and depth measured in time-slices.

That distinction is essential to interpreting the result. A smaller Toffoli count is a precise statement about the logical circuit. It becomes a practical performance advantage only after considering how the gates are implemented and which operations can actually overlap.

The baseline comparison is the VBE ripple-carry adder. The introduction describes its leading CNOT and Toffoli counts as 4n+O(1) for each gate type, with an ancillary requirement that grows linearly. The new circuit uses a single ancillary qubit and has a leading Toffoli count of 2n+O(1).

The leading CNOT count of the new construction is 5n+O(1). Thus, the resource improvement should not be described as a reduction in every individual gate category. The paper’s stronger claims concern the ancillary requirement, the Toffoli contribution, overall circuit size, and depth.

The authors also state that the VBE circuit requires 3n−1 Toffoli slices and 3n−1 CNOT slices. These are scheduling quantities, distinct from its leading total gate counts. They provide a more detailed basis for understanding why the new arrangement has lower depth.

The optimized full adder

For n ≥ 2, the Toffoli count is:

T_full(n) = 2n − 1

T_full(n) denotes the number of Toffoli gates in the optimized full adder, and n is the width of each addend.

Its CNOT count is:

C_full(n) = 5n − 3

C_full(n) denotes the CNOT total for that same circuit. The input width and output contract are unchanged.

The negation count is:

N_full(n) = 2n − 4

N_full(n) counts the negation operations. These are tracked separately from the controlled gates.

The depth is:

D_full(n) = 2n + 4

D_full(n) is the scheduled circuit depth. The authors describe its composition as 2n−1 Toffoli time-slices together with 5 CNOT time-slices.

The distinction between CNOT count and CNOT depth is especially informative. The circuit contains a number of CNOT gates that grows with n, yet their contribution to the stated depth is a fixed collection of layers. The scheduling transformations concentrate them around, and alongside, the sequential carry work.

The effect of allowing an incoming carry

With an incoming carry, the Toffoli count remains 2n−1, while the CNOT count is 5n+1 and the negation count is 2n−2. For n ≥ 2, the depth becomes 2n+6.

The Toffoli part still occupies 2n−1 slices. The CNOT contribution becomes 7 slices. This isolates the scheduling cost of making the lowest boundary general rather than assuming a zero incoming carry.

Full addition, CNOT time-slices with and without incoming carry

The known zero carry permits a smaller CNOT layer budget.

Full addition, CNOT time-slices with and without incoming carryIncoming carry allowed: 7Incoming carry allowed7Zero incoming carry (this paper): 5Zero incoming carry (this paper)5
The numbers
System or settingCNOT time-slices
Incoming carry allowed7
Zero incoming carry (this paper)5

This comparison holds the overall arithmetic structure mostly fixed while changing the initial-state contract. It does not measure a hardware speedup. It shows how a particular logical promise changes the optimized schedule.

The incoming-carry result is useful because the basic design already accommodates that input. The circuit family does not need a wholly separate carry mechanism; it needs to forgo a simplification that depended on the initial carry being known.

Modular addition

For n ≥ 3, the version that omits the highest carry contains 2n−3 Toffoli gates, 5n−7 CNOT gates, and 2n−6 negations. Its depth is 2n+2.

The corresponding slice description is 2n−3 Toffoli layers together with 5 CNOT layers. The unchanged CNOT layer budget reflects the fact that the highest retained sum-bit operation can be scheduled alongside work already present.

The modular variant with an incoming carry is also stated for n ≥ 3. It uses 2n−3 Toffolis, 5n−3 CNOTs, and 2n−4 negations. Its depth is 2n+4, with 2n−3 Toffoli slices and 7 CNOT slices.

These results should be compared according to their output requirements. Modular addition does less than the full adder because it does not preserve the carry beyond the retained register width. Its smaller circuit is therefore an example of specialization, rather than evidence that the full-output construction contains unnecessary work under its own contract.

Computing only the highest bit

For n ≥ 2, the high-bit-only circuit uses 2n−1 Toffolis and 4n−3 CNOTs. Its depth is 2n+3, comprising 2n−1 Toffoli slices and 4 CNOT slices.

The incoming-carry version has 2n−1 Toffolis and 4n+1 CNOTs. Its depth, again stated for n ≥ 2, is 2n+5. The schedule contains 2n−1 Toffoli layers and 6 CNOT layers.

High-bit computation, CNOT time-slices by incoming-carry setting

Fixing the initial carry reduces the CNOT layers needed for high-bit extraction.

High-bit computation, CNOT time-slices by incoming-carry settingIncoming carry allowed: 6Incoming carry allowed6Zero incoming carry (this paper): 4Zero incoming carry (this paper)4
The numbers
System or settingCNOT time-slices
Incoming carry allowed6
Zero incoming carry (this paper)4

The key behavioral difference from full addition is preservation of the second input. The circuit returns through inverse majority work rather than using UMA to write the lower sum. Its output is a selected bit of the arithmetic result, not a replacement of B with that result.

This distinction makes the high-bit circuit relevant to comparison. The result shows how an arithmetic predicate can reuse carry propagation while avoiding lower-output generation.

Controlled-rotation depth

The conclusions revisit depth under a different choice of elementary operations. The authors note that a Toffoli can be implemented using five controlled rotations. A straightforward expectation for the resulting depth is:

D_expected(n) = 10n + O(1)

D_expected(n) denotes that initial controlled-operation depth expectation. The term O(1) represents a bounded contribution independent of input width.

The actual overlapping construction has:

D_rotation(n) = 6n − 2

D_rotation(n) is the depth of the ripple-carry circuit when expressed through the controlled-rotation arrangement discussed by the authors. The improvement comes from overlap between decomposed Toffoli operations.

The illustrated case has n = 5 and depth 28. Those values are stated for the controlled-rotation circuit example. They should not be confused with the earlier depth expression that treats Toffoli gates as circuit primitives.

The same illustration uses a square root of NOT, described as a rotation by π/2, together with its inverse. Its role is to show the lower-level realization behind the depth claim.

Across these results, the recurring lesson is that resource counts require a clear accounting convention. The logical adder, its scheduled gate layers, and its implementation through controlled rotations answer related but different questions.

What the ablations show

The paper has no empirical ablation study; its explanatory comparisons consist of circuit rewrites, boundary-condition changes, output-specific variants, and an analysis under controlled-rotation decomposition.

The local gate choice matters through the global schedule

The alternative UMA implementations provide a controlled comparison at the component level. They compute the same transformation on the qubits, so the output behavior is not what distinguishes them. Their value differs through the parallelism they allow in the surrounding circuit.

The optimized construction requires the 3-CNOT UMA implementation. This shows that logical equivalence does not imply equal usefulness for depth optimization. The arrangement of operations inside a component can determine whether operations from neighboring components can be placed in the same time-slice.

The paper does not provide a separate final depth for every possible UMA choice. Its evidence is constructive: it identifies the implementation that supports the subsequent commutation and scheduling steps. A careful reading should therefore distinguish an explained mechanism from a complete factorial comparison of all component alternatives.

Moving gates exposes work outside the dependency chain

Gathering the first majority CNOTs into an initial slice, and the final UMA CNOTs into a closing slice, isolates operations that need not follow the ripple one position at a time. This directly explains why a linear total CNOT count need not imply a linear CNOT contribution to depth.

The neighboring-gate exchanges then expose further overlap inside the forward and backward passes. Their significance is causal: the circuit becomes shallower because operations that do not depend on each other are no longer forced into the same sequential ordering as the carries.

The paper does not claim that this removes the carry dependency itself. The Toffoli slice count still tracks the length of the forward and return computation. The analysis identifies supporting work that can be hidden alongside that dependency, instead of demonstrating unrestricted parallel addition with the same storage budget.

The incoming carry tests a boundary assumption

The incoming-carry variant is especially revealing because it changes a single important promise. The initial carry is no longer fixed at zero.

That prevents the simplified lowest-position calculation, while leaving the other improvements available. The full-adder Toffoli count remains 2n−1, but the CNOT count becomes 5n+1 and the stated depth becomes 2n+6.

This comparison explains which part of the optimization depends on a known initial state. It also shows that the design’s core storage method survives the more general input contract. The carry can still ripple through input locations and be removed afterward; the circuit merely needs a general treatment of its beginning.

The modular and high-bit variants repeat the same pattern. Their incoming-carry versions retain the central structure but require a different CNOT layer budget. That consistency supports the authors’ account of the initial carry as a local boundary issue with consequences for the global schedule.

Direct output avoids an intermediate lifetime

The final-carry rewrite demonstrates a different kind of simplification. The straightforward central arrangement would give the last carry a temporary lifetime in an A location even though its final destination is already known.

Writing the output contribution directly avoids the work of creating and removing that intermediate representation. The authors specify the replacement at the gate level, making the source of the savings concrete.

This analysis supports a broader interpretation of the design: storage reuse alone is not enough. Once carries are being managed in place, the circuit still benefits from recognizing that the final carry has a different role from an interior carry.

The paper does not separately report a full resource curve for the circuit before and after only this replacement. Its contribution is the explicit local rewrite and the final count for the optimized combination.

Different outputs require different return passes

The high-bit-only circuit provides a useful contrast with the full adder. Both need the upward carry computation. Their return journeys differ because their outputs differ.

For the full sum, the return operation must restore A while placing the sum into B. For the high bit alone, it should restore both inputs. Reversing the majority sequence is therefore appropriate for the latter, while UMA is appropriate for the former.

This comparison explains why cleanup cannot be designed independently of the desired output. “Undo the temporary work” is incomplete as an algorithmic specification. One must say which information should remain changed when the cleanup is finished.

The modular variant makes a related point at the high end. If the caller does not require the outgoing carry, the circuit can stop treating it as an output and instead complete only the retained highest sum bit.

Decomposition changes the apparent depth

The controlled-rotation discussion analyzes a concern that would remain hidden if the paper stopped at Toffoli-level counts. Replacing each Toffoli independently by its component operations suggests the depth expression 10n+O(1).

The overlapping arrangement instead has depth 6n−2. The lower-level pieces of neighboring logical gates can share a schedule more effectively than independent substitution would suggest.

This is not an experimental comparison between physical technologies. It is a circuit-level demonstration that decomposition and scheduling should be considered together. The practical conclusion remains conditional on how the chosen operations are realized.

Limitations

The authors leave optimality open

The paper explicitly does not settle the optimal space-depth tradeoff for reversible addition. Its circuit uses a single ancillary qubit and has linear depth, but the authors ask whether linear depth is necessary under that storage restriction.

They contrast their result with a logarithmic-depth construction using 2n ancillary qubits. They also describe a broader tradeoff:

ancillae(k) = n/k

Here, ancillae(k) denotes the auxiliary storage in the circuit family under discussion, n is the input width, and k is a positive parameter controlling the tradeoff.

The associated depth is:

D(k, n) = O(k + log n)

D(k,n) denotes depth for that family. The O notation expresses an asymptotic bound, k is the tradeoff parameter, and log n describes logarithmic growth with input width.

These expressions frame the open problem rather than prove an optimum for the new adder. The authors ask whether logarithmic depth is possible with a constant amount of ancillary storage and, if it is not, whether an appropriate lower bound can be established.

A reader should therefore separate “this construction achieves” from “every construction must require.” The paper gives the former kind of result. It does not supply the impossibility argument needed for the latter.

Removing the ancilla changes a precondition

The authors mention a proposed variant that requires no ancillary qubits. Its output location must begin at zero.

That condition matters because the main adder allows the high output to be combined with an arbitrary initial value z. The two constructions therefore do not offer identical interfaces, even if their arithmetic purpose looks similar.

The authors leave open whether linear-depth addition can dispense with ancillary storage while retaining the more general output condition. This is a stated limitation, not merely a practical caveat added by a later reader.

The broader lesson is that a memory count cannot be evaluated in isolation from initialization requirements. A resource can disappear from the ancilla column while a constraint appears elsewhere in the operation’s contract.

Practical superiority depends on the operations available

The paper explicitly avoids deciding which linear-depth approach is easier to implement in practice: its ripple-carry circuit or the transform adder. The answer depends on how costly Toffoli gates are relative to controlled rotations.

The controlled-rotation decomposition strengthens the analysis by looking below the Toffoli abstraction. It still does not amount to a hardware performance study. The result is a schedule expressed in a different operation set, not a measured runtime.

As a careful reader’s limitation, the stated time-slices should therefore be interpreted as logical depth under the scheduling assumptions of the construction. The paper does not establish elapsed execution time for a particular machine, nor does it provide physical error measurements.

This does not weaken the resource calculations themselves. It limits the conclusions that can be drawn from them. Exact logical counts are useful evidence, but they answer a narrower question than end-to-end implementation cost.

A known classical addend favors a different approach

The authors identify an unfavorable special case for their own construction. When adding a fixed classical quantity to a quantum value, their ripple-carry method still uses n quantum bits to store the known addend.

The transform alternative can take advantage of that compile-time information. The classical addend need not occupy quantum storage, and the relevant rotations become fixed operations. The authors regard that approach as preferable in this situation.

This is an important boundary on the paper’s central memory claim. A single ancillary qubit does not mean the entire addition requires almost no additional quantum storage under every input representation. The addend registers themselves remain part of the resource requirement.

The comparison also reinforces that an input being known is a different promise from an initial carry being zero. The new adder exploits the latter effectively, but the authors say it does not simplify in the same way when an entire addend is a compile-time constant.

The accounting conventions have a defined scope

The extension section’s resource summary excludes negations from its size and depth accounting. Elsewhere, the authors provide explicit negation counts for the full adder and several variants.

A careful comparison must keep those conventions visible. A Toffoli count, a CNOT count, and an overall scheduled depth are not interchangeable descriptions of circuit cost. The same applies when comparing a logical gate implementation with its controlled-rotation realization.

The formulas also have stated input-width conditions. The exact full-adder counts apply for n ≥ 2, the modular counts for n ≥ 3, and the printed optimized pseudocode for n ≥ 4. The authors say the construction itself applies more generally, but that does not justify extending every printed count or pseudocode line beyond its stated range without further analysis.

Another limitation concerns the optimization evidence. The paper gives a sequence of justified rewrites and reports the final circuit. It does not assign an independent measured contribution to every rewrite, and it does not exhaustively enumerate all alternative schedules. Its argument demonstrates a good construction rather than a complete search over possibilities.

The result is arithmetic, not a general language-system technique

The circuit’s guarantees concern reversible binary addition and its related variants. It does not evaluate a language task or show that a language-processing system benefits from reversible execution.

Connections to Mova must therefore remain at the level of proposed engineering practices: explicit state contracts, storage-lifetime analysis, output specialization, and careful resource reporting. These are reasonable ideas to investigate, but their usefulness in that setting would need separate implementation and evaluation.

The same caution applies to general claims about memory reuse. The adder succeeds because its information flow has a very specific form, and the majority/UMA pair preserves exactly what the backward pass needs. A different computation may not admit an equally economical reconstruction strategy.

What came after

The paper defines a research agenda

The available account does not establish a later history of citing implementations or successors. The clearest continuation is the set of research questions and neighboring constructions discussed by the authors themselves. These should be read as the paper’s account of the surrounding work, rather than as a verified sequence of later advances.

The most direct question concerns addition with very little scratch storage. The new construction demonstrates a single-ancilla solution with linear depth. The authors then ask whether that depth follows necessarily from the storage restriction.

This question turns an engineering achievement into a sharper theoretical problem. Once a construction uses very little auxiliary space, further progress could take different forms: a shallower circuit with the same space allowance, a proof that such a circuit cannot exist, or a clearer characterization of which output conditions change the answer.

The logarithmic-depth carry-lookahead work attributed to Draper, Kutin, Rains, and Svore supplies an important comparison. As the paper describes it, faster depth is possible with more ancillary storage. That result does not settle the constant-storage question, but it identifies the competing resource that makes the comparison meaningful.

Output initialization becomes part of the next question

The authors also point to a proposed ancilla-free version associated with Dore and Kutin’s work. The important condition is that the output bit must start at zero.

That observation refines what progress would mean. Merely eliminating the ancillary location is not the whole challenge if the resulting construction accepts a narrower set of initial states. The unresolved target is a linear-depth circuit that removes the ancilla while preserving the main adder’s freedom in the output location.

This is a useful way to read follow-on questions in circuit design. A new resource count should be compared together with the operation’s promises and guarantees. Otherwise, two constructions may appear to solve exactly the same problem when their interfaces differ.

The paper does not report a resolution of this unrestricted ancilla-free case. Its contribution is to identify it clearly after presenting the single-ancilla circuit.

Transform addition keeps the comparison conditional

Draper’s transform adder provides another direction for continued comparison. The authors do not treat it as displaced by the ripple-carry result. Both approaches have linear depth in the discussion, and practical preference depends on the available gate operations.

Their controlled-rotation analysis makes that comparison more concrete by expressing the ripple-carry construction below the Toffoli level. The resulting depth shows that overlapping decompositions can matter. It also leaves the central implementation question open, because a logical schedule alone does not determine the relative physical cost of the alternatives.

The fixed-classical-addend case gives a more definite conclusion within the authors’ discussion. The transform approach can exploit known information in a way the presented ripple-carry circuit does not. This identifies a setting where the latter’s general in-place design is less attractive.

What remains useful across these comparisons is the paper’s method of argument. It defines an arithmetic contract, constructs reversible local components, organizes their information flow, and counts resources under explicit assumptions. Its influence can be understood through that design pattern without claiming a later adoption history that the paper does not document.

Cite

Cite as Steven A. Cuccaro, Thomas G. Draper, Samuel Kutin and David Petrie Moulton. 2004. A new quantum ripple-carry addition circuit. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.quant-ph/0410184 · arXiv quant-ph/0410184

@misc{cuccaro2004new,
  title = {{A new quantum ripple-carry addition circuit}},
  author = {Steven A. Cuccaro, Thomas G. Draper, Samuel Kutin and David Petrie Moulton},
  year = {2004},
  doi = {10.48550/arxiv.quant-ph/0410184},
  eprint = {quant-ph/0410184},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.quant-ph/0410184}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/cuccaro-2004-new-quantum-ripple-carry-addition/