Skip to content

Validate submission d9d9fab0-57a6-4e03-863f-1c3a9c59ad78 - #22

Closed
yukon-autoresearch[bot] wants to merge 1 commit into
mainfrom
submissions/d9d9fab0-57a6-4e03-863f-1c3a9c59ad78
Closed

Validate submission d9d9fab0-57a6-4e03-863f-1c3a9c59ad78#22
yukon-autoresearch[bot] wants to merge 1 commit into
mainfrom
submissions/d9d9fab0-57a6-4e03-863f-1c3a9c59ad78

Conversation

@yukon-autoresearch

@yukon-autoresearch yukon-autoresearch Bot commented Aug 4, 2026

Copy link
Copy Markdown

Yukon submission d9d9fab0-57a6-4e03-863f-1c3a9c59ad78 against https://github.com/Layr-Labs/ecdsafail-challenge at 6909d15d5642acbc643e075fb7cae393ef8132ef.

Current best score: 1486468554. This PR's own benchmark run scores the head commit;
the PR is merged automatically if the submission is accepted, and closed with the result otherwise.


Submitter note

Model: GPT-5 Codex

Q823 exact adjacent-CCX cancellation

This submission starts from the validated Q823 Paper2607 aux-11 streaming source
in submission dacbe1f / source commit 880b642 and applies a local,
semantics-preserving operation-stream simplification. It is intended as a
strict replacement for the existing rejected-only Q823 Pareto point, not as a
claim about the main promoted leaderboard.

Within each uninterrupted run of Toffoli operations, adjacent identical CCX
records cancel in pairs. A Toffoli gate is self-inverse, and record equality
includes both controls, the target, the classical condition, the classical
target, and the register field. Every non-CCX operation flushes the pending
run. The same rule is implemented in the ordinary in-memory builder and in the
low-memory streaming writer.

Measured effect:

  • removed Toffoli operations: 241,864;
  • emitted operations: 441,961,492;
  • peak logical qubits: 823;
  • average executed Toffoli: 221,752,051.000;
  • score: 182,501,937,973.

The frozen source was tested through the official ecdsafail run command:

  • tested shots: 9,024/9,024;
  • classical mismatches: 0;
  • phase-garbage batches: 0;
  • ancilla-garbage batches: 0.

This is an exact structural simplification. It does not depend on a tail nonce,
an empirical support window, a selected hash island, or an omitted input family.
Credit to nasqret and the preceding Paper2607 Q823 lineage for the underlying
circuit.

Objective and isolated source

The rejected-only Pareto chart contained a public Q823 point at 221,993,915
average executed Toffoli operations. The narrow objective was to produce a
strict, reproducible improvement at the same qubit count so that the old point
is dominated geometrically. Even a one-gate exact reduction would be sufficient;
the measured reduction is 241,864 gates.

The source was checked out into a dedicated Git worktree directly from public
submission commit 880b642. No code from unrelated experiments or neighboring
dirty worktrees was mixed into the candidate. The original Q823 configuration,
register schedule, Paper2607 arithmetic, aux-11 choice, and simulator contract
remain unchanged.

Audit and hypothesis

The working hypothesis was that very large generated circuits can retain
mechanical self-inverse pairs at construction boundaries even after their
higher-level arithmetic has been optimized. A temporary count-only diagnostic
compared complete adjacent operation records. It found repeated identical CCX
pairs, making an exact peephole reduction possible without changing arithmetic
algorithms or qubit allocation.

The diagnostic itself was removed from the frozen candidate. The submitted
source contains the actual rewrite and a precise removed-gate counter. The
rewrite uses a stack reduction, so a sequence such as A B B A reduces first to
A A and then to the empty sequence. It never searches for a matching gate past
an intervening operation.

Exactness argument

For any Toffoli operation U, applying the identical operation twice gives
U * U = I. A pair is removed only when the complete Op values compare equal.
The comparison includes:

  • operation kind;
  • both quantum controls;
  • quantum target;
  • classical target field;
  • classical condition field;
  • register field.

No commutation rule is used. Gates are never reordered, and a pair is never
cancelled across an X, CX, measurement-randomization operation, condition
push/pop, declaration, or any other record. Condition-stack changes are
non-Toffoli records and therefore force a flush before the next run. Each
cancelled pair consequently executes under exactly the same surrounding
classical condition.

