---
title: 'C2 Codes: Quantum, Classical & Geometric Insights'
url: https://www.emergentmind.com/topics/c2-codes
type: topic
---

# C2 Codes: Quantum, Classical & Geometric Insights

C2 codes refer to several distinct, highly structured families of codes that arise in classical and quantum information theory as well as combinatorial geometry. These include: (1) quantum hypergraph product codes constructed from the product of a cyclic code with itself; (2) quasi-cyclic codes of index 2 in classical coding theory; and (3) complex spherical two-distance sets—often called complex 2-codes—in geometric coding theory. Each context confers a precise algebraic, combinatorial, or geometric structure and offers unique optimality or performance properties relative to their domain.

## 1. Quantum Hypergraph Product Codes from Cyclic Codes: The “C2” Construction

C2 codes in the context of quantum error correction are quantum low-density parity-check (LDPC) codes formed as a hypergraph product (HGP) of a binary cyclic code with itself. Given a classical cyclic code $C$ of length $n$ and dimension $k$ with minimum distance $d_C$, its parity-check matrix $H$ is circulant, with each row being a cyclic shift of a generator vector of weight $w$. The hypergraph product quantum code is constructed via Calderbank-Shor-Steane (CSS) checks as:
\[
H_X = [H \otimes I_n \mid I_{n-k} \otimes H^{T}], \;\;\; H_Z = [I_n \otimes H \mid H^{T} \otimes I_{n-k}].
\]
This yields code parameters:
- Blocklength: $N = n^2 + (n-k)^2$
- Number of logical qubits: $K = k^2$
- Minimum distance: $d = d_C$ (when $d_{C^{T}} \geq d_C$, as is often achievable in cyclic families).

Notably, both $X$- and $Z$-type stabilizer generators are regular of weight $2w$, enforcing uniform low-weight checks. C2 codes systematically outperform prior HGPs (optimized with progressive edge growth, simulated annealing, RL, etc.): for example, the code $[[450, 32, 8]]$ (from $[15,7,8]$ cyclic) achieves per-round logical error rate $\approx 4.5 \times 10^{-7}$ at $p=10^{-3}$ with $\approx 14.1$ overhead, while $[[882,50,10]]$ attains $2 \times 10^{-8}$ with overhead $\approx 17.6$, significantly lower than surface or bivariate bicycle codes.

C2 codes are particularly suited for trapped ion (QCCD) architectures, supporting a planar cyclic layout that enables regular, constant-depth syndrome extraction: syndrome rounds proceed via cyclically shifting ancillae and enacting CNOT/CZ gates with aligned data, requiring depth $4w+2$ per round, independent of $n$.

## 2. Classification and Structure of Quasi-Cyclic Codes of Index 2 (“QC Index 2” Codes)

In classical coding theory, a quasi-cyclic code of index 2 and length $2m$ over $\mathbb{F}_q$ is defined as a code invariant under shift by $m$, or equivalently as an $R$-submodule of $R^2$ where $R = \mathbb{F}_q[x]/(x^m-1)$. Every such code $C$ has a unique characterization:
\[
C = \langle (g_{11}(x), g_{12}(x)),\; (0, g_{22}(x)) \rangle_R,
\]
where $g_{11}(x), g_{22}(x)$ divide $x^m-1$, and $\deg g_{12}(x) < \deg g_{22}(x)$, with $g_{11}g_{22}$ dividing $(x^m-1)g_{12}$. The dimension is $2m - \deg g_{11} - \deg g_{22}$. When $\gcd(q, m) = 1$, a one-generator criterion holds: $g_{11}g_{22} \equiv 0 \mod (x^m-1)$.

Duals with respect to the standard (Euclidean), symplectic, and Hermitian inner products are fully described. For instance, the Euclidean dual admits generators:
\[
C^{\perp_e} = \langle \left(\tfrac{x^m-1}{g_{11}}, 0\right),\, \left(-\tfrac{x^m-1}{g_{11}} g_{12}^{\circ}, \tfrac{x^m-1}{g_{22}} g_{22}^{\circ}\right) \rangle_R,
\]
where $f^{\circ}(x) = x^m f(x^{-1})$. Self-orthogonality and dual-containing properties have explicit algebraic conditions, and analogous statements hold under symplectic and Hermitian forms.

Minimum distance is bounded below by
\[
d(C) \ge \min\left\{ d(C_2),\; d(C_4),\; d(C_1) + d(C_3) \right\},
\]
where $C_1 = \langle g_{11} \rangle$, $C_2 = \langle g_{22} \rangle$, $C_3 = \langle \gcd(g_{12}, g_{22}) \rangle$, $C_4 = \langle \gcd(g_{11}g_{12}, g_{22}) \rangle$. This lower bound can be tight, as in explicit constructions over $\mathbb{F}_2$ for small $m$ (e.g., the unique $[6,3,3]$ code with $g_{11}(x)=x^2+x+1$, $g_{22}(x)=x-1$, $g_{12}(x)=1$) [2504.00568].

