Skip to content

Fix dead-code warnings and document parameter-search leads - #16

Open
PaulGregory1 wants to merge 3 commits into
ecdsafail:mainfrom
PaulGregory1:fix/multiply-dead-code-warnings
Open

Fix dead-code warnings and document parameter-search leads#16
PaulGregory1 wants to merge 3 commits into
ecdsafail:mainfrom
PaulGregory1:fix/multiply-dead-code-warnings

Conversation

@PaulGregory1

@PaulGregory1 PaulGregory1 commented Jul 14, 2026

Copy link
Copy Markdown

Two small, low-risk contributions to the editable src/point_add path. No
harness/contract files touched.

1. Fix two dead-code warnings (arith/multiply.rs)

Both flagged by cargo build in square_row_windowed_apply:

  • The borrow_lane closure declares b: &mut B but never uses it (it reads
    the captured tmp_ext directly) → renamed to _b.
  • let seg_w = hi - lo; at the top of the per-window loop is never read; the
    same value is re-bound and used later in the same loop body → removed.

Behaviour-neutral by construction. Confirmed with the official harness:
./benchmark.sh → score 1,519,170,048 (unchanged), toffoli 1,318,724,
qubits 1,152, and 9,024/9,024 shots OK (phase- and ancilla-clean).

2. Document parameter-search leads (memory/param-search-2026-07.md)

Following the README's suggestion to record approaches under
src/point_add/memory/, this logs an 18-config single/double-knob sweep of
the committed circuit that found no cheap score win — so the next
contributor can skip it. Summary: every qubit-reserve/target reduction fails
validation (scratch is at its floor), and the skip/margin knobs are
non-binding at their current values. A trace also pins down the qubit peak:
the GCD loop tops out at 1,140 active qubits while the global peak is 1,152, so
the ~12 peak-binding qubits live in a non-GCD phase whose reserve is already at
its floor — i.e. the score's x qubits factor needs a structural change there,
not a reserve knob.

🤖 Generated with Claude Code

PaulGregory1 and others added 2 commits July 14, 2026 18:53
- The `borrow_lane` closure declares `b: &mut B` but never uses it; it
  reads directly from the captured `tmp_ext`. Rename the parameter to
  `_b`.
- The `seg_w` binding at the top of the per-window loop is never read;
  the same `hi - lo` value is re-bound and used further down in the same
  iteration. Remove the dead binding.

No functional change: the emitted circuit is byte-identical. Verified
with the official harness (./benchmark.sh): score 1,519,170,048
(toffoli 1,318,724 x qubits 1,152), 9,024/9,024 shots OK, phase- and
ancilla-clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Record an 18-config single/double-knob sweep over the committed circuit
that found no cheap score win, so the next contributor can skip it: every
qubit-reserve/target reduction fails validation (scratch at its floor) and
the skip/margin knobs are non-binding at their current values. Includes the
measured anchor (score 1,519,170,048) and where the real leverage likely is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PaulGregory1 PaulGregory1 changed the title Fix two dead-code warnings in square_row_windowed_apply Fix dead-code warnings and document parameter-search leads Jul 14, 2026
Tracing shows the GCD steps top out at 1,140 active qubits while the global
peak is 1,152, so the ~12 peak-binding qubits live in a non-GCD phase
(fold/square/affine). GCD-side reserve retuning can't move the global peak,
and the fold reserve is already at its floor -- so the -1 qubit lever needs a
structural change, not a knob.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant