---
title: Permutation-Invariant GNU Codes
url: https://www.emergentmind.com/topics/permutation-invariant-gnu-codes
type: topic
---

# Permutation-Invariant GNU Codes

Permutation-invariant GNU codes are a three-parameter family of quantum codes embedded in the symmetric subspace of multiple qubits and expressed as structured superpositions of Dicke states. They were introduced explicitly under the name “gnu code” in Ouyang’s “Permutation-invariant quantum codes,” with parameters \(g\) (gap), \(n\) (occupancy), and \(u\) (scaling factor), and block length \(m=gnu\) [1302.3247]. Their defining feature is simultaneous exploitation of permutation symmetry, combinatorial Dicke-state structure, and spacing in excitation number. In the original formulation, this supports two distinct correction regimes: exact correction of arbitrary weight-\(t\) errors for one parameter choice, and approximate correction of \(t\) spontaneous-decay or amplitude-damping errors for another [1302.3247].

## 1. Physical and algebraic setting

Permutation-invariant quantum codes are code subspaces contained in the symmetric subspace of \(m\) qubits, equivalently the subspace fixed by all qubit permutations. In Ouyang’s construction this setting is not merely aesthetic: for the spin-\(\tfrac12\) ferromagnetic Heisenberg Hamiltonian
\[
H=-2\sum_{e=\{i,j\}}J_e\,\mathbf S_i\cdot \mathbf S_j
= -\sum_e J_e\left(\pi_e-\frac12\mathbb 1\right),
\]
with positive exchange constants \(J_e\), every permutation-invariant state is a ground state. Consequently, any permutation-invariant code automatically lies in the ground space of any connected Heisenberg ferromagnet without external magnetic field [1302.3247].

The natural basis of the symmetric subspace is the Dicke basis. For qubits, the Dicke state \(|D_w^m\rangle\) is the normalized symmetric superposition of all computational basis states of Hamming weight \(w\). GNU codes are built directly from these states, so error-correction questions reduce to identities involving binomial coefficients and low-degree polynomials rather than generic tensor-product operator algebra [1302.3247].

The original paper also stresses two structural points that distinguish GNU codes from more standard families. First, these codes are generally non-stabilizer: the expectation is that permutation-invariant codes correcting a non-trivial number of errors are not quantum stabilizer codes [1302.3247]. Second, they are not constant-excitation codes. Each logical basis state is instead supported on several Dicke weights separated by a fixed gap \(g\) [1302.3247]. A recurring misconception is that “GNU” was attached later; the 2013 paper itself introduces both the \((g,n,u)\)-PI terminology and the shorthand “gnu code” [1302.3247].

## 2. Code construction and parameterization

For positive integers \(g,m,n\) with \(m\ge gn\), Ouyang defines a one-qubit permutation-invariant code with logical basis
\[
|0_L\rangle
=
\sum_{\substack{\ell\ \mathrm{even}\\0\le \ell\le n}}
\sqrt{\frac{\binom n\ell}{2^{\,n-1}}}\,|D^{gnu}_{g\ell}\rangle,
\qquad
|1_L\rangle
=
\sum_{\substack{\ell\ \mathrm{odd}\\0\le \ell\le n}}
\sqrt{\frac{\binom n\ell}{2^{\,n-1}}}\,|D^{gnu}_{g\ell}\rangle,
\]
where \(g\) is the gap, \(n\) the occupancy, \(u=m/(gn)\ge 1\) the scaling factor, and the block length is exactly
\[
m=gnu
\]
[1302.3247].

This parameterization is operational. The logical zero occupies Dicke weights \(0,2g,4g,\dots\), while the logical one occupies \(g,3g,5g,\dots\), up to \(gn\) [1302.3247]. The gap \(g\) controls how far low-weight errors must move excitation number in order to mix the two logical ladders; the occupancy \(n\) controls how many Dicke levels participate and therefore how much combinatorial cancellation can be enforced; the scaling \(u\) stretches the block without changing the basic ladder structure [1302.3247].

