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

# Gapped Permutation-Invariant Codes

Gapped permutation-invariant codes are code families whose defining symmetry is invariance under permutations, while their error-control mechanism relies on a deliberate separation of supports. In the classical permutation-code setting, the “gap” refers to minimum distance \(d=n-1\), i.e. a distance one below the absolute maximum \(n\), and the codes are often realized as unions of isometry-group orbits in \(S_n\). In the quantum setting, the term typically refers to support on Dicke weights, occupation vectors, or congruence classes that are separated far enough that the relevant error operators cannot connect logical supports. These two usages share a common structural theme: symmetry reduces the analysis to orbit structure or irreducible sectors, and the gap suppresses unwanted overlaps or transitions [1812.06886] [1302.3247] [2605.22439].

## 1. Formal settings and permutation invariance

For classical permutation codes, the ambient space is the symmetric group \(S_n\) equipped with the Hamming metric
\[
d_H(\sigma,\tau):=|\{i\in[n]:\sigma(i)\neq \tau(i)\}|=n-|\mathrm{Fix}(\sigma^{-1}\tau)|.
\]
A permutation code \(C\subseteq S_n\) has minimum distance
\[
d(C):=\min\{d_H(\sigma,\tau):\sigma,\tau\in C,\ \sigma\neq\tau\},
\]
and an \((n,d)\)-PA denotes a permutation array of length \(n\) and distance \(d\). The full isometry group of \((S_n,d_H)\) is
\[
\mathrm{Isom}(S_n,d_H)\cong S_n\wr C_2\cong (S_n\times S_n)\rtimes C_2,
\]
generated by left multiplication, right multiplication, and inversion. A code is \(U\)-invariant if it is a union of \(U\)-orbits under the induced action, and orbit sizes satisfy \(|U\cdot x|=|U|/|\mathrm{Stab}_U(x)|\) [1812.06886].

For quantum permutation-invariant codes, the ambient space is the symmetric subspace. For \(n\) qudits of local dimension \(q\),
\[
\mathrm{Sym}^n(\mathbb{C}^q):=\{\psi\in (\mathbb{C}^q)^{\otimes n}:\Pi\cdot \psi=\psi\ \text{for every permutation }\Pi\in S_n\},
\]
with
\[
\dim \mathrm{Sym}^n(\mathbb{C}^q)=\binom{n+q-1}{n}.
\]
In qubit language, the symmetric subspace is spanned by Dicke states \(|D_w^n\rangle\), uniform superpositions over computational basis strings of Hamming weight \(w\). In qudit language, the Dicke basis is indexed by compositions \(\lambda\in\mathbb{N}^{d_P}\) with \(|\lambda|=n\) [2605.22439] [2603.10981].

Permutation invariance is therefore realized in two closely related ways. In the classical setting it is invariance under isometries or subgroup actions on \(S_n\); in the quantum setting it is invariance under tensor-factor permutations, usually restricting the code to a fully symmetric irrep. This suggests a common algebraic viewpoint in which symmetry compresses the search space, and the gap controls which transitions remain possible.

## 2. Meanings of the “gap”

In the classical permutation-array literature, the gap is a near-maximal distance condition. An \((n,n-1)\)-PA is one unit below the maximal possible distance \(n\). The paper on isometry-invariant permutation codes states explicitly that separable codes are “gapped permutation-invariant codes” with \(d\) very close to \(n\); for the main constructions, the gap ratios are \(34/35\approx 0.9714\), \(47/48\approx 0.9792\), \(62/63\approx 0.9841\), and \(95/96\approx 0.9896\) [1812.06886].

A more refined classical notion is separability. An \((n,n-1)\)-PA \(C\) is \((r,m)\)-separable if it is the disjoint union of \(m\) codes \(L_1,\dots,L_m\), each \(L_i\) an \((n,n)\)-PA of cardinality \(r\), and
\[
d_H(\sigma,\tau)=n-1\quad\text{for all }\sigma\in L_i,\ \tau\in L_j,\ i\neq j.
\]
When \(r=n\), this is equivalent to \(m\) mutually orthogonal Latin squares of order \(n\) [1812.06886].