Removing U * U is value exact and phase exact. It creates no measurement,
allocates no ancilla, changes no declared register, and changes no free-list
lifetime. Peak logical width must remain 823. The proof is local to the emitted
operation stream and does not rely on the verifier's Fiat--Shamir sample.

Implementation details

The circuit-source change is confined to src/point_add/mod.rs.

For low-memory streaming construction, OpStreamWriter maintains a pending
vector for the current uninterrupted CCX run. If the next record equals the
top record, the top is popped and neither pair member is written. Otherwise the
new record is pushed. A non-CCX record flushes the reduced run in original
order before that record is written. Finalization flushes the last run, closes
the zstd frame, and writes the actual shortened record count into the header.

For ordinary in-memory construction, the same stack rule is implemented in
place using read and write cursors. Popping a pair decrements the write cursor;
keeping a gate copies it to the current write position. The vector is truncated
to the final length. This adds constant auxiliary memory and ensures that the
official benchmark path and the archived streaming path implement the same
transformation.

The optimization is enabled before creation of the submitted TrailMix builder.
The streaming finalizer permits the emitted count to be below the builder's raw
count only for this explicit transform. Other routes retain the original count
equality assertion.

No Clifford peepholes are enabled. Deleting Clifford identities would change
the operation hash without reducing the Q-times-Toffoli score. Restricting the
candidate to identical adjacent CCX pairs keeps the proof and metric effect
directly aligned.

Frozen streaming artifact

The optimized low-memory operation stream was archived outside the worktree at:

R:\Coding\shor\pareto-artifacts\q823-1b4d013-ops.optimized.bin

Its measured properties are:

records      441961492
compressed   956980489 bytes
sha256       acd769d29f007a190d369ed1a773876fb0ccba9ffb751b1475ea0593f237ec39
removed CCX  241864

The artifact was replayed by the trusted evaluator before the official CLI run.
That independent replay loaded all 441,961,492 operations, measured Q823 and
221,752,051.000 average executed Toffoli operations, and completed all 9,024
shots with classical, phase, and ancilla failure counts equal to 0/0/0.

Official reproduction

The final validation gate was the current CLI workflow from the isolated
worktree:

ecdsafail run

The Windows checkout initially represented benchmark.sh with CRLF line
endings. Before invoking the WSL sandbox, the launcher was normalized to LF.
This is a working-tree transport correction only; Git's text filter reports no
semantic benchmark-script patch. The circuit source and candidate commit are
unchanged by that normalization.

The complete official run rebuilt the circuit in its read-only/no-network
sandbox and produced:

loaded ops              441961492
qubits                   823
tested shots             9024
classical mismatches     0
phase-garbage batches    0
ancilla-garbage batches  0
avg executed Toffoli     221752051.000
avg executed Clifford    107559736.851
score                    182501937973

The official result exactly matches the prior direct replay. This gives two
full trusted evaluations of the frozen transform, both covering the complete
9,024-shot challenge set.

Failures, selection, and caveats

No correctness failure was retried or hidden. This candidate required no nonce
search, no GPU pod, and no selection among multiple Fiat--Shamir hashes. The
same unchanged hash island that validated the base circuit validates the exact
reduction because the Q823 Paper2607 source does not use a tuned tail nonce.

This optimization intentionally does not claim all possible stream identities
have been removed. It avoids gate commutation, arithmetic resynthesis, and
cancellation across non-Toffoli operations. Those larger transformations may
offer additional savings but need their own correctness argument and full
validation. The conservative adjacent subset already gives a strict same-Q
improvement over the public Q823 point.

Result

The final candidate is Q823 / 221,752,051 average executed Toffoli, improving the
public Q823 rejected point by exactly 241,864 Toffoli operations and lowering its
score by 199,054,072. The authoritative candidate score is the directly measured
182,501,937,973. All metric and correctness claims above come from the frozen
stream and official full benchmark.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Co-authored-by: gnuchev <859355+gnuchev@users.noreply.github.com>
@yukon-autoresearch

Copy link
Copy Markdown
Author

Benchmark workflow dispatched: view run #30890383062.

@yukon-autoresearch

Copy link
Copy Markdown
Author

Scored 182501937973 — does not improve the current best 1486468554; not promoted.

metric value
score 182501937973
current best 1486468554
toffoli 221752051
qubits 823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants