Skip to content

Fix local Fourier transforms (conjugated) over non-binary fields - #579

Merged
perlinm merged 1 commit into
mainfrom
fix/conjugated-odd-characteristic
Aug 28, 2026
Merged

Fix local Fourier transforms (conjugated) over non-binary fields#579
perlinm merged 1 commit into
mainfrom
fix/conjugated-odd-characteristic

Conversation

@perlinm

@perlinm perlinm commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

AI-assisted summary

QuditCode.conjugated() previously transformed the chosen qudits by swapping their X-type and Z-type components. That swap is symplectic only over GF(2); over a field of odd characteristic it drops a sign and flips the commutation relations of the conjugated qudits. QuditCode.conjugated() now applies the local Fourier map (x, z) -> (z, -x) through math.symplectic_conjugate, restricted to the chosen qudits, so the conjugation convention lives in one place.

A regression test checks that conjugating a code over GF(3) and GF(4) preserves its commutation relations, dimension, and logical operator basis.

…njugate

QuditCode.conjugated() transformed the chosen qudits with a plain X<->Z swap,
which is symplectic only over GF(2).  Over odd characteristic the missing sign
negates each conjugated qudit's contribution to every symplectic product, so
commutation relations were corrupted: the conjugated code was inconsistent
(BaconShorCode(3, field=3).conjugated([0, 5, 7]) reported dimension 3 instead
of 1) and its logical operators were not a valid basis.

Apply the local Fourier map (x, z) -> (z, -x) via math.symplectic_conjugate,
restricted to the chosen qudits, so the conjugation convention has a single
source of truth.  Over GF(2) this is unchanged, since -1 == 1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@perlinm
perlinm merged commit 8fd0f57 into main Aug 28, 2026
3 checks passed
@perlinm
perlinm deleted the fix/conjugated-odd-characteristic branch August 28, 2026 18:42
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