---
title: Permutationally Invariant Codes
url: https://www.emergentmind.com/topics/permutationally-invariant-codes
type: topic
---

# Permutationally Invariant Codes

A permutationally invariant code (often abbreviated as "PI code") is a code—either classical or quantum—whose codewords are invariant under some or all permutations of the underlying degrees of freedom. These codes appear in diverse fields, including quantum error correction, information theory for permutation channels, potential energy surface representations in computational chemistry, and combinatorial designs. The core property is that the symmetries of the problem—typically, invariance under a symmetric group action—are faithfully reflected in the code’s construction and decoding.

## 1. Foundational Principles of Permutational Invariance

Permutational invariance refers to systems whose relevant quantities or error models possess a symmetry under permutations. In quantum coding, this typically means the code subspace is preserved by the natural action of the symmetric group $S_n$ on $n$ subsystems. For classical permutation channels, only the overall multiset of transmitted symbols is observed, so the channel is permutation-invariant and only codesets invariant (or robust) under symbol reordering are effective decoders.

In quantum settings, for $n$ qubits, the symmetric (bosonic) subspace is defined as
$$
\mathrm{Sym}^n(\mathbb{C}^2) = \mathrm{Span}\{ |D^n_w\rangle : w = 0, ..., n \}
$$
where $|D^n_w\rangle$ is the Dicke state of $n$ qubits and Hamming weight $w$, i.e., the uniform superposition of computational basis states with $w$ ones. Every state in this subspace is invariant under all permutations of the qubits [2310.05358, 1302.3247, 1512.02469].

For chemical machine learning, permutationally invariant polynomials (PIPs) are used to ensure molecular potential energy surfaces (PESs) are invariant under permutations of like nuclei, reflecting the indistinguishability of identical atoms [2411.17011].

## 2. Classical Permutationally Invariant Codes

Classical PI codes address permutation channels—communication settings where symbols are reordered by the channel or presented as unordered multisets. The codeword relevant for error detection/correction is the multiset of symbols, represented as a multiplicity vector in the discrete simplex of dimension $q-1$,
$$
\Delta_n^{q-1} = \{ x \in \mathbb{Z}_+^q : \sum_{i=0}^{q-1} x_i = n\}
$$
Error events include insertions, deletions, substitutions, and erasures, all of which can be related to a metric $d_1(x,y) = \frac{1}{2} \sum_{i=0}^{q-1} |x_i - y_i|$, the minimal number of deletions or insertions to transform one multiset into another [1612.08837].

Codes are constructed to maximize packing under this metric. A code $C$ corrects $h$ deletions if $d_1(C) > h$. For optimality, constructions based on Sidon sets in finite Abelian groups achieve the best-known scaling, with the code
$$
C_n^{(G,B,b)} = \{ x \in \Delta_n^{q-1} : \sum_{i=0}^{q-1} x_i b_i = b \}
$$
where $B$ is a Sidon set of order $h$, provides optimal performance up to asymptotics [1612.08837]. The overall rate for fixed $q$ is $\Theta(n^{q-1})$ symbols. Such codes are also diameter-perfect in many regimes.

Permutation codes of permutations, i.e., arrays or subsets of $S_n$ with large minimal pairwise Hamming distance, can be isometry-invariant; their construction is closely tied to the isometry group of $S_n$ under the Hamming metric [0911.1713, 1812.06886].

## 3. Quantum Permutationally Invariant Codes

Quantum PI codes are subspaces of the symmetric subspace of $(\mathbb{C}^2)^{\otimes n}$. Logical codewords are superpositions of Dicke states. For a two-dimensional code encoding a single logical qubit, the codewords take the general form
$$
|c_0\rangle = \sum_{j=0}^n \alpha_j |D^n_j\rangle, \quad |c_1\rangle = \sum_{j=0}^n \beta_j |D^n_j\rangle
$$
with coefficients $\{\alpha_j\},\{\beta_j\}$ chosen to enforce necessary error-correction symmetries (typically, orthogonality and Knill–Laflamme conditions) [2310.05358, 1302.3247].

The distinctive feature is that any $t$-local error (arbitrary $t$-qubit Pauli error, deletion, amplitude-damping) acts symmetrically due to the code’s invariance, drastically simplifying both the design and the analysis of the code [2102.03015, 2410.03562].

Variant PI code constructions achieve:
- Correction of $t$ arbitrary Pauli errors: Code length $n = (2t+1)^2$ suffices for perfect correction [1302.3247]. More recently, shorter codes for small $t$ have been constructed [2310.05358].
- Correction of $t$ deletion errors and simultaneous $t$ Pauli/single-qubit errors, using carefully partitioned weight-sets [2102.03015].
- Suppression of spontaneous decay (amplitude damping) errors to first or higher order [1302.3247, 1512.02469, 2310.05358].
- Encoding of more than one logical qubit while suppressing errors to specified order, employing number-theoretic coprimality in the codeword weights [1512.02469].
- Realization of nontrivial logical gate sets, including transversal non-Clifford gates via spin code constructions [2310.17652].

## 4. Construction Methods and Error Correction Conditions