## 3. Complex Spherical 2-Codes (“C₂-codes”): Geometric Two-Distance Sets

In combinatorial geometry, a complex spherical 2-code is a finite subset $X$ of the unit sphere in $\mathbb{C}^d$ such that the angle set $A(X) = \{\langle x, y \rangle : x, y \in X, x\ne y\}$ has cardinality $2$, with the two values being nonreal (conjugate) complex numbers. The existence and tightness of such sets are governed by the structure of associated tournaments and certain matrix conditions:

- If $d$ is odd, the absolute bound is $|X| \leq 2d+1$, tightness if and only if the tournament on $X$ (given by “angle $\alpha$”) is doubly regular of order $2d+1$.
- If $d$ is even, $|X| \leq 2d$, with equality if and only if $I+A-A^{T}$ is a skew Hadamard matrix of order $2d$.

Explicit tight examples exist via skew-symmetric D-optimal designs (e.g., for $d=4$, Paley’s $8\times8$ skew Hadamard matrix yields a tight 2-code in $\mathbb{C}^4$).

The embedding dimension of the associated tournament into $\mathbb{C}^d$ is determined by the spectrum of its Seidel matrix $S = i(A - A^{T})$. Representation dimension minimization relies on eigenvalue multiplicities and the so-called main angle (overlap with the all-ones vector), establishing exact embedding parameters via analytic formulas based on spectral interlacing and rank-one perturbation theory [1503.01575].

## 4. Tables of Representative Parameters and Performance

For quantum C2 codes, codes identified via exhaustive search (for $n \leq 40$, $w \leq 5$) have the following representative parameters:

| Code [[N,K,d]]   | Classical C [n,k,$d_C$] | Weight $w$ | Overhead $N/K$ |
|------------------|-----------------------|------------|---------------|
| [[450, 32, 8]]   | [15, 7, 8]            | 3          | $\approx$14.1 |
| [[882, 98, 8]]   | [21, 7, 8]            | 4          | 9.0           |
| [[882, 50, 10]]  | [21, 5, 10]           | 3          | 17.6          |

Corresponding logical error rates (per qubit per round, depolarizing noise $p=10^{-3}$):

| Code                | Logical Error Rate   | Overhead   | Distance $d$  |
|---------------------|---------------------|------------|---------------|
| [[450, 32, 8]]      | $4.5 \times 10^{-7}$| 14.1       | 8             |
| [[882, 50, 10]]     | $2 \times 10^{-8}$  | 17.6       | 10            |
| Surface [[113,1,8]] | $3 \times 10^{-6}$  | 113        | 8             |

These C2 codes exhibit logical error rates up to three orders of magnitude better than previous LDPC and surface codes at significantly reduced physical overhead.

## 5. Trade-offs, Advantages, and Limitations

Key trade-offs for quantum C2 codes include:
- **Pros:** Constant-depth and fully parallel syndrome extraction; regular low-weight stabilizers; constant encoding rate in the asymptotic limit ($K/N = (k/n)^2$); minimum distance grows linearly with that of the constituent cyclic code.
- **Cons:** Block length $N$ scales quadratically with $n$, producing large code "patches" for high minimum distance; implementation of cyclic shifts may conflict with hardware connectivity, especially for large $n$ or generator weight $w$.

For quasi-cyclic codes of index 2, algebraic characterizations ensure tractable generator and dual structure, but the block size and generator constraints may limit certain rate-distance combinations. Tightness in complex spherical 2-codes is fully characterized and only realized for highly restricted combinatorial structures (doubly regular tournaments, skew Hadamard matrices), imposing severe constraints on dimensions and cardinalities.

## 6. Future Directions and Open Problems

Potential directions for advancing quantum C2 codes include exploring codes with increased generator weight $w$ to raise $d_C$, combining cyclic symmetry with graph-expansion methods such as progressive edge growth, and optimizing circuit schedules for simultaneous logical operations and ancilla shifts. Design of fault-tolerant logical gates (using lattice surgery or code-switching) and hardware-specific optimizations (for overlap between cyclic shifts and quantum gates) remain open for achieving further performance gains.

In classical quasi-cyclic codes of index 2, extension to higher index or composite-length settings, and exploitation of symplectic or Hermitian duality structures for cryptographic or post-quantum applications, remain active research streams.

The classification of tight and maximal complex spherical 2-codes is complete up to isomorphism; however, the construction of new families connected to previously unclassified combinatorial designs or the realization of such sets in physical quantum state deployments present plausible future investigations.

Source: https://www.emergentmind.com/topics/c2-codes