The shortest exact \(t\)-error-correcting GNU family arises from
\[
g=n=2t+1,\qquad u=1,
\]
so that
\[
m=(2t+1)^2\sim 4t^2
\]
[1302.3247]. Ouyang identifies this family as completely symmetrized Bacon–Shor codes. In particular, the \((3,3,1)\)-PI code is Ruskai’s 9-qubit permutation-invariant code, equivalently the completely symmetrized Shor code [1302.3247]. For \(t=2\), the \((5,5,1)\)-PI code has length \(25\) and logical support on Dicke weights \(0,10,20\) and \(5,15,25\), respectively [1302.3247].

## 3. Exact correction of sparse and Pauli-type errors

The exact GNU theorem concerns \(t\)-sparse channels, meaning channels whose Kraus operators are linear combinations of Pauli operators of weight at most \(t\). Ouyang proves that if
\[
g=n=2t+1,\qquad u\ge 1,
\]
then the worst-case error is exactly zero with respect to the resulting gnu code [1302.3247]. In the minimal case \(u=1\), the block length is \((2t+1)^2\) [1302.3247].

The mechanism has two parts. First, because the occupied Dicke weights for \(|0_L\rangle\) and \(|1_L\rangle\) differ by multiples of \(g\), and because \(g=2t+1>2t\), no operator of weight at most \(2t\) can bridge the logical ladders. This forces cross terms
\[
\langle 0_L|A^\dagger B|1_L\rangle
\]
to vanish for \(t\)-sparse Kraus operators \(A,B\) [1302.3247]. Second, the diagonal expectations agree because the difference reduces to an alternating binomial sum annihilated by
\[
\sum_{\ell=0}^{n}\binom n\ell \ell^x(-1)^\ell=0,
\qquad 0\le x\le n-1,
\]
together with the fact that the relevant Dicke-state expectation values become polynomials of degree \(<n\) in \(\ell\) [1302.3247]. In effect, the gap enforces orthogonality, while the binomial amplitudes enforce diagonal equality.

Later work made this exact-error-correction picture more general. “A family of permutationally invariant quantum codes” derives necessary and sufficient Knill–Laflamme conditions for PI codes correcting \(t\) Pauli errors, extending the previously known \(t=1\) Pollatsek–Ruskai conditions to arbitrary \(t\) [2310.05358]. That paper also constructs a broader PI family \(\mathcal Q_{g,m,\delta,\epsilon}\) and proves that, for odd \(m\),
\[
\mathcal Q_{g,\frac{m-1}{2},\,g-1,\,+}
\]
coincides exactly with Ouyang’s GNU code with parameters \((g,m,1)\) [2310.05358]. In the same work, the shortest explicit \(t\)-Pauli-error-correcting code in the new family has length
\[
(2t+1)^2-2t,
\]
which is shorter than the classical GNU benchmark \((2t+1)^2\) for the corresponding explicit PI construction [2310.05358].

## 4. Approximate amplitude damping, spontaneous decay, and deletions

The original GNU paper distinguishes sharply between exact correction of \(t\)-sparse errors and approximate correction of \(t\) spontaneous decays. For the amplitude-damping channel
\[
A_\gamma(\rho)=A_0\rho A_0^\dagger + A_1\rho A_1^\dagger,
\qquad
A_0=|0\rangle\langle0|+\sqrt{1-\gamma}|1\rangle\langle1|,
\qquad
A_1=\sqrt{\gamma}|0\rangle\langle1|,
\]
the GNU choice is
\[
g=t+1,\qquad n>3t,\qquad u\ge 1+\frac{t}{gn},
\]
with advertised minimal length
\[
m=(t+1)(3t+1)+t\sim 3t^2
\]
[1302.3247]. The resulting code is a \(t\)-AD code in the sense that the uncorrectable error scales as \(O(\gamma^{t+1})\) for small \(\gamma\) [1302.3247].

