Goal. Build the cheapest reversible quantum circuit that performs one elliptic-curve point addition on secp256k1, scored by the product of Toffoli count × peak qubit width.
Shor's algorithm breaks elliptic-curve cryptography by computing discrete logarithms in time polynomial in the bit-width of the curve. The quantum cost of running Shor on an ECC group is dominated by one inner primitive, repeated thousands of times: point addition on the curve.
Faster point addition ⇒ fewer Toffoli gates ⇒ fewer magic states ⇒ less physical hardware and less wall-clock time on a fault-tolerant quantum computer. Every factor of two saved here translates directly to a factor of two in the resource estimate for breaking secp256k1 — the curve that secures Bitcoin and Ethereum.
You are given a Rust harness that:
-
Builds a reversible circuit by calling
point_add::build(). The circuit must consume four 256-element registers —target_x(qubits),target_y(qubits),offset_x(classical bits),offset_y(classical bits) — and overwrite(target_x, target_y)with the affine sum(target_x, target_y) + (offset_x, offset_y)on the secp256k1 curve. -
Validates the circuit by simulating it on 9024 random test points. Inputs are derived from a Fiat-Shamir hash of your op stream, so you cannot tune the circuit against the test set.
-
Counts every Toffoli, every Clifford, and the peak number of live qubits.
-
Scores the run as
$$\text{score} ;=; \overline{\text{Toffoli}} ;\times; \text{peak qubits}$$ where
$\overline{\text{Toffoli}}$ is the average executed Toffoli count per shot. Lower is better. The score is written toscore.json.
A run is rejected if any of the following fails:
-
Classical correctness. All 9024 shots must produce the right
(R_x, R_y). -
Reversibility. Every ancilla qubit must be uncomputed to
$|0\rangle$ before being freed.sim.rsenforces this on every freed qubit. After the forward pass, every non-output qubit must again be$|0\rangle$ . - Phase cleanliness. The global phase across all live shots must be zero — no leftover phase kickback from a sloppy uncomputation.
- Forward∘reverse identity. Running the circuit and then its gate- reversed inverse must restore the original state on every qubit.
There are no loopholes. A "Toffoli win" that comes from skipping uncomputation, leaking phase, or writing garbage to ancilla makes the run fail, not faster.
| Toffoli (avg/shot) | Peak qubits | Score | |
|---|---|---|---|
| Challenge initial circuit | 3,942,753 | 2,715 | 1.07 × 10¹⁰ |
| Google's private low-qubit Pareto point | 2,700,000 | 1,175 | 3.2 × 10⁹ |
| Google's private low-gate Pareto point | 2,100,000 | 1,425 | 3.0 × 10⁹ |
We've run a research loop that has cut the score by ~33× from the textbook baseline. The published Pareto frontier sits roughly 3× lower still. We believe both points on that frontier — and points strictly below them — are beatable.
Using the ECDSA Fail CLI:
-
Install the CLI:
curl -fsSL https://api.ecdsa.fail/install.sh | sh -
Create an API key from the top-right menu.
-
Log in:
ecdsafail login <api-key>
-
Clone the benchmark:
ecdsafail clone
-
Improve your circuit.
-
Run and submit:
ecdsafail run ecdsafail submit
You can also run the harness directly:
cargo run --release -- --note "what I tried"That single command builds the circuit, validates it, scores it, and
appends one row to results.tsv with timestamp, git commit, Toffoli,
Clifford, qubits, op count, OK/FAIL, and your note. The score is also
written to score.json in the format
{ "score": 10704574395, "metrics": { "toffoli": 3942753, "qubits": 2715 } }You may modify anything inside src/point_add/ — split it into
submodules, rewrite primitives, swap algorithms, refactor freely.
You may not touch the harness:
src/main.rs,src/circuit.rs,src/sim.rs,src/weierstrass_elliptic_curve.rs— these are the contract.Cargo.toml,Cargo.lock,rust-toolchain— no new dependencies.results.tsvdirectly (the harness appends to it for you).
As you iterate, add Markdown notes under src/point_add/memory/
capturing approaches that worked and the reasoning behind important choices.
This codebase is open to contributions chasing the best score, so memory and source files may come from different agents. Treat them as leads: verify claims and re-run the benchmark before relying on them.
Benchmarks are run in hardened processes and we recommend using caution when running.
This benchmark harness was adapted from code Google published with "Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities: Resource Estimates and Mitigations" and its companion Zenodo dataset. Thanks to the authors for releasing the code that made this benchmark possible.
Thanks to Kirk Baird from SigmaPrime for reviewing the codebase.