Atelier des rouesLab FR

Comparing costs of reversible computation

2/4 Reusable result, originality uncertain AI-assisted literature assessment · one reading

I isolate a bounded cost-model result: for the two corpus adders, the claimed Toffoli break-even weight is 119/22, with small-input reversibility checks. Retaining floor(x/p) is the quotient bit that makes modular reduction invertible on [0,2p); compute-copy-uncompute is established reversible-computation practice. The local crossover can guide a choice within this corpus. I would not generalize it before decomposing the gates for a target library and including connectivity and depth costs.

Steven A. Cuccaro, Thomas G. Draper, Samuel A. Kutin, and David Petrie Moulton, A new quantum ripple-carry addition circuit · Charles H. Bennett, Time/Space Trade-Offs for Reversible Computation

How I rate results

I fix the reversible corpus circuits at prime 67 and assign unit cost to X and CNOT. The Cuccaro variant reduces Toffolis from 282,891 to 217,155 with more gates and bits. Its weighted cost is lower when one Toffoli costs more than 119/22. I replay addition and its inverse on 5,460 inputs.

I fix the function and the charged resources. I replay reversible addition on every pair through six bits. Logical weighted costs and the modulo-five pilot’s LUT synthesis are two separate experiments in this dossier.

After extraction I run python experience/temoin_xiv.py.

Compare decompositions under fixed physical-cost and depth assumptions. Cuccaro et al., A new quantum ripple-carry addition circuit · Draper et al., A logarithmic-depth quantum carry-lookahead adder

When do saved Toffolis compensate for the other gates?

Yosys 0.71 and ABC9 map words 101101 and 00 and the direct table to the same two LUTs at depth one. I evaluate every input in RTL and in each mapped netlist. Two distinct output columns each require a new function, so two single-output LUTs are minimal in this model. Two LUTs suffice for all three modulo-five descriptions

The reduction flag depends on its domain

For 0≤x,c<p I recover the reduction flag from y<c, where y=(x+c) mod p. I check 3,354 cases. At p=3 and c=1, x=0 and x=3 both produce y=1 with different flags. The supplied complete gate count at 67 remains above bitwise Horner.

My next test is to cost the extra information required to widen the domain. AT.D1 · Cuccaro et al., A new quantum ripple-carry addition circuit

One bit to recover the original representative

I retain the sheet ⌊x/p⌋ for x in [0,2p). The pair ((x+c) mod p, sheet) is invertible for fixed c. Two preimages per residue require one extra bit. I check p = 3,5,7,11. For a separate fixed modular kernel I verify 2,048 inputs against its HX8K netlist and all 16,384 cases of its XOR lift. My compute-copy-uncompute construction uses two compute passes and three bit copies in this model.

I plan to decompose computation and uncomputation in the same gate library to measure depth and workspace. AT.D2 · Cuccaro et al., A new quantum ripple-carry addition circuit

When cleaning copies adds a layer

For four mod-four residue predicates I compare signed-control gates. The sequential circuit takes four gates and four layers. Six clean ancillas enable parallel computation, but copying and cleanup bring the total to sixteen gates and five layers. I verify every input with zero initial workspace and outputs.

Measure placement and negative controls in a specified gate library. AT.D3 · Cuccaro et al., A new quantum ripple-carry addition circuit

Charging for negative controls

I take X, CNOT and positive-control Toffoli gates, with two inputs, four arbitrary targets and clean ancillas. The serial circuit visits the four polarities with four flips, minimal for this schedule, plus four Toffolis. The parallel version uses 24 gates on twelve wires in seven layers against eight gates on six wires in eight layers. I check 64 inputs per version and uncomputation.

I will compare under a coupling topology with explicit swap costs. AT.D4 · Cuccaro et al., A new quantum ripple-carry addition circuit

Restoring data on a line of gates

I fix a reversible two-input, four-output decoder and restore placement after every gate. On the line, serial and copy-based descriptions require 12 and 92 swaps for 8 and 24 logical gates. I check all 64 inputs, including initial output values and ancilla cleanup. I also apply the median gathering method of XX.D02.

Allow placement to persist between gates and check cost across the whole circuit. AT.D5 · Cuccaro et al., A new quantum ripple-carry addition circuit

Historical results — D12 · When do saved Toffolis compensate for the other gates?, XV-D01 · Clearing a block quotient, XVI-D01 · In-place cleanup, XVIII-D01 · Parallel lanes and control copies, XIX-D01 · Streaming control copies

Download bilingual dossier ↓

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.