In quantum PI coding, the gap is a support-separation condition. Ouyang’s gnu codes occupy Dicke layers \(\{g\ell\}\), with \(|0_L\rangle\) supported on even \(\ell\) and \(|1_L\rangle\) on odd \(\ell\); the supports are disjoint and spaced by at least \(g\), so errors that shift Hamming weight by less than \(g\) cannot couple the logical supports [1302.3247]. The later numerical study formulates the same principle for both qubits and qudits: qubit supports lie on a gapped set \(\mathcal{K}\subset\{0,\dots,n\}\) with minimum spacing at least \(g\), while qudit supports lie on compositions with common spacing \(g\) in each coordinate, typically with \(g\ge 2t\) for \(t\) correctable Pauli errors [2603.10981].

Other quantum papers use equivalent constructions without always formalizing the term. In the \(BD_{2b}\)-covariant spin-code framework, logical supports occupy residue classes modulo \(2b\), so the Dicke weights of \(|0_L\rangle\) and \(|1_L\rangle\) lie in disjoint congruence classes mod \(2b\); the paper states that the constructions are “precisely of that type” even though the term “gapped” is not used there [2310.17652]. In the qudit family with parameters \(((4,q,2))_q\), the codewords are supported on the even-entry occupation layer
\[
\mathcal{E}:=\{a\in \mathbb{Z}_{\ge 0}^q:\sum a_i=4\ \text{and every }a_i\text{ is even}\},
\]
so any single root move changes parity and leaves the code space, creating what the paper calls an occupation-parity barrier [2605.22439].

A common misconception is that “gapped” means only large blockwise distance. In this literature it can instead mean near-maximal permutation distance, arithmetic separation of Dicke weights, congruence-class separation modulo a phase order, or parity separation of occupation vectors. The unifying feature is not a single formal definition but controlled non-overlap under the target error action.

## 3. Classical orbit constructions and the MOLS correspondence

The 2018 construction of isometry-invariant permutation codes uses large subgroups \(U\leq \mathrm{Iso}(n)\), typically extensions of \(\Delta(E_n)\), and forms codes as unions of \(U\)-orbits together with orbit decompositions of \(E_n\). The resulting codes are \((n,n-1)\)-PAs with explicit separable structure, and by the standard correspondence they yield new lower bounds for the maximum number \(N(n)\) of mutually orthogonal Latin squares of order \(n\) [1812.06886].

| \(n\) | Code parameters | Consequence for MOLS |
|---|---|---|
| 35 | \((35,34)\)-PA, size \(210=6\times 35\), \((35,6)\)-separable | \(N(35)\ge 6\) |
| 48 | \((48,47)\)-PA, size \(480=10\times 48\), \((48,10)\)-separable | \(N(48)\ge 10\) |
| 63 | \((63,62)\)-PA, size \(504=8\times 63\), \((63,8)\)-separable | \(N(63)\ge 8\) |
| 96 | \((96,95)\)-PA, size \(768=8\times 96\), \((96,8)\)-separable | \(N(96)\ge 8\) |

For \(n=35\), the authors take \(E_{35}=\Phi(\mathcal{R}(\mathbb{Z}_{35}))\leq B_1\), generate \(U=\langle \Delta(E_{35}),y_1,y_2\rangle\), and use three explicit orbit representatives \(a,b,c\in B_1\). The orbit sizes are \(|a*U|=70\), \(|b*U|=70\), \(|c*U|=35\), and \(E_{35}\) splits into \(18\) \(U\)-orbits of sizes \(1\) or \(2\), giving a code of size \(210\) and a \((35,6)\)-separable structure [1812.06886].

