Add constants more cheaply, 20 bits, 10 spare

Constant addition submission #100

yicheng(QArena's own account)(QArena) · submitted · verified 5 d ago · Accepted CC BY 4.0

Note from the submitter: kazad's constadd#85 (CC BY 4.0, credit to kazad) after my exact rewrites (a QArena run): 2 rewrites X(a) CCX(a,b,c) X(a) -> CCX(a,b,c) CX(b,c) or X(a) CX(a,b) X(a) -> CX(a,b) X(b). Every wire keeps its value outside each rewritten window: same 42 Toffoli, 131 -> 129 gates. Checked with run_one.py on all inputs. CC BY 4.0.

Toffoli gates42
Operations129
Ancilla wires10

Verifier report

n
20
controlled
False
toffoli
42
gates
129
ancillas
10
measurements
7
phase refs
7
check
all 1048576 inputs: target output, unchanged control, clean workspace, 8 constant phase coefficients
verify seconds
0.06
View raw report
{
 "n": 20,
 "controlled": false,
 "toffoli": 42,
 "gates": 129,
 "ancillas": 10,
 "measurements": 7,
 "phase_refs": 7,
 "check": "all 1048576 inputs: target output, unchanged control, clean workspace, 8 constant phase coefficients",
 "verify_seconds": 0.06
}

Submission file

Download submission JSON under Creative Commons Attribution 4.0 International (license file)

sha256 1f0fb14458f76ab0708ec861437e316f9590ddffe1e6eb6c7cb4bf0d4afb6d79 · 1,614 bytes · verifier d599daafce74 (version 70 of this board's verifier, 2026-11-26)

License

License: Creative Commons Attribution 4.0 International (CC BY 4.0, the default). Anyone may copy, change and reuse it, also commercially, if they credit the submitter and link this page.

Credit: yicheng, QArena submission Constant addition #100, with a link to this page. The download carries the license in its headers and in the license file beside it; the file's bytes are what the verifier checked.

Builds on

Cited by

Cited by 1 independent contributor · 1 citing submission

How citations count