The underlying idea is again gap protection, but now for a non-Pauli, non-unitary channel. Amplitude damping lowers excitation number, and at most \(t\) decays change the weight by at most \(t\), which is too small to mix GNU ladders separated by \(g=t+1\) [1302.3247]. Exact Knill–Laflamme conditions fail in this setting, so Ouyang develops an approximate criterion using deviation matrices \(G_{A,B}\), a total deviation parameter \(\epsilon\), and a lower bound involving \(\operatorname{Tr}G\) and \(\lambda_{\min}(G)\) [1302.3247]. This extends both exact Knill–Laflamme and the approximate criterion of Leung–Nielsen–Chuang–Yamamoto [1302.3247].

A later deletion-oriented development shows that permutation invariance also trivializes location uncertainty for lost particles. “Permutation-invariant quantum coding for quantum deletion channels” states that any permutation-invariant quantum code of distance \(t+1\) can correct \(t\) quantum deletions in both qubit and qudit settings, because deletion of \(t\) unknown particles is equivalent to erasure of a fixed \(t\) particles on the symmetric subspace [2102.02494]. That paper studies shifted gnu codes with block length
\[
N=gnu+\Delta,
\]
where Dicke weights \(gj\) are shifted to \(gj+\Delta\), and gives an \(O(N)\) encoding algorithm and an \(O(N^2)\) decoding algorithm for a special shifted family satisfying
\[
g=\Delta,\qquad n=2\lfloor g/2\rfloor+1,\qquad u=1+\frac1n
\]
[2102.02494].

| Setting | GNU-type parameter choice | Stated guarantee |
|---|---|---|
| Arbitrary \(t\)-sparse / weight-\(t\) errors | \(g=n=2t+1,\ u\ge 1\) | Exact correction; worst-case error \(0\) [1302.3247] |
| \(t\) spontaneous decays / amplitude damping | \(g=t+1,\ n>3t,\ u\ge 1+t/(gn)\) | Approximate \(t\)-AD correction with error \(O(\gamma^{t+1})\) [1302.3247] |
| \(t\) deletions on PI codes | Distance \(t+1\) | Any PI code corrects \(t\) deletions; shifted gnu decoding given explicitly [2102.02494] |

The 2026 general PI QEC theory reinforces this division of labor. For arbitrary correctable errors on arbitrary PI codes it proposes efficient algorithms using total angular momentum measurements, quantum Schur transforms or logical state teleportations, and geometric phase gates; for erasure and deletion errors on certain PI codes it gives a simpler algorithm, and the \(s\)-shifted gnu family is a central example [2602.13638].

## 5. Extensions, comparisons, and the broader PI landscape

Subsequent work places GNU codes inside a larger family of PI constructions rather than displacing them. The 2023 family \(\mathcal Q_{g,m,\delta,\epsilon}\) uses both “low-weight” Dicke sectors \(gl\) and reflected sectors \(n-gl\), introduces a length-adjustment parameter \(\delta\), and a sign parameter \(\epsilon\), and contains the odd-occupancy \(u=1\) GNU subclass exactly [2310.05358]. This broader family corrects Pauli, deletion, and amplitude-damping errors in different regimes and yields shorter explicit block lengths in several cases [2310.05358].

The qubit-versus-qudit PI landscape was sharpened in “Permutation-invariant codes: a numerical study and qudit constructions,” which derives qudit Knill–Laflamme conditions for deletion errors and numerically studies minimal block length as a function of distance [2603.10981]. For qubit PI codes correcting up to \(d-1\) deletions, that work conjectures
\[
n(d)\ge \frac{3d^2+1}{4},
\]
equivalently
\[
d\le \frac{\sqrt{12n-3}}{3},
\]
and reports numerical evidence that Pollatsek–Ruskai codes can saturate this bound [2603.10981]. It also observes that, for qudit PI codes encoding one logical qudit, increasing the physical local dimension \(d_P\) monotonically decreases the needed block length and approaches the quantum Singleton bound \(n(d)\ge 2d-1\) [2603.10981]. This suggests that qudit generalizations of GNU-style ideas may be structurally advantageous even when canonical qubit GNU parameters remain the starting point.