For \(n=48\), \(U\) has order \(1152\), extends \(\Delta(E_{48})\) with index \(24\), and yields orbit sizes \(288\), \(144\), \(24\), \(12\), and \(12\), totaling \(480=10\times 48\). For \(n=63\), \(U\) has order \(3402\), extends \(\Delta(E_{63})\) with index \(54\), and yields orbit sizes \(378\), \(63\), \(54\), and \(9\), totaling \(504=8\times 63\). For \(n=96\), \(U\) has order \(4608\), extends \(\Delta(\Phi(\mathcal{R}(\mathbb{Z}_2^4\times \mathbb{Z}_6)))\) with index \(48\), and yields orbit sizes \(576\), \(96\), \(48\), and \(48\), totaling \(768=8\times 96\) [1812.06886].

This orbit-based description is presented as an alternative to difference-matrix constructions. The paper states a one-to-one correspondence between normalized \((G,m+1;1)\)-difference matrices and \(\Phi(\mathcal{R}(G))\)-invariant codes of length \(m\cdot n\) with minimum distance \(n-1\) containing \(\Phi(\mathcal{R}(G))\), but then emphasizes that the uniform isometry-group method can go beyond direct difference-matrix realizations and is convenient for computation in MAGMA or GAP [1812.06886].

## 4. Quantum Dicke-gap families for Pauli, deletion, and damping errors

The earliest systematic PI construction in the provided corpus is Ouyang’s gnu family. With parameters \(g\ge 1\), \(n\ge 1\), and \(u\ge 1\), the block length is \(m=gnu\), and the logical states are
\[
|0_L\rangle=\sum_{\ell\ \mathrm{even}} \sqrt{\frac{\binom{n}{\ell}}{2^{n-1}}}\,|D^{(m)}_{g\ell}\rangle,\qquad
|1_L\rangle=\sum_{\ell\ \mathrm{odd}} \sqrt{\frac{\binom{n}{\ell}}{2^{n-1}}}\,|D^{(m)}_{g\ell}\rangle.
\]
For perfect correction of arbitrary \(t\)-qubit errors, the choice \(g=n=2t+1\) gives \(m=(2t+1)^2u\), while for approximate correction of \(t\) spontaneous decays one may take \(g=t+1\), \(n=3t+1\), and \(u=1+\tfrac{t}{(t+1)(3t+1)}\), giving
\[
m=(t+1)(3t+1)+t\sim 3t^2+O(t).
\]
The gap guarantees that operators changing Hamming weight by less than \(g\) cannot mix the logical supports, and the binomial weighting enforces the needed cancellations in the Knill–Laflamme conditions [1302.3247].

Deletion correction sharpened this picture. One 2021 result states that any permutation-invariant quantum code of distance \(t+1\) can correct \(t\) quantum deletions in both qubit and qudit settings, because on symmetric states the deletion channel is equivalent to partial trace over any fixed \(t\) positions [2102.02494]. A related 2021 construction gives explicit weight-set conditions \((D1)\)–\((D3)\) for \(t\)-deletion correction and, in particular, a canonical family with
\[
A=\{g\ell:0\le \ell\le n,\ \ell\ \text{even}\},\qquad
B=\{g\ell:0\le \ell\le n,\ \ell\ \text{odd}\},
\]
where \(g,n\ge t+1\), \(N=gnu\), and
\[
f(g\ell)=\sqrt{\frac{\binom{n}{\ell}}{2^{n-1}\binom{gnu}{g\ell}}}.
\]
For \(g=n=2t+1\), the same code simultaneously corrects up to \(t\) arbitrary qubit errors and up to \(2t\) deletions [2102.03015].

