diff --git a/WORKSPACE.md b/WORKSPACE.md
index 2e3b717..5d2342b 100644
--- a/WORKSPACE.md
+++ b/WORKSPACE.md
@@ -8,14 +8,13 @@ complete Hopf frames. Manuscript drafting is a separate task.
-## Current checkpoint: relative involution paid, lookup transitions unpaid
-
-**Verified starting checkpoint:** [PR #242](https://github.com/GoGoKo699/Hopf-Frame-Compilation/pull/242),
-`7fc9d32fd7bc70764ce09292897e248f315fa387`, fetched 24 October 2026.
-A resynthesized middle pays an exact Hermitian relative block in four
-native bands with zero clean work. Complete lookup still fails for
-the tested diagonal, Hadamard and cubic-phase dressings; a paid broad
-four-path Bell source also has the wrong Gram. R96 is unchanged.
+## Current checkpoint: joint mixing screens and the remaining lookup phase
+
+**Verified starting checkpoint:** [PR #243](https://github.com/GoGoKo699/Hopf-Frame-Compilation/pull/243),
+`4598492c870b81666f8b149a4c8ccd8efcd8d0b2`, fetched 25 October 2026;
+its post-merge validation and presentation passed. Affine/Fourier dressings have an all-angle transition gap.
+Two Clifford mixers and Bell acceptance expose the remaining lookup phase.
+Their scoped limitations leave R96 unchanged.
These are scoped failures. Exact-tree receipts belong in the PR record. Fetch main before resuming; this is not a pin.
Read in this order:
@@ -117,33 +116,34 @@ $`\tau_*=\sin(\pi/8)/(2\sqrt2)`$, the retained three-layer rounding
theorem makes complete Pauli transport exact; two layers are excluded for
p at least three. More source layers may use the approximate contract.
-**Latest partial construction.** The [corrected middle](research/depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair)
+**Retained partial construction.** The [corrected middle](research/depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair)
makes both co-moving probe fibers equal, so $`F_s=E_sZ_\pi E_s^\dagger`$
is an exact Hermitian involution. Its base source has $`T=4m`$,
$`D_T\le4`$, $`G=4pm+20m-12`$, one arbitrary probe and zero
clean work. The new involution statement concerns its relative block; the full transported Pauli was always an involution. Lookup is still unpaid.
-At the fixed native angles, [every diagonal dressing](research/depth/COUPLED_FINAL_ENCODER.md#relative-repair-diagonal-modulus)
-has direct error above one third for p at least three. Every nonempty
-[Hadamard mask](research/depth/COUPLED_FINAL_ENCODER.md#relative-repair-hadamard-mask)
-has error at least square root two; the tested cubic-phase/Hadamard
-interlayer also fails analytically. These are complete transition failures.
-
-Three [probe-asymmetric repairs](research/depth/COUPLED_FINAL_ENCODER.md#probe-asymmetric-paid-trials)
-have paid controls but exact nonreal relative entries at p=3; these finite failures do not exclude all sizes or all asymmetric words.
-The [four-path Bell source](research/depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase)
-has two clean signals, a paid depth-94 schedule and exact Gram error
-one half at every canonical size. Normalization does not select lookup charge.
-Earlier covariance, singlet, spectrum and thin-source failures retain
-their original hypotheses; none is an unrestricted native-depth bound.
-
-**Next concrete question: change joint bank transitions.**
-The relative-involution question is settled by the partial construction.
-Pause the tested single-dressing words and swap/weight-phase acceptance.
-Can two noncommuting bank-mixing stages, with a changed middle between
-them, give $`F_s\approx(-1)^{\pi(B)+B_{s+HB}}`$ on every bank column?
-Derive that complete action before a new fixture; alternatively construct
-a genuinely different accepted Gram satisfying the retained normalized contract.
-Do not infer lookup from Hermiticity, broad support or normalized acceptance.
+
+**Latest complete-action results.** [Affine/Fourier dressings](research/depth/COUPLED_FINAL_ENCODER.md#affine-fourier-complete-transition-gap)
+have error at least square root two for p at least two, even with arbitrary
+X-diagonal pulses and computational-diagonal middles in that word. No computational-monomial dressing completes the original native word
+exactly; this separate screen gives no uniform approximation gap.
+For [two bank Clifford mixers separated by diagonal stages](research/depth/COUPLED_FINAL_ENCODER.md#two-clifford-mixer-screen),
+error below one requires a rank-one final mixer aligned with full bank
+complement. This bank-only, fixed-address grammar has an explicit exact
+exception, but its [middle phase derivative](research/depth/COUPLED_FINAL_ENCODER.md#rank-one-mixer-lookup-derivative)
+still computes lookup. Two Hadamard masks in one common affine frame fail.
+The [Bell-envelope identity](research/depth/CORANK_FOURIER_BELL_SOURCE.md#bell-acceptance-charge-transfer)
+preserves the complete charge-readout error on arbitrary auxiliaries;
+address-independent acceptance has sharp Gram floor one quarter.
+
+**Next concrete question: pay a non-Clifford joint transition.**
+The earlier instruction to try two mixers is now qualified by these screens.
+Can a changed non-Clifford bank mixer or a nondiagonal middle supply
+$`F_s\approx(-1)^{\pi(B)+B_{s+HB}}`$ with a complete native ledger?
+Alternatively, construct an accepted source with genuinely interleaved
+data/auxiliary action beyond the Bell-envelope factorization. Reopen the
+rank-one exception only with a paid shallow lookup-dependent derivative.
+Derive the complete action before another fixture; phase declarations,
+charge preservation and broad support do not supply the missing operation.
The source still needs $`o(\log(p+2))`$ depth and the simultaneous
count, width, precision and arbitrary-work return ledger. Completed
quadratic coordinate rounds retain a logarithmic round requirement;
diff --git a/docs/OPEN_PROBLEM.md b/docs/OPEN_PROBLEM.md
index a8fa1cb..019f2a5 100644
--- a/docs/OPEN_PROBLEM.md
+++ b/docs/OPEN_PROBLEM.md
@@ -229,6 +229,8 @@ The relevant exclusions have different hypotheses:
| Specified shifted-syndrome commutator | [Four-band native trial](../research/depth/COUPLED_FINAL_ENCODER.md#shifted-syndrome-wide-commutator): 4m T gates and no helpers, but complete Pauli-transport error at least square root two for p at least two, even at arbitrary rotation angles on the same axes; the native p=1 gap is at least one quarter. The missing row response excludes this commutator family without a thin-source assumption. A changed middle action, axes, full word or accepted Gram remains outside |
| Common-probe pulses and diagonal bank repair | [Paid four-band family](../research/depth/COUPLED_FINAL_ENCODER.md#common-probe-wide-source): both frames change the probe through every bank row. Two row-local frames retain an address-shifting covariance, giving direct error at least square root two and Gram error at least one quarter. The graph-CZ third frame breaks that covariance but has a paired-state error at least square root two for p at least two. At fixed native angles, [every static bank-diagonal repair](../research/depth/COUPLED_FINAL_ENCODER.md#static-diagonal-common-probe-spectrum) has direct error above one half for p at least three: the relative probe spectrum is invariant. A changed relative-fiber action or accepted interface remains outside; the spectral result gives no new general Gram or native-depth bound |
| Corrected relative probe and changed acceptance | [Relative involution repair](../research/depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) has an exact Hermitian relative block in four native bands, zero clean work and linear T-count. Complete lookup remains wrong: diagonal dressings have direct error above one third for p at least three, every nonempty Hadamard mask has error at least square root two, and the tested cubic interlayer also fails. [Three asymmetric trials](../research/depth/COUPLED_FINAL_ENCODER.md#probe-asymmetric-paid-trials) have finite p=3 failures, not all-size exclusions. The separate [four-path Bell source](../research/depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase) pays two-clean normalization and depth-94 controls but has exact Gram error one half. Changed joint bank transitions or another complete accepted interface remain open |
+| Joint bank mixing screens | [Affine/Fourier dressing](../research/depth/COUPLED_FINAL_ENCODER.md#affine-fourier-complete-transition-gap) has error at least square root two for either affine/Hadamard order, even for arbitrary X-diagonal pulses and diagonal middles in the same word. The original native word has no exact monomial dressing; no uniform approximate exclusion follows from that separate result. The [bank-only two-Clifford grammar](../research/depth/COUPLED_FINAL_ENCODER.md#two-clifford-mixer-screen) has error at least one except for an aligned rank-one final mixer whose explicit completion still needs a lookup-dependent diagonal derivative. Active extra work, general address motion and unrestricted native sources remain outside these hypotheses |
+| Bell-envelope acceptance | [Arbitrary auxiliary effects](../research/depth/CORANK_FOURIER_BELL_SOURCE.md#bell-acceptance-charge-transfer) inherit exactly the same full operator error for the transported charge. Address-independent effects have sharp Gram floor one quarter. Pure charge-preserving permutation expansion with held address and bank-independent interlayers also has a quarter floor, regardless of its spectral gap. Interleaved data/auxiliary dynamics, bank phases and other source grammars remain outside |
| Wide Clifford filters | [Sharp lookup correlation](../research/depth/CLIFFORD_LOOKUP_FIXED_SPACE.md) is $`(p+1)/2^p`$ for $`p\ge2`$; normalized Clifford averages cannot separate the two full lookup eigenspaces by a constant gap. Coefficient and call bounds are not native-depth bounds |
Completed address return does not establish native read-only sharing.
diff --git a/docs/reference/VERIFICATION_CATALOGUE.md b/docs/reference/VERIFICATION_CATALOGUE.md
index 1c40d8b..0ed419e 100644
--- a/docs/reference/VERIFICATION_CATALOGUE.md
+++ b/docs/reference/VERIFICATION_CATALOGUE.md
@@ -255,6 +255,9 @@ without an extra native fixture.
| Common-probe source and static diagonal repairs | [Proof home](../../research/depth/COUPLED_FINAL_ENCODER.md#common-probe-wide-source), [exact native fixtures](../../tests/test_common_probe_source.py) | All one-address native source columns, actual inverse and relative-fiber columns check phase and orientation. Two- and three-address singlet inputs check literal pulse phases, the complete echo and squared error two. All 2,048 three-address diagonal square entries and both single-wire spectral factors challenge the static-dressing proof; distinct T targets and ledgers are checked through six address bits. The covariance, paired-state and spectral statements are analytic with distinct hypotheses. These internal audits and finite checks supply no unrestricted depth bound or external review |
| Relative-probe involution and changed lookup trials | [Proof home](../../research/depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair), [native repair fixtures](../../tests/test_relative_probe_repair.py), [asymmetric-fiber fixtures](../../tests/test_probe_asymmetric_trials.py) | Exact native phases, actual inverses, relative blocks, normalized witnesses and ledgers check the corrected source. Rational displacement tails challenge the diagonal-dressing theorem; the nonempty-Hadamard and specified cubic-phase witnesses test complete lookup. Three exact p=3 nonreal relative entries reject the stated asymmetric trials; small binary bases and degree restrictions challenge their analytic components. All-size theorems, finite failures and internal audits retain separate scopes; no external review or frontier improvement is asserted |
| Broad four-path Bell acceptance | [Complete operator and ledger](../../research/depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase), [exact multipath fixtures](../../tests/test_multipath_bell_source.py) | Literal controlled swaps and phases, actual inverses and signal acceptance check all one-cell logical columns at two arbitrary-helper assignments. Complete two-cell Grams and native Bell Pauli propagation challenge coherent normalization and orientation. The exact half Gram gap and shared-control native schedule are analytic; finite fixtures are internal evidence, not an asymptotic emitter or external review |
+| Affine/Fourier repair and exact monomial boundary | [Proof home](../../research/depth/COUPLED_FINAL_ENCODER.md#affine-fourier-complete-transition-gap), [exact fixtures](../../tests/test_affine_fourier_repair.py) | Both affine/Hadamard orders, arbitrary bank columns, a complete native coherent echo and its actual inverse, and distinct-target ledgers challenge the robust transition gap. A correlated X-basis cubic phase checks the broader pulse scope. Walsh/noise and rectangle identities test the exact-only monomial screen, including a nonlinear permutation that transports the target to parity but fails the remaining transition condition. The all-angle and exact-only statements have separate hypotheses; no unrestricted native-depth or fixed-accuracy monomial obstruction is asserted |
+| Two-Clifford mixer screen and rank-one exception | [Proof home](../../research/depth/COUPLED_FINAL_ENCODER.md#two-clifford-mixer-screen), [exact fixtures](../../tests/test_two_mixer_lookup_screen.py) | Every p=3 bank translation and Walsh coefficient, an actual Clifford-coset source, and common-affine parity slopes check the scoped diagonal-support theorem. All 256 bank columns and actual inverses check the genuine rank-one completion, whose middle is supplied only as a truth-table diagonal; degree checks expose its unpaid lookup phase. The bank-only, fixed-address theorem does not cover active extra work or arbitrary native mixing |
+| Complete Bell-envelope transfer | [Proof home](../../research/depth/CORANK_FOURIER_BELL_SOURCE.md#bell-acceptance-charge-transfer), [exact fixtures](../../tests/test_bell_acceptance_transfer.py) | Literal paired Bell matrices retain all arbitrary data and auxiliary columns. A non-diagonal coherent auxiliary effect tests the exact whole-space residual, and distinct-address comparisons test the sharp quarter floor. Uniform coset vectors check the separate phase-free permutation screen. These analytic reductions supply no new source or frontier bound |
| Coupled final encoders and bank dependence | [Proof home](../../research/depth/COUPLED_FINAL_ENCODER.md), [exact native fixtures](../../tests/test_coupled_final_encoder.py) | Complete two-address coefficient-bank and three-address cubic-sign matrices check the hybrid-address kernel on every dirty-tag input and its actual inverse. Bounded full-bank fixtures check the syndrome rewrite, literal inverse, Fourier/Pauli expansion columns and native ledgers. The bank-fiber rank theorem and the separate rotated-bank centralizer obstruction are analytic, including arbitrary middle Clifford boundaries and identity helpers. These encoders are components, not qualifying sources or unrestricted depth lower bounds |
| Boolean spectral reflection sources | [Proof home](../../research/depth/BOOLEAN_REFLECTION_GRAM_SOURCE.md), [six exact fixtures](../../tests/test_boolean_reflection_gram_source.py) | Native eight-point Fourier transform and actual reverse on every dirty column; spectral truth-table compute/uncompute; literal controlled quarter-phase echo; complete accepted normal form; high-bit and parity p=1 sources; and a commuting-reflection success fixture. Exact spectral evaluation, bounded-clean removal, simultaneous source costs, robust reflection-product criterion and the all-size flat-mixer gap one quarter are analytic. The changed source matches normalized trace but fails complete lookup sectors; finite checks and internal audits are not external mathematical review |
| Scalar-kernel partial source | [Proof home](../../research/depth/SCALAR_KERNEL_FILTER_SOURCE.md), [four exact fixtures](../../tests/test_scalar_kernel_filter_source.py) | Native source/inverse, support counts and finite halfspace rigidity remain. The new rank-one determinant trial checks all 128 p=1 algebra columns, exact kernels and accepted ranks; it is not a native emitter. The binary determinant identity, depth-eight query, approximate source ledger and Gram gap one half in every lookup sector are analytic. Neither the original thin projector nor the changed determinant echo supplies complete lookup; the scalar expander itself is unchanged |
diff --git a/research/README.md b/research/README.md
index e3edb30..e73d801 100644
--- a/research/README.md
+++ b/research/README.md
@@ -236,13 +236,13 @@ Use these only with their stated actual-boundary, fiber, normalization or source
- [Bank-coupled selector dynamics](depth/BANK_COUPLED_SELECTOR_DYNAMICS.md) — paid bank swaps/Hadamards and their signal controls, complete principal-work dynamics, an all-size Bell-cell witness for the specified nonlocal frames, and a finite bank-Hadamard source excluded by its complete marked path Gram
- [MOD3 zeta transport](depth/MOD3_ZETA_TRANSPORT.md) — binary order-three blocks, paid native baselines and shared cleanup, a native two-band exclusion, and exactness of three-layer observable approximation below the fixed gap; sublogarithmic joint transport remains unpaid
- [Weak Pauli orbit compression](depth/WEAK_PAULI_ORBIT_COMPRESSION.md) — native single-coordinate and joint two-coordinate sources, complete two-address lookup, four-band nested coefficients, [two-band coefficient shear and complete assembly](depth/WEAK_PAULI_ORBIT_COMPRESSION.md#complete-coefficient-shear) with a paused linear-depth recurrence, and scoped product/prefix-rank/final-block limits
-- [Coupled final encoders](depth/COUPLED_FINAL_ENCODER.md) — paid address/tag and full-bank X-motion families with complete operators; scoped bank-fiber and rotated-bank centralizer obstructions to three-layer completion; [paid syndrome pulses and their thin-acceptance boundary](depth/COUPLED_FINAL_ENCODER.md#syndrome-star-pulse-boundaries); [normalized broad trial](depth/COUPLED_FINAL_ENCODER.md#broad-baseline-syndrome-source) with exact half Gram gap and a baseline-relative rank criterion; [shifted-syndrome commutator](depth/COUPLED_FINAL_ENCODER.md#shifted-syndrome-wide-commutator) with an actual four-band schedule, retained coefficient and an angle-independent missing-row obstruction; [common-probe sources](depth/COUPLED_FINAL_ENCODER.md#common-probe-wide-source) with a paid third frame, paired-state witness and an all-static-diagonal relative-spectrum boundary; [corrected relative block](depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) with paid involution, complete transition tests and finite asymmetric-fiber trials
+- [Coupled final encoders](depth/COUPLED_FINAL_ENCODER.md) — paid address/tag and full-bank X-motion families with complete operators; scoped bank-fiber and rotated-bank centralizer obstructions to three-layer completion; [paid syndrome pulses and their thin-acceptance boundary](depth/COUPLED_FINAL_ENCODER.md#syndrome-star-pulse-boundaries); [normalized broad trial](depth/COUPLED_FINAL_ENCODER.md#broad-baseline-syndrome-source) with exact half Gram gap and a baseline-relative rank criterion; [shifted-syndrome commutator](depth/COUPLED_FINAL_ENCODER.md#shifted-syndrome-wide-commutator) with an actual four-band schedule, retained coefficient and an angle-independent missing-row obstruction; [common-probe sources](depth/COUPLED_FINAL_ENCODER.md#common-probe-wide-source) with a paid third frame, paired-state witness and an all-static-diagonal relative-spectrum boundary; [corrected relative block](depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) with paid involution, complete transition tests and finite asymmetric-fiber trials; [affine/Fourier transitions](depth/COUPLED_FINAL_ENCODER.md#affine-fourier-complete-transition-gap) have an all-angle gap, while [two Clifford mixers](depth/COUPLED_FINAL_ENCODER.md#two-clifford-mixer-screen) retain a genuine rank-one exception with an unpaid lookup derivative
- [Coupled order interference](depth/COUPLED_ORDER_GRAM_SOURCE.md) — actual joint word, robust direct square readout for balanced two-unitary sources, paid anchors and two distinct finite failed bank-moving trials
- [Affine orbit reflection source](depth/AFFINE_ORBIT_REFLECTION_SOURCE.md) — paid fixed-point-free charge-preserving motion and orbit coordinates, exact diagonal phase cochains, sharp phase-degree scope and a failed local anchor
- [Transverse orbit reflections](depth/TRANSVERSE_ORBIT_REFLECTION_SOURCE.md) — arbitrary controlled-dressing normalization, a paid non-diagonal square-root trial and its all-size sector error; the affine orbit is a charge-preserving native change of coordinates
- [Boolean reflection Gram sources](depth/BOOLEAN_REFLECTION_GRAM_SOURCE.md) — exact spectral Boolean queries without clean work, paid controlled quarter phases, full reflection-product Gram criterion and the flat-mixer sector obstruction
- [A normalized scalar-kernel partial source](depth/SCALAR_KERNEL_FILTER_SOURCE.md) — correct-charge support, native/error ledger and fixed-diagonal rigidity; a paid rank-one determinant query still has a thin, wrong-sector scalar echo
-- [Corank-one Fourier kernels and Bell acceptance](depth/CORANK_FOURIER_BELL_SOURCE.md) — paid thin-projector source and two-reflection interference: complete p=1 success, all-larger-size common-kernel failure; a [broad four-path source](depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase) pays two-clean normalization and controls but has exact half Gram gap
+- [Corank-one Fourier kernels and Bell acceptance](depth/CORANK_FOURIER_BELL_SOURCE.md) — paid thin-projector source and two-reflection interference: complete p=1 success, all-larger-size common-kernel failure; a [broad four-path source](depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase) pays two-clean normalization and controls but has exact half Gram gap; [general auxiliary acceptance](depth/CORANK_FOURIER_BELL_SOURCE.md#bell-acceptance-charge-transfer) inherits exactly the same complete charge-readout obligation, with a sharp quarter gap when address independent
- [Two complete key-mixing tests for observable transport](depth/KEY_MIXING_OBSERVABLE_SCREENS.md)
- [Gaussian compression with a small clean signal](depth/GAUSSIAN_COMPRESSION_SOURCE_LIMITS.md)
- [Involutory Gaussian loops and their unsquared scalar limit](depth/INVOLUTORY_GAUSS_SOURCE_LIMITS.md)
diff --git a/research/ROUTE_DECISIONS.md b/research/ROUTE_DECISIONS.md
index 2590f78..f174b37 100644
--- a/research/ROUTE_DECISIONS.md
+++ b/research/ROUTE_DECISIONS.md
@@ -31,7 +31,8 @@ limit, oracle-call bound or failed word is not an unrestricted depth bound.
| [Syndrome-star pulse continuation](depth/COUPLED_FINAL_ENCODER.md#syndrome-star-pulse-boundaries) and [broad baseline](depth/COUPLED_FINAL_ENCODER.md#broad-baseline-syndrome-source) | The original pulse algebra retains kernel translations. Both the paid zero-baseline source and the changed normalized fixed-row baseline fail: the latter has ideal Gram distance exactly one half for p at least three, despite constant native depth at fixed precision. Fewer than $`(m-1)/4`$ thin controlled-reflection insertions cannot repair a word whose deletion baseline is that fixed-row source. | Pause fixed-call corrections of these baselines. Reopen with a lookup-dependent broad action or a jointly paid growing-call schedule, including aggregate precision and return. These are source/baseline and call restrictions, not unrestricted native-depth bounds. |
| [Shifted-syndrome wide commutator](depth/COUPLED_FINAL_ENCODER.md#shifted-syndrome-wide-commutator) | Four actual T bands, 4m T gates and no helpers pay a different full-space word. A missing bank-row response gives complete lookup-image error at least square root two for p at least two, even at arbitrary angles on the same axes. The native p=1 coefficient gap is one quarter. No thin-reflection premise is used. | Pause this fixed-axis commutator, including angle or T-sign tuning. Change the middle action, axes, full word or accepted interface and derive the complete action. This is not a general four-layer or shifted-syndrome obstruction. |
| [Common-probe pulses and third-frame repair](depth/COUPLED_FINAL_ENCODER.md#common-probe-wide-source) | The original four-band word retains separate covariance, singlet and relative-spectrum failures. The [corrected middle](depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) now pays an exact Hermitian relative block with four native bands and zero clean work. | The earlier relative-involution step is settled for this partial construction; complete lookup is not. Preserve the original hypotheses rather than applying its old spectrum obstruction to the changed word. |
-| [Relative-block repair and complete lookup](depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) | At fixed native angles, any static diagonal dressing has direct error above one third for p at least three; every nonempty Hadamard mask has error at least square root two. The specified cubic-phase/Hadamard word also fails analytically. Three separately paid asymmetric-fiber trials have exact p=3 failures. | Pause these tested single-dressing mechanisms. Construct changed joint bank transitions, for example through two independently chosen noncommuting mixers, and derive the full lookup sign on arbitrary banks. Hermiticity alone is no longer an unpaid step. Completed quadratic coordinate rounds retain a logarithmic round requirement, without excluding cross-round native synthesis. These are specified-word limits. |
+| [Relative-block repair and complete lookup](depth/COUPLED_FINAL_ENCODER.md#relative-probe-involution-repair) | At fixed native angles, any static diagonal dressing has direct error above one third for p at least three; every nonempty Hadamard mask has error at least square root two. The specified cubic-phase/Hadamard word also fails analytically. Three separately paid asymmetric-fiber trials have exact p=3 failures. | Pause these tested single-dressing mechanisms. The next joint transition must also respect the broader mixing screens below. Hermiticity alone is no longer an unpaid step. Completed quadratic coordinate rounds retain a logarithmic round requirement, without excluding cross-round native synthesis. These are specified-word limits. |
+| [Affine/Fourier and two-Clifford mixing](depth/COUPLED_FINAL_ENCODER.md#affine-fourier-complete-transition-gap) | Either order of a full bank Hadamard and any phase-free affine bank permutation gives error at least square root two in the repaired word, even for arbitrary X-diagonal pulses and diagonal middles. No computational-monomial dressing completes the original native word exactly; no uniform approximate gap follows from that separate screen. The [bank-only two-Clifford grammar](depth/COUPLED_FINAL_ENCODER.md#two-clifford-mixer-screen) has error at least one except for an aligned rank-one final mixer; the exception is realized by a lookup-dependent diagonal derivative. Two masks in one common affine frame fail. | Angle tuning, diagonal-middle tuning and a common affine exposure do not reopen these classes. Pay the rank-one exception's complete phase derivative, or change a non-Clifford mixing stage, use a nondiagonal middle, or leave the stated source grammar. Active extra work and general address motion are outside the two-Clifford theorem. These are complete-action screens, not unrestricted native-depth bounds. |
| [Balanced two-unitary acceptance](depth/COUPLED_ORDER_GRAM_SOURCE.md#balanced-two-unitary-gram-readout) | Gram error delta already gives a direct zero-clean squared relative word with error at most four delta plus four square-root delta. No control or promotion is needed for this extraction. | Supply that complete unitary identity, or change the balanced two-unitary interface. Other coefficients and genuine multipath acceptance retain their own obligations. |
| [Forward affine-pencil XOR](depth/NILPOTENT_PENCIL_OBSERVABLE_SOURCE.md) | Eight-layer forward query and its converse are paid; coherent in-place or observable readout is not. Rebuilding from the old indicator retains its depth. | A genuinely quantum complete readout outside the proved fixed-address Clifford/monomial restrictions. |
| [Output-alias weak fiber source](depth/OUTPUT_ALIASED_CHARACTER_SOURCE.md) | Four-call extraction cancels arbitrary private unitary fibers; the known source is not sublogarithmic. | A new weak fiber source, paired transform or whole extraction within the full polynomial budgets. |
@@ -70,6 +71,7 @@ limit, oracle-call bound or failed word is not an unrestricted depth bound.
| [Boolean spectral reflection sources](depth/BOOLEAN_REFLECTION_GRAM_SOURCE.md) | Exact spectral Boolean queries, clean removal and controlled quarter phases are paid. The Gram is $`[I+\mathrm{Re}(SR)]/4`$ for two Hermitian reflections. The old flat first mixer and diagonal second branch retain gap at least one quarter at every nonzero address for every permitted Boolean phase choice. | Construct a different broad-reflection pair with product equal or close to the complete lookup sign, with both native schedules paid. Merely changing the spectral truth tables in the proved flat/diagonal family cannot work. |
| [Scalar-kernel partial source](depth/SCALAR_KERNEL_FILTER_SOURCE.md) | The original constant-depth source has no ideal wrong-charge acceptance but remains thin with Gram gap one half. Its [rank-one determinant variant](depth/SCALAR_KERNEL_FILTER_SOURCE.md#rank-one-determinant-echo) pays a corank-zero/one XOR query, yet its scalar echo has gap one half in every lookup sector. | A broad complete-sector readout with paid return, not the determinant identity, trace access or more scalar filtering. The original fixed-diagonal rejection theorem retains its separate scope. |
| [Corank-one Fourier/Bell source](depth/CORANK_FOURIER_BELL_SOURCE.md) | The full thin projector has a paid scalar-zero source. Two conjugated reflections give the correct half-Gram at p=1 on arbitrary auxiliaries, but an explicit correct-charge common kernel gives gap one half for p at least two. A zero-accepted-baseline thin-reflection repair needs at least $`2^{n-1}`$ ideal controlled calls. The earlier coherent-SWAP repair also fails. A separate [broad four-path source](depth/CORANK_FOURIER_BELL_SOURCE.md#four-path-bell-relative-phase) pays two-clean normalization and depth-94 native controls but has exact Gram error one half at every canonical size. | Change the baseline or auxiliary coupling to cover the complete central sector. Pause the tested swap/weight-phase multipath word; its coherent eigenvectors select the wrong charge. This call-rank obstruction is not a native-depth lower bound. Extra scalar filtering or finitely many conjugates do not remove the exponential support deficit; no clean auxiliary bank is free. |
+| [Complete Bell-envelope acceptance](depth/CORANK_FOURIER_BELL_SOURCE.md#bell-acceptance-charge-transfer) | The envelope transfers the desired charge to arbitrary auxiliary acceptance with exactly the same full operator error. Address-independent effects have sharp Gram floor one quarter, including non-diagonal effects. Separately, phase-free permutations preserving both kernel cosets fix both uniform coset vectors, so arbitrary controlled words of them with held address and bank-independent interlayers have the same quarter floor, regardless of expansion gap or call count. | An address-dependent effect must pay the missing charge readout. Alternatively change the data/auxiliary factorization or interleave their actions. Pure coset expansion needs bank phases or other dynamics distinguishing the complete sectors; charge preservation alone is insufficient. These envelope and permutation-grammar statements do not exclude unrestricted sources. |
| [Literal fermionic expander lift](depth/BANK_MOTION_WALSH_INDICATOR.md#sparse-expander-lift-obstruction) | The native lift, arbitrary-helper decoding and coherent centering are paid. Complete spectral accuracy forces filter length $`N=\Omega_\tau(p)`$ for the constant-auxiliary sparse index word on unpadded lengths, regardless of selector precision. Displayed centering also costs linear depth. | Change the sparse index word or physical interface, certify total phase error and pay coherent addressing together. This does not exclude non-Gaussian sources or weaken the scalar zero test. |
## Lower scouts and settled earlier questions
diff --git a/research/depth/CORANK_FOURIER_BELL_SOURCE.md b/research/depth/CORANK_FOURIER_BELL_SOURCE.md
index feea7bd..c87f3fc 100644
--- a/research/depth/CORANK_FOURIER_BELL_SOURCE.md
+++ b/research/depth/CORANK_FOURIER_BELL_SOURCE.md
@@ -819,3 +819,149 @@ small native Bell conjugations fixing the transpose in (31). They are
finite internal checks, not a general native emitter or external
mathematical review; the all-size operator and scheduling claims above
are analytic.
+
+
+
+## 10. A complete Bell envelope transfers the same charge to acceptance
+
+The previous failures are not repaired merely by allowing arbitrary broad,
+non-diagonal auxiliary acceptance after the same Bell envelope. The charge identity (31) gives
+an exact consequence for arbitrary acceptance effects. It does not exclude an
+address-dependent acceptance that actually computes the missing charge,
+or a source with genuinely interleaved data and auxiliary dynamics.
+
+Keep the notation of Sections 1--3 and put
+
+```math
+W_{2,x}=W_{x,CY}W_{x,DZ},\qquad
+Q_x=X_C(v_x)X_D(v_x),\qquad
+R_x=Z_Y(v_x)Z_Z(v_x).
+```
+
+Here Y,Z are entire arbitrary auxiliary banks. Equation (31) gives
+$`W_{2,x}^\dagger Q_xW_{2,x}=R_x`$ using the left kernel $`v_x`$,
+not the known right kernel $`e_0`$. It includes identity on every other
+principal and implementation register.
+
+Let an arbitrary acceptance mechanism on x,Y,Z and additional work have
+effect E, a positive contraction. Neither diagonality nor a chosen
+auxiliary input is assumed. Extend E by identity on C,D and let
+$`W_2=\sum_x|x\rangle\langle x|\otimes W_{2,x}`$. Suppose the
+complete source Gram has the envelope form
+
+```math
+G=W_2(I_{CD}\otimes E)W_2^\dagger.
+```
+
+The notation $`I_{CD}\otimes E`$ permits E to act on or even move the
+address; it only requires that acceptance itself act trivially on C,D.
+Define the coherent direct sums Q and R from $`Q_x`$ and $`R_x`$. Unitary
+invariance of operator norm and (31) give the exact equality
+
+```math
+\left\|G-\frac{I+Q}{4}\right\|
+ =\left\|I_{CD}\otimes E-\frac{I+R}{4}\right\|. \qquad(34)
+```
+
+All target factors are tensored with identity on arbitrary extra work.
+Thus the same complete lookup charge must be resolved on the auxiliaries,
+with exactly the same error. Coherent off-diagonal auxiliary effects and
+arbitrary accepted unitary fibers do not change (34). It is an equality
+of full operator errors, not a fixed-input probability or a normalized
+trace comparison. Equation (34) remains valid on an external reference.
+
+There is a sharp consequence when E is address independent. For distinct
+addresses $`x,x'`$, the Vandermonde columns $`v_x,v_{x'}`$ are distinct. Choose a
+binary auxiliary difference y+z on which their two characters disagree.
+Then
+
+```math
+\left\|\frac{I+R_x}{4}-\frac{I+R_{x'}}{4}\right\|=\frac12.
+```
+
+The triangle inequality forces
+
+```math
+\max_x\left\|E-\frac{I+R_x}{4}\right\|\ge\frac14.
+ \qquad(35)
+```
+
+The positive contraction $`E=I/4`$ attains one quarter simultaneously
+at every address, so the constant is sharp for this effect class. This
+holds already at p=1. If acceptance is address dependent, (34), rather
+than (35), is the retained statement: implementing its required effect
+is still an unpaid source operation.
+
+No new native gate is assumed. $`W_2`$ is the already paid two-copy Bell
+envelope; E and any mechanism realizing it retain their own count,
+depth, width, precision and return obligations. In particular an
+abstract effect satisfying (34) is not a source construction. The
+equivalence does not cover a different envelope whose data and auxiliary
+couplings are interleaved with acceptance.
+
+
+
+### Pure charge-preserving permutation expansion has two fixed coset vectors
+
+A separate proposed use of the same kernel is to expand within
+$`H_x=\mathrm{im}K_x=\ker(v_x^{\mathsf T})`$. This requires a
+different action from merely preserving charge. Let $`e=e_0`$, so
+$`v_x^{\mathsf T}e=1`$, and define the two normalized vectors
+
+```math
+|u_{x,\sigma}\rangle
+ =2^{-(n-1)/2}\sum_{y:v_x^{\mathsf T}y=\sigma}|y\rangle,
+\qquad \sigma\in\{0,1\}.
+```
+
+Every computational-basis permutation preserving both cosets fixes
+both vectors exactly. This includes affine maps y to Ay+c with
+$`v_x^{\mathsf T}A=v_x^{\mathsf T}`$ and
+$`v_x^{\mathsf T}c=0`$. In particular it includes each transvection
+
+```math
+A=I+(K_xa)b^{\mathsf T},\qquad b^{\mathsf T}K_xa=0.
+```
+
+The last condition makes A an involution, and the left-kernel identity
+makes it charge preserving. These assertions do not assume a native
+implementation of arbitrary choices of a,b.
+
+Consider any complete word of such permutations controlled by signals
+or other work, their actual inverses, and arbitrary interlayers acting
+as identity on this tested bank. The address is held fixed between
+these stages; interlayers may be address controlled but may not mix
+different x values. Helpers and acceptance have the same insertion and
+projection for both bank states. On either uniform coset vector every
+controlled permutation acts as identity, so the induced signal/work
+word is exactly the same for sigma=0 and sigma=1. Its accepted Gram
+has equal expectations on these two bank states and any common work
+input.
+
+The desired $`(I+Z(v_x))/4`$ instead has expectations one half and
+zero. Therefore the complete accepted Gram error is at least one
+quarter, regardless of how many permutation calls or selectors are
+used, or what spectral gap an average of those permutations has. For
+a complete unitary phase implementation the corresponding error is
+at least $`\sqrt2`$: its common induced work unitary V obeys
+
+```math
+\|(V-I)\psi\|^2+\|(V+I)\psi\|^2=4
+```
+
+for every normalized work input psi. At least one of the two required
+charge sectors therefore has error at least square root two.
+
+This is a restriction on the specified permutation grammar. Bank phases,
+other bank dynamics, or intermediate address motion can leave it. A
+constant gap for motion within the cosets, by itself, would select
+invariant orbit vectors and would not supply the full desired charge
+sector. The next operation must distinguish the sectors on all bank
+columns; charge preservation and expansion do not establish that readout.
+
+The exact [acceptance-transfer fixtures](../../tests/test_bell_acceptance_transfer.py)
+use literal p=1 Bell matrices on every data and auxiliary column, a
+non-diagonal coherent auxiliary effect, p=1,2 distinct-address charge
+comparisons, and finite hyperplane transvections. They check the native
+orientation and complete-space identities; the all-size reductions and
+scope statements above are analytic, not inferred from finite fixtures.
diff --git a/research/depth/COUPLED_FINAL_ENCODER.md b/research/depth/COUPLED_FINAL_ENCODER.md
index 37b6ea4..86cd4b2 100644
--- a/research/depth/COUPLED_FINAL_ENCODER.md
+++ b/research/depth/COUPLED_FINAL_ENCODER.md
@@ -2096,3 +2096,426 @@ disjoint-CNOT coordinates through p=6, and the top-degree restriction on
every small fixed syndrome through p=6. The finite coefficient failures
are distinguished from the analytic native schedules and degree argument.
They have internal audits, not external mathematical review.
+
+
+
+## 11. Affine bank mixing around a full Fourier layer still misses lookup
+
+A full bank Hadamard layer can be combined with an arbitrary invertible
+linear change of bank coordinates, instead of changing only a Hadamard
+mask. This leaves the diagonal-dressing premise of Section 9.2 and makes
+nonlocal bank transitions. Nevertheless the corrected source (62) has a
+complete error floor of square root two for both orders of those layers.
+The obstruction persists under arbitrary X-basis phase functions in T
+and arbitrary computational-diagonal middle phases. It concerns the
+displayed source word; it is not a lower bound for arbitrary native
+circuits or for two genuinely nonmonomial mixing stages.
+
+### 11.1. Complete transition support for both affine/Fourier orders
+
+Let $`p\ge2`$, $`m=2^p`$, and let L be any phase-free affine bank
+permutation
+
+```math
+L|y\rangle=|Ay+b\rangle,\qquad A\in\mathrm{GL}(m,2).
+```
+
+Take either $`C=H_B L`$ or $`C=L H_B`$, where
+$`H_B=H^{\otimes m}`$. The affine offset b is arbitrary; no initialization
+of bank bits is allowed. For this subsection allow T to be any unitary
+diagonal in the joint X basis, and $`D_s`$ to be any computational-diagonal
+unitary. Retain the same source form
+$`E_s=C^\dagger T^\dagger D_s^\dagger C T D_s`$ and
+$`F_s=E_sZ_\pi E_s^\dagger`$. This analytic generality supplies no free
+native implementation of T or $`D_s`$. Write $`\mathbf1=\boldsymbol1_m`$
+and $`H_0=T Z_\pi T^\dagger`$. Conjugating actual and target by TC gives
+
+```math
+\mathcal A_s=D_s^\dagger C H_0 C^\dagger D_s,
+\qquad
+\mathcal R_s=T C Q_s C^\dagger T^\dagger. \qquad(71)
+```
+
+Because T commutes with every X-type Pauli while $`Z_\pi`$
+anticommutes with the odd-weight ones,
+
+```math
+H_0 X^u H_0=(-1)^{\mathbf1\cdot u}X^u.
+```
+
+The affine L conjugates $`X^u`$ to $`X^{Au}`$ without a phase.
+It follows that $`C H_0 C^\dagger`$ is computational-monomial,
+with a single fixed displacement v in every column:
+
+| C | Displacement v |
+|---|---|
+| $`H_B L`$ | $`A^{-\mathsf T}\mathbf1`$ |
+| $`L H_B`$ | $`A\mathbf1`$ |
+
+For the first row, conjugation of each $`Z^u`$ by $`C H_0 C^\dagger`$
+returns $`(-1)^{(A^{-\mathsf T}\mathbf1)\cdot u}Z^u`$; the
+joint computational eigenspaces are one dimensional. The second row
+follows by first using $`H_B`$ and then applying L. The affine offset can
+change the phase of a column but not its displacement. The diagonal
+$`D_s`$ in (71) likewise changes only the column phase. Thus for every y,
+
+```math
+\mathcal A_s|y\rangle=\gamma_{s,y}|y+v\rangle,
+\qquad |\gamma_{s,y}|=1. \qquad(72)
+```
+
+The Walsh identity (65), which remains valid even when its masks are not
+distinct at p=2, has support among
+
+```math
+\mathbf1+h_t+e_a,\qquad a,t\in\mathbb F_2^p.
+```
+
+None of these masks equals $`\mathbf1`$: $`h_0`$ is zero, and each
+nonzero $`h_t`$ has weight $`m/2\ge2`$, whereas $`e_a`$ has weight one.
+For $`C=H_B L`$, the corresponding X-displacement masks of
+$`C Q_s C^\dagger`$ are $`A^{-\mathsf T}(\mathbf1+h_t+e_a)`$;
+for $`C=L H_B`$ they are $`A(\mathbf1+h_t+e_a)`$. Affine
+phases affect coefficients only. Neither support contains v.
+
+Both conjugated targets are sums of X-type Paulis, so they commute with
+the X-diagonal T. Therefore $`\mathcal R_s=C Q_s C^\dagger`$
+and
+
+```math
+\langle y+v|\mathcal R_s|y\rangle=0
+\quad\text{for every }s,y.
+```
+
+Equations (71)--(72) give normalized orthogonal output columns. Hence
+
+```math
+\|F_s(C)-Q_s\|\ge\sqrt2
+\qquad\text{for every }s,\ p\ge2. \qquad(73)
+```
+
+Before the TC change of basis, an explicit witness is
+$`C^\dagger T^\dagger|y\rangle`$. Embedding it in the minus-Y
+co-moving probe fiber gives the same complete native Pauli-image error.
+These witnesses test permitted arbitrary inputs; no state preparation
+resource is supplied to the source.
+
+### 11.2. The native costs are paid, but do not repair the transition
+
+Suppose L is emitted using $`g_L`$ elementary Cliffords in a common
+forward/actual-inverse bound, with CNOTs, swaps expanded into CNOTs,
+and X expanded as HSSH. Both displayed choices of C have a physical
+implementation $`C_{\rm phys}=W^\dagger C W`$ with
+
+```math
+G(C_{\rm phys}),\ G(C_{\rm phys}^\dagger)
+\le pm+3m+g_L.
+```
+
+It uses no T gates or extra helpers. For the native product angles and
+corrected middle of Section 9.1, the original X-axis source bands
+therefore give the complete candidate ledger
+
+```math
+T=4m,\qquad D_T\le4,\qquad
+G\le6pm+26m-12+2g_L,
+\qquad b_{\rm extra}=1,\quad a_{\rm clean}=0. \qquad(74)
+```
+
+The extra bit is the arbitrary physical probe. The actual Pauli echo has
+T-count 8m, depth at most eight, and Clifford count at most twice the
+bound in (74) plus two. Gaussian elimination supplies an emitted
+$`g_L=O(m^2)`$ for any specified affine map, so these candidates fit the
+permitted Clifford budget. The failure in (73) is their complete
+operator action, not an unpaid control or uncounted native gate.
+
+### 11.3. No monomial dressing gives exact lookup at the native angles
+
+Return here to the native product $`T=\prod_j e^{-i\pi X_j/8}`$
+and the corrected middle $`D_s`$ of Section 9.1. A separate exact statement
+covers every computational-monomial C on the bank, including nonlinear basis permutations and arbitrary diagonal
+phases, without granting it a free implementation. Such a C preserves
+the fact that every entry of $`H_0`$ has modulus $`2^{-m/2}`$. Thus the
+actual $`\mathcal A_s`$ in (71) has that same modulus everywhere.
+The transformed target is
+$`\mathcal R_s=T\mathrm{diag}(f)T^\dagger`$, where
+$`\mathrm{diag}(f)=C Q_s C^\dagger`$ and f takes values
+in $`\{+1,-1\}`$.
+
+Let $`\widehat f(S)`$ be its normalized Boolean Walsh coefficients.
+A direct product of the one-qubit transition probabilities of T gives
+
+```math
+\langle y|\mathcal R_s|y\rangle
+ =\sum_{S\subseteq[m]}\widehat f(S)\,2^{-|S|/2}(-1)^{S\cdot y}.
+```
+
+Parseval consequently yields
+
+```math
+2^{-m}\sum_y|\langle y|\mathcal R_s|y\rangle|^2
+ =\sum_S\widehat f(S)^2 2^{-|S|}\ge2^{-m}. \qquad(75)
+```
+
+Here $`\sum_S\widehat f(S)^2=1`$, and equality in (75) is
+possible only when all Fourier mass is at $`S=[m]`$. If
+$`F_s(C)=Q_s`$ exactly, the flat actual matrix forces equality, hence
+
+```math
+C Q_s C^\dagger=\pm Z_\pi. \qquad(76)
+```
+
+Thus a monomial dressing that completed this exact four-band word would
+already transport the full lookup sign to parity. The remaining flat
+matrix identity is stronger: it forces the dressing's basis permutation
+to be affine, so no monomial dressing completes the lookup for p at least
+two.
+
+To prove this, write $`S_B=\prod_j S_{B_j}`$. The native product has
+the literal identity
+
+```math
+H_0=S_B^\dagger H_B S_B.
+```
+
+Let P be the basis permutation underlying C, with
+$`P|y\rangle=|\sigma(y)\rangle`$. Substituting (76) into (71)
+gives $`D_s^\dagger C H_0 C^\dagger D_s=\pm H_0`$. Absorbing
+all diagonal factors on both sides, including the arbitrary phases of C,
+therefore gives a diagonal unitary J such that
+
+```math
+J P H_B P^\dagger J^\dagger=\pm H_B. \qquad(77)
+```
+
+Take the multiplicative rectangle ratio of entries at
+$`(x,y),(x,0),(0,y),(0,0)`$. Every entry is nonzero; the four
+row/column phases of J and the common sign cancel. The Walsh kernel
+$`(H_B)_{xy}=2^{-m/2}(-1)^{x\cdot y}`$ then gives, over the
+binary field,
+
+```math
+g(x)\cdot g(y)=x\cdot y,
+\qquad g(x)=\sigma^{-1}(x)+\sigma^{-1}(0). \qquad(78)
+```
+
+The map g is bijective and fixes zero. For all x,x',y, (78) implies
+$`[g(x+x')+g(x)+g(x')]\cdot g(y)=0`$. Surjectivity in y makes
+the bracket zero. Hence g is linear and orthogonal, and sigma is affine.
+But (76) would then make the exponent of $`Q_s`$ affine as well. This
+contradicts its degree p+1 from Section 10.4 whenever p is at least two.
+Consequently **no computational-monomial C**, even with a nonlinear
+permutation and arbitrary phases, supplies exact complete lookup in this
+source word at the fixed native T angles. No synthesis-cost assumption
+on C was used.
+
+This exact screen does **not** give a dimension-independent approximation
+gap for arbitrary monomial dressings. The diagonal restriction only gives
+
+```math
+\|F_s(C)-Q_s\|\ge
+\left(\sum_S\widehat f(S)^2 2^{-|S|}\right)^{1/2}-2^{-m/2}.
+```
+
+This bound can be small; it must not be promoted to a fixed-accuracy exclusion.
+The robust result (73) has the separate affine/Fourier hypotheses and
+already excludes angle tuning or a changed diagonal middle in that word.
+Neither result excludes a genuinely different nonmonomial interlayer,
+a nondiagonal changed middle or an accepted-Gram source. R96 remains
+unchanged.
+
+The [affine/Fourier fixtures](../../tests/test_affine_fourier_repair.py)
+check both layer orders with a nontrivial CNOT basis and affine offset,
+fixed transition displacement, exact target support exclusion, actual
+p=3 source inverses and native echoes on the coherent witnesses, and
+the native ledger through p=6. A separate changed-word fixture uses
+correlated X-basis cubic phases and a new diagonal middle. The monomial
+fixture includes cubic diagonal phases and checks the exact noise
+identity and flat actual columns. A nonlinear permutation that does
+map the lookup sign to parity is rejected by the exact Walsh-rectangle
+identity, testing the second step of the monomial proof. These finite checks challenge the
+analytic statements; they are not a general synthesis or depth proof.
+
+
+
+## 12. Two Clifford mixing stages: a transition screen and its exact exception
+
+This screen concerns a specified complete bank-source grammar. It does not
+bound arbitrary native T-depth, the earlier four-band X-rotation family,
+or sources using additional active work registers or intermediate address
+motion. Fix $`p\ge3`$, $`m=2^p`$, and a co-moving address $`s`$. All $`m`$ bank
+bits and any passive reference are arbitrary. Put
+
+```math
+P=Z_\pi,\qquad Q_s|y\rangle=(-1)^{q_s(y)}|y\rangle,
+\qquad q_s(y)=\pi(y)+y_{s+Hy}.
+```
+
+Allow the actual bank word
+
+```math
+E=D_2 C_2 D_1 C_1 D_0,\qquad F=EPE^\dagger, \qquad(T1)
+```
+
+where $`C_1,C_2`$ are arbitrary bank Cliffords and the $`D_i`$ are arbitrary
+bank-diagonal unitaries. No native implementation of a general $`D_i`$ is
+granted. The screen is therefore valid even after giving this diagonal
+freedom for free. The rightmost operation acts first; the inverse is the
+actual adjoint. Diagonal boundaries $`D_0,D_2`$ may have literal phases.
+
+### 12.1. A Fourier-coset identity for the complete diagonal
+
+Write $`C_1PC_1^\dagger`$ as a Hermitian Pauli with binary X label $`a`$. Since
+$`D_1`$ is diagonal, $`D_1(C_1PC_1^\dagger)D_1^\dagger`$ has matrix entries only
+between $`y`$ and $`y+a`$. Its Pauli expansion is contained in one affine Pauli
+coset with fixed X label $`a`$. Let
+
+```math
+\mathcal A=C_2\langle Z_{B_0},\ldots,Z_{B_{m-1}}\rangle C_2^\dagger,
+\qquad V=\{u:Z^u\text{ belongs to }\mathcal A
+ \text{ up to scalar}\}.
+```
+
+Define $`h=m-\dim V`$; equivalently $`h`$ is the rank of the binary X-label
+projection of this maximal commuting Pauli group. After $`C_2`$, the Pauli
+support is in one affine coset of $`\mathcal A`$. Its intersection with the diagonal
+Paulis is either empty or an affine binary coset $`u_0+V`$. $`D_0`$ commutes with
+$`P`$, while $`D_2`$ leaves every diagonal entry unchanged. Consequently the
+complete diagonal $`f(y)=\langle y|F|y\rangle`$, which is real, has Fourier support in
+$`u_0+V`$, or vanishes identically. In the nonempty case,
+
+```math
+f(y+v)=(-1)^{u_0\cdot v}f(y)
+\qquad\text{for every }v\in V^\perp. \qquad(T2)
+```
+
+This is an identity of the actual source, not a proposed classical
+approximation of its transitions. If $`\|F-Q_s\|\lt1`$, then
+$`|f(y)-(-1)^{q_s(y)}|\lt1`$ on every basis column. Thus $`f`$ is nonzero and has
+the target's sign everywhere. Equation (T2) forces
+
+```math
+q_s(y+v)+q_s(y)=u_0\cdot v
+\qquad(v\in V^\perp), \qquad(T3)
+```
+
+uniformly in $`y`$. The complete lookup sign has only one nonzero linear
+structure: $`v=\boldsymbol1_m`$, with derivative one. This follows from its distinct
+Walsh masks $`\boldsymbol1_m+h_t+e_a`$: constant derivative requires $`v_a`$ to be independent
+of $`a`$, and then $`Hv=0`$. Since $`m`$ is even, $`v=\boldsymbol1_m`$ has odd pairing with every
+one of these masks. Hence (T3) requires $`h\le1`$.
+
+The $`h=0`$ case also fails. Here $`C_2`$ is a monomial Clifford. If $`a\ne0`$,
+the conjugated operator still has zero diagonal, giving norm distance at
+least one from $`Q_s`$. If $`a=0`$, $`D_1`$ commutes with the first Pauli image and $`F`$
+is a diagonal Pauli; $`Q_s`$ is not a Pauli and their norm distance is two.
+Therefore a necessary condition for error strictly below one in (T1) is
+
+```math
+h=1,\qquad V^\perp=\mathrm{span}\{\boldsymbol1_m\},
+\qquad u_0\cdot\boldsymbol1_m=1. \qquad(T4)
+```
+
+Every other case has complete operator error at least one. The statement
+includes arbitrary diagonal phases, arbitrary bank Clifford choices and
+all bank columns, but it retains the source grammar (T1). In particular,
+it is not a general restriction on the number of T layers.
+
+
+
+### 12.2. Two Fourier masks in one affine bank frame cannot meet the exception
+
+Let $`L`$ be any invertible binary $`m\times m`$ matrix, let $`t`$ be any fixed bank
+translation, and let $`U_{L,t}|z\rangle=|Lz+t\rangle`$. In that one common affine frame,
+consider
+
+```math
+E=U_{L,t}D_2 H_A D_1 H_B D_0U_{L,t}^\dagger, \qquad(T5)
+```
+
+where $`A`$ and $`B`$ are arbitrary sets of bank coordinates. The two masks need
+not agree, and the diagonal middle and boundaries are unrestricted.
+Every such word has $`\|EPE^\dagger-Q_s\|\ge1`$.
+
+To prove this, the input parity in $`z`$ coordinates is a scalar times
+$`Z^\ell`$ with $`\ell=L^{\mathsf T}\boldsymbol1_m`$. The unique nonzero target linear structure is
+$`v_*=L^{-1}\boldsymbol1_m`$, still with derivative one. For $`C_2=H_A`$ the space $`V^\perp`$
+is the span of the coordinate vectors indexed by $`A`$. The empty $`A`$ case is
+the excluded $`h=0`$ case. Otherwise (T3) forces $`A=\{j\}`$ and $`v_*=e_j`$. But then
+$`\ell_j=\boldsymbol1_m^{\mathsf T}Le_j=m=0\pmod2`$. The first mask $`H_B`$ therefore creates no
+X component on $`j`$. Any X component it creates outside $`j`$ survives the
+last $`H_j`$ and gives zero diagonal. If there is no such component, $`D_1`$
+commutes with the first Pauli image and the result is a Pauli. Both cases
+fail as above. A change of the two masks, arbitrary diagonal phases, and
+a shared invertible affine exposure cannot produce the missing lookup.
+
+The fixed affine walls are Clifford and can be emitted with $`O(m^2)`$
+CNOTs plus $`O(m)`$ X gates and their actual inverses. This pays those walls,
+not an arbitrary middle $`D_1`$. The exclusion remains valid regardless of
+that middle's cost. Different affine frames between the mixers, active
+extra registers, non-Clifford mixing stages and general source words are
+outside (T5).
+
+
+
+### 12.3. The aligned rank-one case is real and exposes the missing phase
+
+Condition (T4) must not be promoted to an impossibility claim. Define the
+fixed involutory linear map $`L`$ by
+
+```math
+y_0=z_0,\qquad y_j=z_j+z_0\quad(j\ne0).
+```
+
+Its first column is $`\boldsymbol1_m`$. Since the target flips under complete bank
+complement, there is a Boolean function $`g_s`$ of $`z_1,\ldots,z_{m-1}`$ with
+
+```math
+q_s(Lz)=z_0+g_s(z_1,\ldots,z_{m-1}). \qquad(T6)
+```
+
+Let $`R`$ be the involutory CNOT gather $`z_0\mapsto z_0+\sum_{j\ne0}z_j`$ and set
+
+```math
+\begin{aligned}
+C_1&=H_{B_0}R,& C_2&=U_LH_{B_0},\\
+D_s|z\rangle&=(-1)^{z_0g_s(z_{\ne0})}|z\rangle,\\
+E_s&=C_2D_sC_1.
+\end{aligned} \qquad(T7)
+```
+
+The gather maps $`P`$ to $`Z_0`$, so $`C_1PC_1^\dagger=X_0`$. The exact complete
+diagonal derivative is
+
+```math
+D_sX_0D_s^\dagger=(-1)^{g_s(z_{\ne0})}X_0.
+```
+
+The last $`H_{B_0}`$ and $`U_L`$ give $`E_sPE_s^\dagger=Q_s`$ on every bank column.
+There is no initialized bank or omitted inverse. This realizes precisely
+the rank-one exception. The Clifford envelope uses two Hadamards and
+$`2(m-1)`$ CNOTs in each direction, zero T gates and no additional work.
+
+Its missing operation is $`D_s`$. Formula (T7) merely writes the complete
+lookup information into a controlled diagonal phase. Since $`q_s`$ has
+Boolean degree $`p+1`$ and an invertible linear substitution preserves degree,
+(T6) has $`\deg g_s=p+1`$. The displayed sign phase $`z_0g_s`$ has degree $`p+2`$.
+No native sublogarithmic compiler or simultaneous resource ledger for that
+middle is supplied. A general complex diagonal with the same derivative
+can multiply (T7) by an arbitrary phase independent of $`z_0`$; the required
+lookup-dependent derivative is unchanged.
+
+Thus two genuinely different Clifford mixing stages are not excluded.
+The complete transition calculation identifies exactly where this route
+stores the unpaid operation: in a high-degree diagonal derivative.
+Replacing that phase by a charged shallow construction would be new
+progress; declaring its truth table, normalized spectrum, or formal
+diagonal unitary does not improve the complete-indicator or frame frontier.
+
+The [exact two-mixer tests](../../tests/test_two_mixer_lookup_screen.py) check the $`p=3`$ Walsh
+support and every bank translation, a full Clifford-coset source fixture,
+the same-frame slope mismatch, and all columns plus actual inverses of
+the aligned rank-one construction. Its middle is evaluated as a truth-table
+diagonal, explicitly not as a scalable native implementation. These finite
+checks support the identities and boundaries; they do not replace the
+all-size proof or supply the missing phase compiler.
diff --git a/tests/test_affine_fourier_repair.py b/tests/test_affine_fourier_repair.py
new file mode 100644
index 0000000..6824abd
--- /dev/null
+++ b/tests/test_affine_fourier_repair.py
@@ -0,0 +1,238 @@
+"""Exact complete-action checks for affine/Fourier relative-probe dressings.
+
+The all-size transition-support and exact monomial arguments are in
+COUPLED_FINAL_ENCODER, Section 11. These fixtures include actual native
+echoes, both affine/Fourier orders, literal phases, and arbitrary inputs.
+"""
+from collections import Counter
+from fractions import Fraction
+import unittest
+
+from tests.exact_matrices import CO, CZ
+from tests.test_common_probe_source import _d_phase, _diagonal, _native
+from tests.test_joint_lookup_pauli_source import _bands, _inverse
+from tests.test_relative_probe_repair import (
+ _ccz_parity_word, _probe_state, _q_sign, _repair_parts,
+)
+
+
+def _affine_word(m):
+ """Nontrivial invertible linear mixing and a nonzero affine offset."""
+ return ([('CX', j, j + 1) for j in range(m - 1)]
+ + [('CX', m - 1, 0)]
+ + [('H', 1), ('S', 1), ('S', 1), ('H', 1)])
+
+
+def _dressing(p, order):
+ m = 1 << p
+ l = _affine_word(m)
+ h = [('H', j) for j in range(m)]
+ # Native lists are chronological; the labels denote operator order.
+ if order == 'HL':
+ return l + h
+ if order == 'LH':
+ return h + l
+ raise ValueError(order)
+
+
+def _x_rotation(p):
+ m = 1 << p
+ h = [('H', j) for j in range(m)]
+ return h + [('T', j) for j in range(m)] + h
+
+
+def _parity(state):
+ return _diagonal(state, lambda y: -CO if y.bit_count() & 1 else CO)
+
+
+def _actual_transformed(state, p, address, dressing):
+ """D† C (T Z_parity T†) C† D, retaining native scalar cancellation."""
+ t = _x_rotation(p)
+ state = _diagonal(state, lambda y: _d_phase(y, p, address))
+ state = _native(_inverse(dressing) + _inverse(t), state)
+ state = _parity(state)
+ state = _native(t + dressing, state)
+ return _diagonal(state, lambda y: _d_phase(y, p, address).conj())
+
+
+def _target_transformed(state, p, address, dressing, include_t=True):
+ """T C Q_s C† T†; omitting T tests the proved X-commutation."""
+ t = _x_rotation(p) if include_t else []
+ state = _native(_inverse(t) + _inverse(dressing), state)
+ state = _diagonal(state, lambda y: _q_sign(y, p, address) * CO)
+ return _native(dressing + t, state)
+
+
+def _inner(left, right):
+ return sum((value.conj() * right.get(key, CZ)
+ for key, value in left.items()), CZ)
+
+
+def _native_source(p, dressing):
+ wall, a, b, _, _ = _repair_parts(p)
+ shifted = [(name, *(p + wire for wire in wires))
+ for name, *wires in dressing]
+ c = wall + shifted + _inverse(wall)
+ word = b + a + c + _inverse(b) + _inverse(a) + _inverse(c)
+ return wall, word
+
+
+def _walsh(values):
+ out = list(values)
+ stride = 1
+ while stride < len(out):
+ for start in range(0, len(out), 2 * stride):
+ for j in range(stride):
+ left, right = out[start + j], out[start + j + stride]
+ out[start + j] = left + right
+ out[start + j + stride] = left - right
+ stride *= 2
+ return [Fraction(value, len(out)) for value in out]
+
+
+class AffineFourierRepairTests(unittest.TestCase):
+ def test_changed_correlated_x_phases_and_diagonal_middle_keep_the_gap(self):
+ p, m, address, bank = 2, 4, 1, 3
+ h = [('H', j) for j in range(m)]
+ x_phases = ([('T', 0), ('S', 2), ('CX', 0, 1), ('T', 1), ('CX', 0, 1)]
+ + _ccz_parity_word(1, 2, 3))
+ t = h + x_phases + h
+ middle = ([('T', 0), ('CX', 1, 3), ('TDG', 3), ('CX', 1, 3)]
+ + _ccz_parity_word(0, 2, 3))
+ for order in ('HL', 'LH'):
+ with self.subTest(order=order):
+ dressing = _dressing(p, order)
+ actual = _native(middle + _inverse(dressing) + _inverse(t), {bank: CO})
+ actual = _parity(actual)
+ actual = _native(t + dressing + _inverse(middle), actual)
+ target = _native(_inverse(t) + _inverse(dressing), {bank: CO})
+ target = _diagonal(target, lambda y: _q_sign(y, p, address) * CO)
+ target = _native(dressing + t, target)
+ self.assertEqual(len(actual), 1)
+ self.assertNotIn(next(iter(actual)), target)
+ self.assertEqual(_inner(actual, actual), CO)
+ self.assertEqual(_inner(target, target), CO)
+ self.assertEqual(_inner(actual, target), CZ)
+
+ def test_both_orders_have_disjoint_complete_transition_support(self):
+ for p, columns in ((2, (0, 1, 7)), (3, (0, 37))):
+ for order in ('HL', 'LH'):
+ dressing = _dressing(p, order)
+ displacement = None
+ for address in (0, (1 << p) - 1):
+ for bank in columns:
+ with self.subTest(p=p, order=order, address=address, bank=bank):
+ actual = _actual_transformed({bank: CO}, p, address, dressing)
+ target = _target_transformed({bank: CO}, p, address, dressing)
+ self.assertEqual(target, _target_transformed(
+ {bank: CO}, p, address, dressing, include_t=False))
+ self.assertEqual(len(actual), 1)
+ output = next(iter(actual))
+ if displacement is None:
+ displacement = bank ^ output
+ self.assertEqual(bank ^ output, displacement)
+ self.assertNotIn(output, target)
+ self.assertEqual(_inner(actual, actual), CO)
+ self.assertEqual(_inner(target, target), CO)
+ self.assertEqual(_inner(actual, target), CZ)
+
+ def test_p3_actual_native_echo_on_the_coherent_witness(self):
+ p, m, address = 3, 8, 5
+ d = p + m
+ for order in ('HL', 'LH'):
+ with self.subTest(order=order):
+ dressing = _dressing(p, order)
+ # psi=C†T†|0>; this is a full input witness, not free source work.
+ psi = _native(_inverse(_x_rotation(p)) + _inverse(dressing), {0: CO})
+ self.assertEqual(_inner(psi, psi), CO)
+ wall, source = _native_source(p, dressing)
+ initial = _probe_state(psi, p, address, -1)
+ physical = _native(wall, initial)
+ self.assertEqual(_native(_inverse(source), _native(source, physical)), physical)
+ echo = wall + _inverse(source) + [('S', d)] * 2 + source + _inverse(wall)
+ observed = _native(echo, initial)
+ transformed = _actual_transformed({0: CO}, p, address, dressing)
+ relative = _native(_inverse(_x_rotation(p)) + _inverse(dressing), transformed)
+ self.assertEqual(observed, _probe_state(relative, p, address, 1))
+ target = _probe_state(_diagonal(
+ psi, lambda y: _q_sign(y, p, address) * CO), p, address, 1)
+ self.assertEqual(_inner(observed, observed), CO)
+ self.assertEqual(_inner(target, target), CO)
+ self.assertEqual(_inner(observed, target), CZ)
+
+ def test_native_bands_and_paid_affine_clifford_ledger(self):
+ for p in (2, 3, 4, 6):
+ m = 1 << p
+ g_l = len(_affine_word(m))
+ for order in ('HL', 'LH'):
+ _, word = _native_source(p, _dressing(p, order))
+ for native in (word, _inverse(word)):
+ counts = Counter(g[0] for g in native)
+ self.assertEqual(counts['T'] + counts['TDG'], 4 * m)
+ self.assertEqual(counts['H'] + counts['S'] + counts['CX'],
+ 6 * p * m + 26 * m - 12 + 2 * g_l)
+ bands = _bands(native)
+ self.assertEqual(list(map(len, bands)), [m] * 4)
+ self.assertTrue(all(len({g[1] for g in band}) == m for band in bands))
+
+ def test_exact_monomial_screen_noise_identity_and_flat_actual_columns(self):
+ p, m, address = 2, 4, 1
+ # Nonlinear diagonal phases are allowed in the monomial screen;
+ # these S/T phases cancel in C Q C† but remain in actual amplitudes.
+ dressing = (_affine_word(m) + [('S', 0), ('T', 2)]
+ + _ccz_parity_word(0, 2, 3))
+ inverse_l = _inverse(_affine_word(m))
+ truth = []
+ for bank in range(1 << m):
+ back = _native(inverse_l, {bank: CO})
+ self.assertEqual(len(back), 1)
+ truth.append(_q_sign(next(iter(back)), p, address))
+ coeff = _walsh(truth)
+ noise_norm = sum(c * c * Fraction(1, 1 << mask.bit_count())
+ for mask, c in enumerate(coeff))
+ diagonal_norm = CZ
+ for bank in range(1 << m):
+ actual = _actual_transformed({bank: CO}, p, address, dressing)
+ self.assertEqual(len(actual), 1 << m)
+ self.assertTrue(all(value * value.conj() == Fraction(1, 1 << m) * CO
+ for value in actual.values()))
+ target = _target_transformed({bank: CO}, p, address, dressing)
+ entry = target.get(bank, CZ)
+ diagonal_norm += entry * entry.conj()
+ self.assertEqual(diagonal_norm, (1 << m) * noise_norm * CO)
+ self.assertGreater(noise_norm, Fraction(1, 1 << m))
+ self.assertEqual(sum(c * c for c in coeff), 1)
+ self.assertNotEqual(abs(coeff[-1]), 1)
+
+ def test_nonlinear_parity_transport_fails_the_walsh_rectangle_identity(self):
+ p, m, address = 2, 4, 1
+ # This explicit mathematical permutation passes the first necessary
+ # condition C Q C†=Z_parity. No cheap native implementation is assumed.
+ sigma = {}
+ for sign in (1, -1):
+ source = [y for y in range(1 << m) if _q_sign(y, p, address) == sign]
+ destination = [y for y in range(1 << m)
+ if (-1 if y.bit_count() & 1 else 1) == sign]
+ self.assertEqual(len(source), len(destination))
+ sigma.update(zip(source, destination))
+ inverse = {target: source for source, target in sigma.items()}
+ self.assertEqual(len(inverse), 1 << m)
+ for y in range(1 << m):
+ self.assertEqual(_q_sign(inverse[y], p, address),
+ -1 if y.bit_count() & 1 else 1)
+ mismatches = []
+ for x in range(1 << m):
+ gx = inverse[x] ^ inverse[0]
+ for y in range(1 << m):
+ gy = inverse[y] ^ inverse[0]
+ # These are the exact signs of the phased-Walsh rectangle;
+ # arbitrary diagonal row/column factors cancel identically.
+ permuted = -1 if (gx & gy).bit_count() & 1 else 1
+ original = -1 if (x & y).bit_count() & 1 else 1
+ if permuted != original:
+ mismatches.append((x, y))
+ self.assertTrue(mismatches)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_bell_acceptance_transfer.py b/tests/test_bell_acceptance_transfer.py
new file mode 100644
index 0000000..86c6396
--- /dev/null
+++ b/tests/test_bell_acceptance_transfer.py
@@ -0,0 +1,125 @@
+"""Exact complete-space guards for the Bell-envelope acceptance transfer.
+
+The envelope is built from its literal Clifford words. No auxiliary
+input is initialized or traced out, and the non-diagonal effect below
+retains coherent auxiliary matrix entries. These finite identities
+support the analytic reduction; they do not synthesize its missing effect.
+"""
+from fractions import Fraction
+import unittest
+
+import numpy as np
+
+from tests.exact_matrices import CQ2, native_columns
+from tests.test_corank_fourier_bell_source import _kernel, _w_word
+
+
+def _pair_numerator(rows):
+ """Return q^2 W_pair in the C,D,Y,Z register ordering, for n=2."""
+ n, q = len(rows), 1 << len(rows)
+ assert n == 2
+ native = native_columns(2*n, _w_word(rows, [0, 1], [2, 3]))
+ one = np.empty((q*q, q*q), dtype=np.int64)
+ for i, row in enumerate(native):
+ for j, value in enumerate(row):
+ if value == CQ2(Fraction(1, q)):
+ one[i, j] = 1
+ else:
+ assert value == CQ2(Fraction(-1, q))
+ one[i, j] = -1
+ labels = np.arange(q**4)
+ c, d, y, z = [(labels >> (n*j)) & (q-1) for j in range(4)]
+ cy, dz = c | (y << n), d | (z << n)
+ pair = one[cy[:, None], cy[None, :]] * one[dz[:, None], dz[None, :]]
+ return pair, labels, y ^ z
+
+
+class BellAcceptanceTransferTests(unittest.TestCase):
+ def test_literal_paired_envelope_moves_the_complete_charge_to_auxiliaries(self):
+ for x in (0, 1):
+ rows, vector, n = _kernel(1, x)
+ pair, labels, difference = _pair_numerator(rows)
+ dimension = len(labels)
+ np.testing.assert_array_equal(pair.T @ pair,
+ dimension*np.eye(dimension, dtype=np.int64))
+ # Q=X_C(v)X_D(v), including identity on arbitrary Y,Z.
+ moved_rows = labels ^ vector ^ (vector << n)
+ actual = pair.T @ pair[moved_rows]
+ signs = np.array([1-2*((int(value) & vector).bit_count() & 1)
+ for value in difference], dtype=np.int64)
+ np.testing.assert_array_equal(actual, dimension*np.diag(signs))
+ # The right null vector e_0 would give the wrong nonzero-address
+ # effect: the transfer uses the complete left kernel v_x.
+ if x:
+ wrong = np.array([1-2*(int(value) & 1) for value in difference])
+ self.assertFalse(np.array_equal(signs, wrong))
+
+ def test_nondiagonal_auxiliary_effect_retains_the_exact_whole_space_defect(self):
+ rows, vector, n = _kernel(1, 1)
+ pair, labels, difference = _pair_numerator(rows)
+ dimension, q = len(labels), 1 << n
+ # E=|psi>+|1,1>)/sqrt(2).
+ # E has coherent off-diagonal entries across both auxiliary banks.
+ numerator = np.zeros((q*q, q*q), dtype=np.int64)
+ support = (0, 1 | (1 << n))
+ numerator[np.ix_(support, support)] = 1 # E=numerator/4.
+ effect = np.kron(numerator, np.eye(q*q, dtype=np.int64))
+ self.assertEqual(effect[(1 | (1 << n)) << (2*n), 0], 1)
+ moved_rows = labels ^ vector ^ (vector << n)
+ charge = np.eye(dimension, dtype=np.int64)[moved_rows]
+ signs = np.array([1-2*((int(value) & vector).bit_count() & 1)
+ for value in difference], dtype=np.int64)
+ gram_numerator = pair @ effect @ pair.T
+ defect_numerator = gram_numerator - dimension*(np.eye(dimension, dtype=np.int64) + charge)
+ # Both sides are exact integer numerators. The equality includes
+ # every coherent auxiliary input; diagonal-block tests would miss E.
+ transported = pair.T @ defect_numerator @ pair
+ expected = dimension**2*(effect - np.eye(dimension, dtype=np.int64) - np.diag(signs))
+ np.testing.assert_array_equal(transported, expected)
+
+ def test_address_independent_effect_has_the_sharp_quarter_floor(self):
+ for p in (1, 2):
+ vectors = [_kernel(p, x)[1] for x in range(1 << p)]
+ n = _kernel(p, 0)[2]
+ labels = range(1 << n)
+ # A single auxiliary difference y+z suffices to represent
+ # all diagonal entries; each has the omitted multiplicity 2^n.
+ target_numerators = [np.array([1 + (1-2*((vector & y).bit_count() & 1))
+ for y in labels], dtype=np.int64)
+ for vector in vectors]
+ for index, left in enumerate(target_numerators):
+ for right in target_numerators[index+1:]:
+ self.assertEqual(int(np.max(np.abs(left-right))), 2)
+ # I/4 is a positive contraction and simultaneously has
+ # distance exactly 1/4 from every target half-projector.
+ self.assertEqual(int(np.max(np.abs(left-1))), 1)
+
+ def test_hyperplane_transvections_fix_both_uniform_cosets(self):
+ n, vector = 3, 0b101
+ labels = np.arange(1 << n)
+ parity = np.array([(int(y) & vector).bit_count() & 1 for y in labels])
+ even, odd = (parity == 0).astype(np.int64), (parity == 1).astype(np.int64)
+ count = 0
+ for direction in range(1, 1 << n):
+ if (direction & vector).bit_count() & 1:
+ continue
+ for covector in range(1, 1 << n):
+ if (direction & covector).bit_count() & 1:
+ continue
+ images = np.array([int(y) ^ (direction if (int(y) & covector).bit_count() & 1 else 0)
+ for y in labels])
+ self.assertEqual(len(set(images)), len(labels))
+ np.testing.assert_array_equal(parity[images], parity)
+ np.testing.assert_array_equal(even[images], even)
+ np.testing.assert_array_equal(odd[images], odd)
+ count += 1
+ self.assertEqual(count, 9)
+ # The two normalized coherent vectors are orthogonal, but their
+ # desired accepted-Gram expectations differ by exactly one half.
+ self.assertEqual(int(even @ odd), 0)
+ self.assertEqual(Fraction(int(even @ even), 2*int(even.sum())), Fraction(1, 2))
+ self.assertEqual(int(odd @ even), 0)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/test_two_mixer_lookup_screen.py b/tests/test_two_mixer_lookup_screen.py
new file mode 100644
index 0000000..f283c19
--- /dev/null
+++ b/tests/test_two_mixer_lookup_screen.py
@@ -0,0 +1,215 @@
+"""Exact finite evidence for the scoped two-Clifford lookup-source screen.
+
+The rank-one exception evaluates its required diagonal truth table directly.
+It verifies the complete identity, not a native compiler for that diagonal.
+No finite fixture here excludes unrestricted native T-depth.
+"""
+import unittest
+
+from tests.exact_matrices import (
+ CO, CZ, adjoint, eye, multiply, native_columns,
+)
+from tests.test_common_probe_source import PHASES, _native, _syndrome
+from tests.test_joint_lookup_pauli_source import _inverse
+
+
+def _qbit(bank, p, address):
+ selected = address ^ _syndrome(bank, p)
+ return (bank.bit_count() ^ (bank >> selected)) & 1
+
+
+def _fwht(values):
+ result = list(values)
+ step = 1
+ while step < len(result):
+ for start in range(0, len(result), 2 * step):
+ for offset in range(step):
+ i, j = start + offset, start + offset + step
+ result[i], result[j] = result[i] + result[j], result[i] - result[j]
+ step *= 2
+ return result
+
+
+def _diag(values):
+ return [[value if row == column else CZ
+ for column in range(len(values))]
+ for row, value in enumerate(values)]
+
+
+def _z(width, mask):
+ return _diag([-CO if (row & mask).bit_count() & 1 else CO
+ for row in range(1 << width)])
+
+
+def _conjugate(unitary, operator):
+ return multiply(multiply(unitary, operator), adjoint(unitary))
+
+
+def _diagonal_pauli_label(matrix):
+ """Return the binary Z label, ignoring only the Pauli's scalar."""
+ size = len(matrix)
+ if any(matrix[row][column] != CZ
+ for row in range(size) for column in range(size) if row != column):
+ return None
+ scalar = matrix[0][0]
+ if scalar == CZ:
+ return None
+ for mask in range(size):
+ if all(matrix[row][row] == (
+ -scalar if (row & mask).bit_count() & 1 else scalar)
+ for row in range(size)):
+ return mask
+ return None
+
+
+def _rank(vectors):
+ pivots = {}
+ for value in vectors:
+ while value:
+ bit = value.bit_length() - 1
+ if bit in pivots:
+ value ^= pivots[bit]
+ else:
+ pivots[bit] = value
+ break
+ return len(pivots)
+
+
+def _linear_map(columns, value):
+ result = 0
+ for index, column in enumerate(columns):
+ if (value >> index) & 1:
+ result ^= column
+ return result
+
+
+def _rank_one_source(state, p, address, reverse=False):
+ """C2 D C1, with D an explicit lookup-dependent sign truth table."""
+ m = 1 << p
+ gather = [('CX', j, 0) for j in range(1, m)]
+ spread = [('CX', 0, j) for j in range(1, m)]
+ before, after = gather + [('H', 0)], [('H', 0)] + spread
+ if reverse:
+ before, after = _inverse(after), _inverse(before)
+ state = _native(before, state)
+ # L(0,z_rest) has row-zero bit zero and all other bits unchanged.
+ state = {bank: (-value if ((bank & 1)
+ and _qbit(bank & ~1, p, address)) else value)
+ for bank, value in state.items()}
+ return _native(after, state)
+
+
+class TwoMixerLookupScreenTests(unittest.TestCase):
+ def test_complete_p3_fourier_support_and_every_translation(self):
+ p, m = 3, 8
+ full = (1 << m) - 1
+ for address in range(m):
+ with self.subTest(address=address):
+ truth = [_qbit(bank, p, address) for bank in range(1 << m)]
+ transform = _fwht([1 - 2 * bit for bit in truth])
+ expected = {}
+ for row in range(m):
+ for tag in range(m):
+ h_tag = sum(1 << j for j in range(m)
+ if (tag & j).bit_count() & 1)
+ mask = full ^ h_tag ^ (1 << row)
+ self.assertNotIn(mask, expected)
+ sign = -1 if (tag & (address ^ row)).bit_count() & 1 else 1
+ expected[mask] = sign * ((1 << m) // m)
+ self.assertEqual({mask: value for mask, value in enumerate(transform)
+ if value}, expected)
+ structures = {}
+ for shift in range(1 << m):
+ derivative = truth[0] ^ truth[shift]
+ if all((truth[bank] ^ truth[bank ^ shift]) == derivative
+ for bank in range(1 << m)):
+ structures[shift] = derivative
+ self.assertEqual(structures, {0: 0, full: 1})
+ support = list(expected)
+ self.assertEqual(_rank([mask ^ support[0] for mask in support]), m - 1)
+
+ def test_actual_clifford_source_diagonal_has_predicted_affine_support(self):
+ width = 3
+ c1 = native_columns(width, [('H', 0)])
+ c2 = native_columns(width, [('H', 0), ('H', 1), ('CX', 0, 2), ('S', 1)])
+ d0 = native_columns(width, [('T', 2)])
+ d2 = native_columns(width, [('T', 0), ('T', 1)])
+ # A nontrivial diagonal phase, including an exact cubic sign.
+ d1 = _diag([PHASES[(bank & 1) + 2 * ((bank >> 2) & 1)]
+ * (-CO if bank == 7 else CO) for bank in range(1 << width)])
+ p = _z(width, (1 << width) - 1)
+ source = multiply(d2, multiply(c2, multiply(d1, multiply(c1, d0))))
+ image = _conjugate(source, p)
+ self.assertEqual(multiply(adjoint(source), source), eye(1 << width))
+
+ pauli_base = _conjugate(c2, _conjugate(c1, p))
+ diagonal_group, allowed = set(), set()
+ for mask in range(1 << width):
+ group_element = _conjugate(c2, _z(width, mask))
+ label = _diagonal_pauli_label(group_element)
+ if label is not None:
+ diagonal_group.add(label)
+ label = _diagonal_pauli_label(multiply(pauli_base, group_element))
+ if label is not None:
+ allowed.add(label)
+ self.assertEqual(_rank(diagonal_group), 1)
+ self.assertEqual(len(allowed), 2)
+ u0 = min(allowed)
+ self.assertEqual(allowed, {u0 ^ value for value in diagonal_group})
+ diagonal = [image[bank][bank] for bank in range(1 << width)]
+ spectrum = _fwht(diagonal)
+ actual = {mask for mask, value in enumerate(spectrum) if value != CZ}
+ self.assertTrue(actual)
+ self.assertEqual(actual, allowed)
+ for shift in range(1 << width):
+ if all(not ((shift & mask).bit_count() & 1) for mask in diagonal_group):
+ sign = -1 if (shift & u0).bit_count() & 1 else 1
+ self.assertTrue(all(diagonal[bank ^ shift] == sign * diagonal[bank]
+ for bank in range(1 << width)))
+
+ def test_common_affine_complement_direction_has_even_input_parity(self):
+ p, m = 3, 8
+ full = (1 << m) - 1
+ for special in range(m):
+ columns = [full if j == special else 1 << j for j in range(m)]
+ self.assertEqual(_rank(columns), m)
+ self.assertEqual(columns[special].bit_count() & 1, 0)
+ for translation in [0, 1, 0b10010110]:
+ truth = [_qbit(_linear_map(columns, value) ^ translation, p, 5)
+ for value in range(1 << m)]
+ self.assertTrue(all((truth[value] ^ truth[value ^ (1 << special)]) == 1
+ for value in range(1 << m)))
+
+ def test_rank_one_exception_has_full_lookup_action_and_actual_inverse(self):
+ # This is the genuine exception for the p=3 target, with its missing
+ # middle supplied as a complete diagonal truth table, not native gates.
+ p, m, address = 3, 8, 5
+ for bank in range(1 << m):
+ initial = {bank: CO}
+ forward = _rank_one_source(initial, p, address)
+ returned = _rank_one_source(forward, p, address, reverse=True)
+ self.assertEqual(returned, initial)
+ state = _rank_one_source(initial, p, address, reverse=True)
+ state = {value: (-amplitude if value.bit_count() & 1 else amplitude)
+ for value, amplitude in state.items()}
+ state = _rank_one_source(state, p, address)
+ self.assertEqual(state, {bank: -CO if _qbit(bank, p, address) else CO})
+
+ def test_rank_one_middle_retains_high_boolean_degree(self):
+ p, m, address = 3, 8, 5
+ q = [_qbit(bank, p, address) for bank in range(1 << m)]
+ g = [_qbit(rest << 1, p, address) for rest in range(1 << (m - 1))]
+ middle = [(bank & 1) * _qbit(bank & ~1, p, address)
+ for bank in range(1 << m)]
+ for values, degree in [(q, p + 1), (g, p + 1), (middle, p + 2)]:
+ coefficients = list(values)
+ for bit in range(len(values).bit_length() - 1):
+ for mask in range(len(values)):
+ if (mask >> bit) & 1:
+ coefficients[mask] ^= coefficients[mask ^ (1 << bit)]
+ self.assertEqual(max(mask.bit_count() for mask, value
+ in enumerate(coefficients) if value), degree)
+
+
+if __name__ == '__main__':
+ unittest.main()