A more sweeping generalization appears in “Quantum error correction beyond \(SU(2)\): spin, bosonic, and permutation-invariant codes from convex geometry,” which explicitly discusses Ouyang’s gnu family as a PI benchmark and embeds PI, bosonic constant-excitation, and generalized spin codes into a common discrete-simplex and \(SU(q)\) framework [2509.20545]. That work compares Ouyang’s shortest \(t\)-error-correcting PI family of length \((2t+1)^2\) with shorter explicit PI families of length \((2t+1)^2-2t\), and proves existence results with distance scaling
\[
d=o\!\left(\frac{N}{\log N}\right)
\]
for PI, spin, and Fock-state codes [2509.20545]. In this framework, GNU codes appear as a distinguished qubit subfamily rather than the full design space [2509.20545].

At the shortest-distance end, “Minimal Permutation-Invariant Qudit Codes from Edge-Colorings of Complete Graphs” constructs, for every \(q\ge 2\), a symmetric-sector code with parameters
\[
((4,q,2))_q,
\]
and proves that no such PI code of dimension \(q\) and distance at least \(2\) exists for \(n\le 3\), making four physical qudits necessary and sufficient [2605.22439]. Although these are not GNU codes in the narrow \((g,n,u)\) sense, they belong to the same occupation-number/Dicke-state tradition and illustrate how far PI code theory has moved toward exact extremal statements [2605.22439].

## 6. Representation theory, enumerators, and applications

Recent work has turned GNU-style symmetry from a code ansatz into a full analysis framework. “A theory of quantum error correction for permutation-invariant codes” develops a general representation-theoretic decoding theory for PI codes using measurements of total angular momentum, SYT- and Schur-Weyl-sector structure, modular Dicke-weight measurements, and geometric phase gates [2602.13638]. In that theory, GNU codes are especially natural because their logical states are sparse, evenly gapped Dicke superpositions, and shifted gnu codes admit particularly simple deletion recovery via measurement of Dicke weight modulo \(g\) followed by a syndrome-dependent subspace map [2602.13638].

At the enumerator level, “Orthogonal Polynomials and the MacWilliams Transform for Permutation-Invariant Qudit Codes” derives an explicit intrinsic MacWilliams transform for PI qudit codes in \(\mathrm{Sym}^n(\mathbb C^q)\) [2605.15372]. The operator space decomposes multiplicity-free as
\[
L(V_n)\cong \bigoplus_{a=0}^n W_a,
\]
and the corresponding MacWilliams matrix is identified with a finite Racah transform whose entries are given by a terminating hypergeometric series [2605.15372]. For GNU codes, this does not give a new construction, but it supplies the symmetry-adapted harmonic-analysis machinery needed for intrinsic weight enumerators and linear-programming bounds in the symmetric sector [2605.15372].

Permutation-invariant gnu codes have also entered fault-tolerance-oriented applications. “Magic state distillation with permutation-invariant gnu codes and a two-qubit example” uses GNU codes as the central primitive of a nonstandard distillation protocol, with logical states
\[
|0_{g,n,u}\rangle,\quad |1_{g,n,u}\rangle
\]
defined by the GNU Dicke-superposition formula and projection onto the code subspace followed by decoding [2603.04310]. The paper reports a two-qubit GNU protocol with threshold \(0.5\) and distillation rate \(1/2\), and emphasizes that varying the input-state position on the Bloch sphere allows distillation of magic states with arbitrary magic, not only \(|T\rangle\) and \(|H\rangle\) [2603.04310]. Closely related PI families, though not standard GNU codes, have also been used for measurement-free code switching and transversal rational \(Z\)-rotations, showing that symmetric Dicke-state encodings support non-Clifford gate constructions beyond the original Ouyang noise models [2411.13142].

Permutation-invariant GNU codes therefore occupy a specific but still central place in the PI-code literature. They are the original \((g,n,u)\)-parameterized Dicke-superposition family, physically motivated by the Heisenberg ferromagnet, combinatorially structured by excitation gaps and alternating binomial amplitudes, exact for \(t\)-sparse errors in one regime and approximate for amplitude damping in another, and sufficiently rigid to anchor later developments in deletion correction, PI decoding theory, intrinsic MacWilliams analysis, and small-block magic-state distillation [1302.3247].

Source: https://www.emergentmind.com/topics/permutation-invariant-gnu-codes