The later \(Q_{g,m,\delta,\epsilon}\) family generalizes these constructions. It encodes one qubit into
\[
n=2gm+\delta+1
\]
physical qubits, with logical states supported at weights \(g\ell\) and \(n-g\ell\), parity-selecting which terms appear in \(|c_0\rangle\) and \(|c_1\rangle\). If \(m\ge t\), \(\delta\ge 2t\), and either \((g\ge 2t,\epsilon=-1)\) or \((g\ge 2t+1,\epsilon=+1)\), then the code corrects any \(t\) Pauli errors; analogous inequalities give deletion and amplitude-damping correction. The paper highlights \(Q_{1,1,1,-}\) as a new optimal \(((4,2,2))\) single-deletion-correcting code, \(Q_{2,1,2,-}\) as a \(((7,2,3))\) PI code, and \(Q_{4,2,4,-}\) as a \(((21,2,5))\) PI code [2310.05358].

Shifted GNU codes introduce an additional shift \(\Delta\), replacing occupied weights \(gj\) by \(gj+\Delta\) and block length \(N\) by \(N'=gnu+\Delta\), while preserving distance
\[
d=\min\{g,n\}.
\]
For the special choice \(g=\Delta\), \(n=2\lfloor g/2\rfloor+1\), and \(u=1+1/n\), the block length becomes \(N'=gn+2g\), and the code has transversal logical operations \(X^{\otimes N'}\) and \(R^{\otimes N'}\), where \(R=|0\rangle\!\langle 0|+e^{\pi i/g}|1\rangle\!\langle 1|\) [2102.02494].

## 5. Representation theory, congruence classes, and occupation-parity gaps

One important development interprets gapped PI coding through representation theory rather than only through Hamming-weight arithmetic. In the spin-code framework, a code lives in a single spin-\(j\) irrep and is mapped to a PI code on \(n=2j\) qubits by the Dicke bootstrap
\[
|j,m\rangle \longmapsto |D^{2j}_{j-m}\rangle.
\]
For \(BD_{2b}\)-covariant constructions, the logical supports satisfy
\[
\mathrm{supp}(|0_L\rangle)\subset \{m=s+2b\ell\},\qquad
\mathrm{supp}(|1_L\rangle)\subset \{-s+2b\ell\},
\]
with \(s=(2a-1)/2\). After the Dicke map, the weight supports lie in disjoint residue classes modulo \(2b\). This residue-class gap is what makes transversal generalized phase gates act with constant phase on each logical codeword and what kills many off-diagonal error terms automatically [2310.17652].

The minimal \(d=3\) family in that framework has \(n=2b+3\) qubits. For \(BD_8\), the paper gives an explicit \(((11,2,3))\) code with
\[
|0_L\rangle=\sqrt{\tfrac{5}{16}}\,|D^{11}_0\rangle+\sqrt{\tfrac{11}{16}}\,|D^{11}_8\rangle,\qquad
|1_L\rangle=\sqrt{\tfrac{5}{16}}\,|D^{11}_{11}\rangle+\sqrt{\tfrac{11}{16}}\,|D^{11}_3\rangle,
\]
on which transversal \(T^{\otimes 11}\) acts as the logical gate \(T^3\). Higher-distance \(T\)-transversal PI codes reported numerically are \(((27,2,5))\), \(((49,2,7))\), \(((73,2,9))\), \(((107,2,11))\), and \(((147,2,13))\) [2310.17652].

A qudit analogue replaces residue classes by occupation-parity separation. In \(\mathrm{Sym}^4(\mathbb{C}^q)\), the paper constructs permutation-invariant codes with parameters \(((4,q,2))_q\) for every integer \(q\ge 2\). The codewords are supported on packets inside the even-entry occupation layer
\[
\mathcal{E}=\{a\in\mathbb{Z}_{\ge 0}^q:\sum a_i=4,\ \text{every }a_i\text{ is even}\},
\]
which consists exactly of \(4e_i\) and \(2e_i+2e_j\). Because any root operator changes occupation by \(\pm 1\) in two coordinates, no two distinct vectors in \(\mathcal{E}\) are root-adjacent, so all root-error Knill–Laflamme conditions vanish automatically. The remaining Cartan conditions reduce to balancing equations on packets organized by edge-colorings of \(K_q\): midpoint packets for odd \(q\), and perfect matchings together with a vertex packet for even \(q\) [2605.22439].

The same paper proves minimality: for \(n\le 3\), no PI code with \(K=q\) can satisfy the distance-2 constraints, while for \(n=4\) such a code exists for every \(q\ge 2\). This makes four physical qudits necessary and sufficient for a distance-two PI code encoding one logical qudit in the symmetric sector [2605.22439].

These representation-theoretic constructions also clarify a misconception sometimes associated with PI codes. The 2023 spin-code paper states that the only permutation-invariant stabilizer codes are the quantum repetition codes \([[k+2,k,2]]\), but non-additive PI codes can realize much richer transversal gate groups, including binary dihedral groups and exact transversal non-Clifford phases [2310.17652].

## 6. Bounds, numerical evidence, and broader formulations

The 2026 numerical study of PI quantum codes places gapped constructions in an optimization and asymptotic context. It conjectures that qubit PI codes correcting up to \(d-1\) deletion errors obey
\[
n(d)\ge \frac{3d^2+1}{4},
\]
equivalently \(n_{\min}(t)=3t^2+3t+1\) for \(D=2t+1\), implying
\[
d\le \frac{\sqrt{12n-3}}{3}.
\]
It further reports that minimal Pollatsek–Ruskai codes saturate this quadratic scaling numerically, and that for qudit PI codes encoding a single logical qudit, increasing physical local dimension \(d_P\) makes the required block length \(n\) decrease monotonically toward the quantum Singleton bound \(n\ge 2D-1\) [2603.10981].

That study also gives a semi-analytic simplicial qudit extension of Aydin–Alekseyev–Barg constructions. The decision variables are nonnegative weights \(w_{\vec l}=|f(\vec l)|^2\), normalized by \(\sum_{\vec l\in R} w_{\vec l}=1\), with the remaining Knill–Laflamme constraints reduced to linear equalities. This formulation reinforces the central role of gaps: separation in Dicke weights or compositions turns orthogonality constraints into combinatorial support conditions, leaving only a smaller balancing problem [2603.10981].

Permutation invariance has also been used algorithmically for coherent-information optimization. A 2025 paper studies convex mixtures of i.i.d. pure states under i.i.d. channels and evaluates coherent information by Schur–Weyl block decomposition. It interprets non-orthogonal repetition-code-like inputs as statistically gapped PI constructions because the Dicke expansions of \(|\psi_1\rangle^{\otimes n}\) and \(|\psi_2\rangle^{\otimes n}\) are peaked at different mean Hamming weights. Using this framework, the paper reports improved lower bounds on quantum capacities for several channel families, including 2-Pauli, BB84, generalized amplitude damping, dephrasure, and damping-dephasing channels [2508.09978].

A broader classical analogue appears in multiset coding for permutation channels. There the ambient space is the discrete simplex
\[
\triangle_n^{q-1}=\{\mathbf{x}\in\mathbb{Z}^q:x_i\ge 0,\ \sum_i x_i=n\},
\]
with metric
\[
d_1(\mathbf{x},\mathbf{y})=\frac12\sum_{i=0}^{q-1}|x_i-y_i|.
\]
In that setting, a “gapped permutation-invariant code” can be interpreted as a multiset code whose minimum \(d_1\)-distance exceeds the error radius, and Sidon-set constructions provide both metric and algebraic separation of codewords [1612.08837].

Taken together, these results show that “gapped permutation-invariant codes” are not a single narrow family but a recurrent design paradigm. In classical permutation arrays, the gap is a near-maximal Hamming distance stabilized by large isometry groups and linked to MOLS. In quantum coding, the gap is usually a carefully engineered separation in Dicke weights, occupation vectors, or residue classes, used to nullify low-weight transitions and reduce the remaining constraints to symmetry-adapted balancing equations. This suggests that the enduring content of the term is methodological rather than purely definitional: exploit permutation symmetry to organize the code, and exploit support separation to make the relevant error algebra sparse.

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