Quantum Quadratic Residue Codes Overview
- Quantum quadratic residue codes are quantum stabilizer codes derived from classical expurgated quadratic residue codes, yielding a one-logical-qudit construction with prime block lengths.
- The construction uses Hermitian self-orthogonality based on quadratic residue and nonresidue sets, ensuring error correction distances that often meet rigorous bounds.
- These codes underpin advanced magic-state distillation protocols and inspire diverse extensions including cyclic, quasi-cyclic, and asymmetric quantum constructions.
Searching arXiv for recent and foundational papers on quantum quadratic residue codes and closely related constructions. Quantum quadratic residue codes are quantum stabilizer codes derived from the arithmetic and algebraic structure of classical quadratic residue codes. In the most precise recent usage, a quantum quadratic residue code is the image under of a Hermitian self-orthogonal expurgated quadratic residue code over , yielding a one-logical-qudit stabilizer code of prime length (Zurel et al., 19 Mar 2026). More broadly, the literature also uses quadratic residue structure to build cyclic stabilizer codes, quasi-cyclic stabilizer codes, quantum synchronizable codes, and asymmetric quantum codes, so the subject spans both a narrow Hermitian-stabilizer definition and a wider family of residue-based quantum constructions (Xie et al., 2014).
1. Classical quadratic-residue foundations
Let be an odd prime, and let denote the nonzero quadratic residues and nonresidues modulo , with . A standard expurgated quadratic residue code over has generator polynomial
zero set , and parameters 0; the corresponding augmented and extended variants supply the standard odd-like/even-like QR trichotomy that underlies most quantum constructions (Zurel et al., 19 Mar 2026).
For binary QR codes of prime length 1, the literature used in quantum constructions distinguishes the 2 pair 3 from the 4 pair 5, and exploits the square-root bound
6
with the refinement
7
when 8 (Xie et al., 2014). In the asymmetric setting, the same QR data appear as 9, with
0
and
1
A distinct but related classical object is the binary quasi-quadratic residue code
2
which is self-dual of length 3 and dimension 4 when 5 (Boston et al., 2017). This terminology is a recurring source of ambiguity: in later quantum work, “QQR” refers to quantum quadratic residue codes, whereas in this classical literature it denotes quasi-quadratic residue codes.
2. Stabilizer realization and exact quantum definition
The most explicit modern definition takes a classical expurgated QR code 6 and identifies 7 with 8 through
9
where 0. A quantum quadratic residue code on 1-dimensional qudits is then the image under 2 of a Hermitian self-orthogonal expurgated quadratic residue code over 3 (Zurel et al., 19 Mar 2026).
The Hermitian self-orthogonality criterion is
4
for 5. Specializing to 6, the existence condition becomes
7
For qubits this is equivalent to 8 or 9; for qutrits it is equivalent to 0 or 1. The corresponding stabilizer code has parameters
2
with
3
Thus the recent QQR family is inherently a one-logical-qudit family with prime blocklength and classical distance inherited from expurgated QR codes (Zurel et al., 19 Mar 2026).
This family is not uniformly CSS. It becomes CSS when the underlying expurgated QR code already exists over 4, in which case
5
for the corresponding expurgated QR code 6 over 7. For qubits this occurs exactly when 8, and for qutrits exactly when 9 (Zurel et al., 19 Mar 2026).
3. Residue-based quantum code families beyond the narrow QQR definition
Quantum synchronizable codes form one important extension of the QR paradigm. Starting from cyclic codes 0 with 1, the synchronizable-code theorem yields
2
subject to
3
where 4. For binary QR codes of prime length 5, one has
6
hence dual-containment, and for Mersenne primes 7 the generator polynomial factors into 8 irreducible factors of degree 9. Deleting 0 such factors produces supercodes and a family
1
with
2
which attains the synchronization upper bound in that framework (Xie et al., 2014).
Asymmetric quantum codes arise from QR codes through expansion from 3 to the prime field. For 4, the classical relation
5
gives 6 and yields
7
For 8, the dual-containing relation
9
gives
0
In both families the unexpanded quantum dimension is 1, and expansion multiplies it to 2 (Guardia, 2013).
A different construction starts directly from quadratic residue sets rather than from classical QR duality theorems. For primes 3, the stabilizer matrix 4 is built so that
5
The resulting Type-I family is cyclic of length 6, while Type-II is quasi-cyclic of length 7 with 8. For 9 and odd 0, the Type-I family gives
1
including
2
For 3 and even 4, one gets high-rate cyclic codes
5
The Type-II quasi-cyclic constructions produce examples such as 6, 7, and 8, with code dimension determined by rank formulas 9 or 0 depending on the parity of 1 (Xie et al., 2014).
4. Representative parameter families and code equivalences
Several distinct QR-based quantum families coexist in the literature:
| Family | Main hypothesis | Quantum parameters |
|---|---|---|
| Hermitian QQR | 2 | 3 |
| Synchronizable QR | 4, 5 | 6 |
| Expanded AQECC from QR | 7 quadratic residue mod 8 | 9 |
| QR-set stabilizer codes | 00 | cyclic 01, QC 02 |
Within the recent Hermitian framework, the paper explicitly identifies several landmark distillation codes as quantum quadratic residue codes up to permutations of qudits and local Clifford equivalence. The length-03 qubit QQR code is equivalent to the 04 perfect code, the length-05 qubit QQR code is equivalent to the Steane code, the length-06 qutrit QQR code is equivalent to the 07-qutrit Golay code, and the length-08 qubit QQR code is equivalent to the 09-qubit Golay code (Zurel et al., 19 Mar 2026).
The same work lists representative classical and quantum parameter pairs. For qubits: 10
11
12
For qutrits: 13
14
15
These examples exhibit the characteristic one-logical-qudit structure of the modern QQR family (Zurel et al., 19 Mar 2026).
5. Magic-state distillation and current significance
Quantum quadratic residue codes acquired renewed prominence through magic-state distillation. In that setting, the family supplies 16-to-1 stabilizer reductions for both qubit 17-states and qutrit Strange states, and the recent synthesis argues that several of the most important known distillation protocols are unified by the QQR formalism (Zurel et al., 19 Mar 2026).
For qubits, the reported QQR codes of lengths
18
distill 19 states, with thresholds
20
respectively. For qutrits, the reported QQR codes of lengths
21
distill Strange states, with thresholds
22
The best thresholds in that study remain the 23-qubit code for 24-state distillation and the 25-qutrit Golay/QQR code for Strange-state distillation (Zurel et al., 19 Mar 2026).
The asymptotic result is particularly notable: if 26 is prime with
27
then the corresponding qubit QQR code has a choice of sign 28 such that
29
hence a nontrivial distillation threshold. By Dirichlet’s theorem, this yields infinitely many quantum quadratic residue codes that distill 30 states (Zurel et al., 19 Mar 2026).
The technical reason QR structure is useful here is not only distance. The distillation analysis is reduced to classical weight enumerators, and for the qubit case the 31-linearity of the classical QR input aligns with a transversal 32 Clifford. Invariant-theoretic reconstruction of extended QR weight enumerators then becomes a practical tool for analyzing distillation performance (Zurel et al., 19 Mar 2026).
6. Generalizations, terminology, and related directions
The QR paradigm extends beyond prime-length cyclic codes. Duadic group algebra codes are a generalization of quadratic residue codes, and they were shown to yield degenerate quantum stabilizer codes in which many errors of small weight do not need error correction [0701060]. More generally, 33-adic residue codes over
34
admit dual-containing criteria and an orthogonality-preserving Gray map; from dual-containing odd-like class-I 35-adic residue codes, one obtains quantum codes with parameters
36
where 37 and 38 is the Gray distance (Kuruz et al., 2018). Since quadratic residue codes correspond to 39, this places quantum QR constructions inside a broader residue-code hierarchy.
A second axis of generalization is ring lifting. Quadratic residue codes over 40 admit Gray maps preserving self-duality; in the case 41, the even-like QR codes are self-orthogonal and the extended QR codes are self-dual after extension, with Gray images such as a self-orthogonal nearly MDS 42 code over 43 and a self-dual 44 code over 45 (Goyal et al., 2016). Over 46, the decomposition
47
and a duality-preserving Gray map to 48 yield self-orthogonal QR codes 49, self-dual extended QR codes 50 for 51, and concrete self-dual 52-codes with parameters 53 and 54 (Gao et al., 2014). These are not quantum codes in themselves, but they supply classical self-orthogonal and dual-containing structures of the kind routinely used in stabilizer constructions.
A final source of ambiguity is terminological. “QQR code” may denote the classical quasi-quadratic residue code
55
which is a binary self-dual code of length 56 and dimension 57 for 58, with an extended code carrying an action of 59 and a weight polynomial divisible by 60 (Boston et al., 2017). In the quantum literature, however, “quantum quadratic residue code” refers either to the Hermitian one-logical-qudit family over 61 or, more loosely, to any stabilizer or CSS construction whose commutativity and distance properties are organized by quadratic residue sets (Zurel et al., 19 Mar 2026). The modern subject therefore combines a precise stabilizer definition with a wider algebraic design space shaped by residue/nonresidue arithmetic.