The design of PI codes typically proceeds via:
- Parameterization of codewords by Dicke state coefficients, potentially subject to number-theoretic constraints [1512.02469].
- Satisfaction of tailored Knill–Laflamme conditions. For $t$-error correction, these reduce for PI codes to combinatorial identities among Dicke coefficients—examples include four quadratic conditions in codeword overlaps for arbitrary $t$ [2310.05358, 2410.03562].
- For deletion correction, binomial-sum identities over codeword coefficients, weight partitions, and specific normalization/disjointness conditions [2102.03015]. The optimal codes achieving simultaneous multi-deletion and qubit-error correction are constructed by splitting weights into orbits separated by at least $t$, with matching binomial-sum distributions after $t$ deletions.

For classical permutation channels, construction methods involve codes in the multiset simplex by group-based syndrome constraints (Sidon set methods) [1612.08837].

For potential energy surface representations, PIPs are formed by symmetrizing monomials over the group of permutations of like atoms, producing a basis of polynomials
$$
\phi(\vec{\gamma}) = \frac{1}{|G|} \sum_{\pi \in G} m(\gamma_{\pi(1)}, ..., \gamma_{\pi(M)})
$$
where $m$ is a primitive monomial and $G$ is the permutation group of identical atoms [2411.17011].

## 5. Applications and Performance Benchmarks

Permutationally invariant codes are applied across several domains:

- **Quantum Error Correction**: PI codes are prominent in protecting quantum memories and channels against noise models featuring strong symmetry (e.g., collective decoherence, amplitude damping, deletions). They provide sharply reduced code construction complexity and, for given $t$, often achieve the shortest explicit code lengths known [1302.3247, 2310.05358, 2102.03015].
- **Quantum Communication Capacity**: PI codes enable efficient block-diagonalization and computation of coherent information for i.i.d. quantum channels, allowing improved lower bounds on capacity thresholds for Pauli, dephrasure, amplitude-damping, and composite channels [2508.09978].
- **Potential Energy Surfaces in Chemistry**: PIP constructions are essential in modeling molecular interactions conforming to the indistinguishability of nuclei. The MOLPIPx package provides automated, fully differentiable pipelines for generating and evaluating PIP bases, supporting machine learning models that require forces and higher derivatives [2411.17011].
- **Combinatorial Designs**: PI (permutation-array) codes correspond directly, via their separation properties, to combinatorial structures such as mutually orthogonal Latin squares (MOLS). Explicit constructions using isometry-invariant codes have yielded new lower bounds for the number of MOLS of various orders [1812.06886].

### Performance Example Table: Quantum PI Codes for Error Correction

| Target Error | Earliest Explicit Construction | Code Length n | Reference              |
|--------------|-------------------------------|--------------|------------------------|
| t Pauli      | $(2t+1)^2$ (Ouyang)           | $(2t+1)^2$   | [1302.3247]            |
| t Pauli      | Improved construction         | $< (2t+1)^2$ | [2310.05358]           |
| t Deletion   | Weight partition codes         | $gnu$        | [2102.03015]           |
| 1-AD         | Symmetrized Shor (Ruskai)      | 9            | [1302.3247]            |
| k Logicals   | Number-theory, $D$ log qubits | $N^q$        | [1512.02469]           |

## 6. Impact, Generalizations, and Open Problems

Permutationally invariant codes have shaped several lines of research:

- **Optimality and Shortest Length**: PI codes have produced the shortest known explicit quantum codes able to correct multiple deletion errors and, in some parameters, multiple qubit errors and deletions simultaneously [2310.05358, 2102.03015].
- **Transversal Gate Sets and Fault Tolerance**: Certain PI codes constructed via spin code techniques achieve transversal implementation of non-Clifford gates, outperforming stabilizer codes in both minimum code length and error distance [2310.17652].
- **Capacity and Superadditivity**: Block-diagonalization for permutation-invariant codes provides polynomial-time computation of coherent information, facilitating capacity analyses for large block sizes and enabling the discovery of new superadditive codes for quantum channels [2508.09978].
- **Mapping Between Code Families**: It has been shown that PI codes that correct weight-$t$ errors can be linearly mapped to absorption-emission (AE) codes correcting order-$t$ transitions in collective spin systems, yielding efficient low-angular-momentum bosonic codes [2410.03562].
- **Many-Body and Higher-Dimensional Systems**: Generalizations include higher-dimensional PI codes, explicit code constructions for multiple logical qubits, and PI code adaptation to multiset channels and chemical modeling [1512.02469, 2411.17011].

Open problems include determination of minimal-length multi-logical PI codes, extension to nonbinary and higher-rank symmetric group settings, and further characterizing the full range of transversal gate groups admitted by PI code architectures.

## 7. Representative Software and Computational Tools

For applications in computational chemistry and machine learning, the package MOLPIPx provides an end-to-end differentiable implementation for generating, symmetrizing, and manipulating the PIP basis in both Python (JAX/Flax) and Rust (EnzymeAD), supporting energy, force, and higher-order property calculations within modern ML frameworks. The core workflow involves:
- Generation of monomial and polynomial bases via the Monomial Symmetrization Algorithm.
- Automatic differentiation throughout the PIP pipeline for fast and exact gradient and Hessian computation.
- Integration into modular models such as linear, neural network, and Gaussian process frameworks for potential energy surface parameterization [2411.17011].

This computational infrastructure enables large-scale, permutation-consistent force field modeling, with benchmarks demonstrating low evaluation times and robust convergence for parameter optimization in practical molecular systems.

---

For in-depth mathematical definitions, explicit construction details, and concrete code examples, see [2411.17011], [2310.05358], [2102.03015], [1302.3247], [1512.02469], and [2508.09978].

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