Skip to content

Reduce two-wire gate lowering from sixteen to ten Hadamards - #8104

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1201a-short-hadamard-pair
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1201a-short-hadamard-pair

Conversation

@petalas

@petalas petalas commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Scoped construction and proof. A fixed word of ten unnormalized Hadamards and eleven Gaussian-rational diagonals realizes every invertible two-wire gate. The previous pair word used sixteen Hadamards. The new word uses three per triangular shear, including at zero, and retains both two-H pivot switches. Three is minimal for a nonidentity shear in this model. Credit to Ali Romman for the direct Fourier construction and the shortening question. Predecessor #7849

If the target and its inverse have operator norm at most $L\ge1$, every intermediate prefix and its inverse has norm at most $2^{39}L$. At width $2^\ell$, the routed matching uses $8\ell+6$ H layers where the original used $8\ell+12$, before native pack division.

Evidence

Run from the repository root with CPython 3.12.

python3.12 -IB -W error research/short-hadamard-pair/verify.py
python3.12 -IOB -W error research/short-hadamard-pair/verify.py
python3.12 -B scripts/research_package.py --package research/short-hadamard-pair
python3.12 -B scripts/check_research_commit.py --package research/short-hadamard-pair --check-source-history

Both registered modes passed on 303 synthetic gates and 101 distinct pairs issued across 378 matching layers by two pinned padded-root fixtures. They verify exact endpoints and check every cut, including inverse norms. The replay rejects singular inputs and a corrupted diagonal. The package hook and committed-byte and source-history preflight passed.

Limits

The counts cover ideal Gaussian-rational words. Rounded coefficient delivery, native pack counts, physical movement and the full multiplier price remain open. No new κ is claimed. This is a reversible archive addition confined to one research package.

Open next questions

  • Try to absorb a pivot switch in a shorter word for the full gate. Start with zero-entry cases and bound every inverse prefix.
  • Substitute the word at one width class and price diagonal rounding, the remaining native packs, coefficient preparation and tape movement.

Related open work

The overlap check found no open PR shortening this fixed pair word. The merged predecessor #7849 is linked above.

CI notes

Local verification passed at 5a200e75dfc228e50ce77c9e3999e7f540399657. The hosted planning and registered package replay checks both passed at that commit. GitHub Actions run

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