# Construction of a Family of Quantum Codes Using Sub-exceeding Functions via the Hypergraph Product and the Generalized Shor Construction

Luc Rabefihavanana, Harinaivo Andriatahiny, Ferdinand Randriamiarampanahy

► To cite this version:

Luc Rabefihavanana, Harinaivo Andriatahiny, Ferdinand Randriamiarampanahy. Construction of a Family of Quantum Codes Using Sub-exceeding Functions via the Hypergraph Product and the Generalized Shor Construction. 2026. hal-05533883v1

HAL Id: hal-05533883

https://hal.science/hal-05533883v1

Preprint submitted on 3 Mar 2026 (v1), last revised 4 Mar 2026 (v2)

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
# Construction of a Family of Quantum Codes Using Sub-exceeding Functions via the Hypergraph Product and the Generalized Shor Construction

Luc RABEFIHAVANANA

Harinaivo ANDRIATAHINY

RANDRIAMIARAMPANAHY Ferdinand

March 3, 2026

## Abstract

In this paper, we introduce a new family of stabilizer quantum LDPC codes derived from the classical linear codes $L_k$ and $L_k^+$, defined via sub-exceeding functions. In previous work, these codes demonstrated strong performance in minimum distance, decoding efficiency, and structural simplicity. By combining the hypergraph product framework with a generalized Shor construction, we obtain a scalable class of quantum codes with parameters $[[6k^2, k^2, d]]$. The resulting quantum codes exhibit a rich combinatorial structure and promising properties, particularly in terms of locality, low-density parity-check (LDPC) structure, and asymptotic behavior. The minimum distance satisfies $d = 3$ for $k = 3$ and $d = 4$ for $k \ge 4$, establishing a new framework for structured quantum LDPC code design and optimization.

**Keywords:** Quantum LDPC codes, Quantum Codes Using Sub-exceeding function, Hypergraph product codes, Stabilizer formalism.

**MSC 2020:** 81P70, 94B05, 68P30.

## 1 Introduction

Quantum codes are essential for error correction and for ensuring the reliability of quantum computing systems. While classical computing, particularly classical binary coding, has inherent limitations, the current technological landscape is undergoing a transition toward quantum computing, which, despite its own limitations, offers significantly faster execution capabilities.

In previous work, in the article entitled "Error correcting codes from sub-exceeding functions" by L. Rabefihavanana, H. Andriatahiny, and T. Rabeherimanana, published in Computer Science Journal of Moldova, vol.27, no.1(79), 2019, the authors introduced a classical codes $L_k$ and $L_k^+$ constructed from sub-exceeding functions. In this paper, we have a new linear error-correcting codes based on sub-exceeding functions, which are well-known combinatorial objects in permutation theory and enumerative combinatorics. The main idea of this work is to demonstrate that these functions can be exploited to construct systematic linear codes exhibiting strong properties in terms of minimum distance, algorithmic complexity, and decoding efficiency.

More precisely, for any integer $k \ge 3$, the binary linear code $L_k$ has parameters $[2k, k]$, with a minimum distance equal to 3 for $k = 3$ and 4 for $k \ge 4$. The code $L_k^+$ has parameters $[3k, k]$, and its minimum distance is equal to 5 for $k = 4$ and 6 for $k \ge 5$.

Now, this present work aims to extend these constructions to the quantum framework by proposing a family of quantum codes based on these two codes $L_k$ and $L_k^+$, using the hypergraph product method and the generalized Shor construction.
# 2 Presentation of the codes $L_k$ and $L_k^+$

## 2.1 Sub-exceeding functions

A sub-exceeding function is a mapping

$$f: \{1, 2, \dots, k\} \to \{0, 1, \dots, k-1\} \qquad (1)$$

such that

$$f(i) \le i - 1 \text{ for all } i \in \{1, \dots, k\}. \qquad (2)$$

These functions are in bijection with several classical combinatorial structures, notably Lehmer codes, permutations, and labeled trees. This combinatorial richness endows sub-exceeding functions with an algebraic structure that is particularly well suited for the construction of error-correcting codes.

The authors exploit this structure to define two families of binary linear codes, denoted $L_k$ and $L_k^+$, which exhibit interesting properties in terms of parameters and performance.

## 2.2 The linear code $L_k$

For any integer $k \ge 3$, the code $L_k$ ([16], [12]) is a binary systematic linear code with parameters $L_k: [2k, k, d]$, where the length is $2k$, the dimension is $k$, and the minimum distance satisfies $d(L_k) = 3$ for $k = 3$ and $d(L_k) = 4$ for $k \ge 4$.

Thus, this code is constructed from vectors associated with sub-exceeding functions, organized systematically in the form: $(c | f(c))$, where $c$ is an information word and $f(c)$ is a redundancy word derived from the corresponding sub-exceeding function.

As with any systematic code, its generator matrix can be written in block form as

$$G_{L_k} = [I_k | G_k], \qquad (3)$$

where $I_k$ is the identity matrix of order $k$ and $G_k$ is a binary $k \times k$ matrix such that

$$a_{ij} = \begin{cases} 1 & \text{if } i \neq j, \\ 0 & \text{otherwise.} \end{cases} \qquad (4)$$

Each row of $G_k$ corresponds to the redundancy vector $f(c)$ associated with the information of $c$. Consequently, the parity-check matrix ([16], [12]) of $L_k$ can be written in block form as:

$$H_{L_k} = [G_k | I_k]. \qquad (5)$$

## 2.3 The linear code $L_k^+$

For any integer $k \ge 4$, the code $L_k^+$ ([16], [12]) is a binary systematic linear code with parameters $L_k^+: [3k, k, d]$, where the minimum distance satisfies $d(L_k^+) = 6$ for $k = 4$ and $d(L_k^+) = 6$ for $k \ge 4$. Its generator matrix can be written in block form as:

$$G_{L_k^+} = [I_k | G_k | I_k], \qquad (6)$$

where $I_k$ is the identity matrix of order $k$ and $G_k$ is a binary $k \times k$ matrix defined in 4. Moreover, the parity-check matrix ([16], [12]) of $L_k^+$ can be written in block form as:

$$H_{L_k^+} = \begin{pmatrix} G_k & I_k & 0_k \\ I_k & 0_k & I_k \end{pmatrix}. \qquad (7)$$
## 2.4 Explicit examples for the two codes $L_k$ and $L_k^+$

For the code $L_k$, let us consider $k = 4$. We obtain:

$$ G_{\mathcal{L}_4} = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\ 0 & 1 & 0 & 0 & 1 & 0 & 1 & 1 \\ 0 & 0 & 1 & 0 & 1 & 1 & 0 & 1 \\ 0 & 0 & 0 & 1 & 1 & 1 & 1 & 0 \end{pmatrix} $$

and the codewords are:

$$ \mathcal{L}_4 = \begin{array}{c} \begin{array}{ccccccc} 00000000 & 00110011 & 01111000 \\ 00011110 & 01010101 & 10110100 \end{array} \\ \begin{array}{ccccccc} 00101101 & 01100110 & 11010010 \\ 01001011 & 10101010 & 11100001 \\ 10000111 & 11001100 & 11111111 \end{array} \end{array} $$

For the code $L_k^+$, let us consider the example $k = 5$. Thus,

$$ G_{\mathcal{L}_5^+} = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix} $$

Regarding the parity-check matrices:

- for $L_4$, we have:

$$ H_{\mathcal{L}_4} = \begin{pmatrix} 0 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 \\ 1 & 1 & 1 & 0 & 0 & 0 & 0 \end{pmatrix} $$

- for $L_4^+$, the parity-check matrix is

$$ H_{(\mathcal{L}_4^+)} = \begin{pmatrix} 0 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix} $$

# 3 Fundamentals and Structure of Stabilizer Codes

## 3.1 Some quantum notions

**Definition 1** (Hilbert space of a qubit [1], [2], [4], [6]). The Hilbert space of a qubit is defined as

$$ \mathcal{H} = \{\alpha|0\rangle + \beta|1\rangle \mid \alpha, \beta \in \mathbb{C}\}, \qquad (8) $$

where $|0\rangle$ and $|1\rangle$ form an orthonormal basis, that is,

$$ \langle 0|1\rangle = 0. $$

A qubit is a state $|\psi\rangle \in \mathcal{H}$ such that

$$ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle, \quad |\alpha|^2 + |\beta|^2 = 1. \qquad (9) $$
**Definition 2** (Tensor space of $n$ qubits [1], [4], [5],[6]). The Hilbert space of a register of $n$ qubits is defined by

$$ \mathcal{H}^{\otimes n} = \underbrace{\mathcal{H} \otimes \mathcal{H} \otimes \cdots \otimes \mathcal{H}}_{n} = \left\{ \sum_{x \in \{0,1\}^n} \alpha_x |x\rangle \mid \alpha_x \in \mathbb{C} \right\}. \quad (10) $$

An $n$-qubit register is a state $|\psi\rangle \in \mathcal{H}^{\otimes n}$ such that

$$ |\psi\rangle = \sum_{x \in \{0,1\}^n} \alpha_x |x\rangle, \quad \sum_{x \in \{0,1\}^n} |\alpha_x|^2 = 1. \quad (11) $$

**Definition 3** (Quantum code [4],[6], [9]). A quantum code with parameters $[[n,k]]$ is a subspace $C \subset \mathcal{H}^{\otimes n}$ of dimension $2^k$, used to encode $k$ logical qubits into $n$ physical qubits. The rate of the code is defined as $\frac{k}{n}$ and, more generally, as

$$ R = \frac{\log_2(\dim C)}{n}. \quad (12) $$

## 3.2 Pauli groups and stabilizer codes

**Definition 4.** Recall the Pauli matrices, which form an orthonormal basis of the space of $2 \times 2$ matrices:

$$ I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. \quad (13) $$

Elementary errors acting on a qubit are described by these Pauli operators. These matrices satisfy the following relations:

$$ \left\{ \begin{array}{l} X^2 = Y^2 = Z^2 = I, \\ XY = -YX = iZ, \\ YZ = -ZY = -iX, \\ ZX = -XZ = iY. \end{array} \right. \quad (14) $$

Two Pauli matrices $E_1$ and $E_2$ commute if $E_1 E_2 = E_2 E_1$ and anticommute if $E_1 E_2 = -E_2 E_1$. In particular, a Pauli matrix commutes with itself and with $I$, and anticommutes with the two other nontrivial Pauli matrices.

**Definition 5** (Pauli group for $n$ qubits [1],[4],[15],[17]). The $n$-qubit Pauli group is defined as

$$ \mathcal{P}_n = \{1, -1, i, -i\} \times \{I, X, Y, Z\}^{\otimes n}. \quad (15) $$

The Pauli group plays a fundamental role in the construction of $n$-qubit stabilizer codes.

**Definition 6** (Stabilizer group [3], [9], [11], [13]). A stabilizer group is a commutative subgroup $S$ of $\mathcal{P}_n$ that does not contain $-I$. The stabilizer code $C(S)$ associated with $S$ is the set of fixed points of $S$ in $\mathcal{H}^{\otimes n}$:

$$ C(S) = \{ |\psi\rangle \in \mathcal{H}^{\otimes n} \text{ such that } s|\psi\rangle = |\psi\rangle, \forall s \in S \}. \quad (16) $$

The integer $n$ is the length of the quantum code.

Assume that $S = \langle S_1, S_2, \dots, S_r \rangle$ is generated by $r$ generators $S_i \in \mathcal{P}_n$.

**Definition 7.** The stabilizer matrix of $C(S)$ is the matrix $H \in M_{r,n}(\{I, X, Y, Z\})$ whose $i$-th row represents the generator $S_i$. The entry $H_{i,j}$ is the $j$-th component of $S_i$.

A stabilizer code is completely specified by its stabilizer matrix, although several different matrices may define the same stabilizer group and the same code. This matrix can be viewed as the quantum analogue of the parity-check matrix of a classical code.
**Theorem 1** (Parameters of stabilizer codes [11], [13], [17]). A [[n, k, d]] quantum stabilizer code $C(S)$ is a subspace of $\mathcal{H}^{\otimes n}$ such that:

* $C(S)$ has dimension $2^k$ and possesses $r = n - k$ independent generators,

* The minimum distance $d$ is the minimum weight of a nontrivial undetectable error:

$$d = \min\{w(E) \mid E \in P_n \setminus S, \sigma(E) = 0\}, \qquad (17)$$

where $w(E)$ denotes the weight of $E$, i.e., the number of components different from the identity.

### 3.3 Symplectic product and construction of a stabilizer code from two classical binary codes

An element of $\mathcal{G}_n$ can be decomposed as $i^c M_1 \otimes M_2 \otimes \cdots \otimes M_n$, where each $M_j$ is a Pauli operator $I, X, Y$, or $Z$, and $c \in \{0, 1, 2, 3\}$. For $E \in \mathcal{G}_n$, we denote $i^c = \lambda$ and write

$$E = \lambda \bigotimes_{i=1}^{n} E(i). \qquad (18)$$

**Definition 8** (Symplectic representation [11], [17]). Let $g = i^c M_1 \otimes M_2 \otimes \cdots \otimes M_n$ be an element of $\mathcal{G}_n$. The symplectic representation is the mapping

$$\varphi: \begin{array}{c} \mathcal{G}_n \\ g \end{array} \longrightarrow \begin{array}{c} \mathbb{Z}_2^{2n} \\ (\alpha_1, \cdots, \alpha_n \mid \beta_1, \cdots, \beta_n) \end{array}$$

where for all $i \in \{1, \dots, n\}$,

$$\left\{ \begin{array}{ll} \alpha_i = 0 & \text{if } M_i \in \{I, Z\}, \\ \alpha_i = 1 & \text{if } M_i \in \{X, Y\}, \\ \beta_i = 0 & \text{if } M_i \in \{I, X\}, \\ \beta_i = 1 & \text{if } M_i \in \{Y, Z\}. \end{array} \right. \qquad (19)$$

**Example 1.** Consider the three Pauli operators defining the matrix $H$ of a quantum code acting on $n = 4$ qubits:

$$H = \begin{pmatrix} Z & Z & I & I \\ I & Z & Z & I \\ I & I & Z & Z \end{pmatrix}.$$

The three generators are $g_1 = Z \otimes Z \otimes I \otimes I$, $g_2 = I \otimes Z \otimes Z \otimes I$ and $g_3 = I \otimes I \otimes Z \otimes Z$. Their symplectic representations are

$$- \varphi(g_1) = (0, 0, 0, 0 \mid 1, 1, 0, 0),$$

$$- \varphi(g_2) = (0, 0, 0, 0 \mid 0, 1, 1, 0),$$

$$- \varphi(g_3) = (0, 0, 0, 0 \mid 0, 0, 1, 1).$$

The symplectic form of $H$ is therefore

$$H_{\text{symplectic}} = [H_X | H_Z] = \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} \begin{vmatrix} 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{vmatrix}.$$

**Definition 9.** Let $\{g_1, g_2, \dots, g_r\}$ be a set of $r$ independent generators of a stabilizer group $S$. We define the parity-check matrix $H$ of $S$ such that the $i$-th row of $H$ is $\varphi(g_i)$.

Then $H$ is a binary matrix of size $r \times 2n$, and we write

$$H = [H_X | H_Z], \qquad (20)$$

where $H_X$ and $H_Z$ are binary matrices of size $r \times n$.
Since the stabilizer group $\mathcal{S}$ is abelian, we have $gh = hg$ for all $g, h \in \mathcal{S}$. Using the homomorphism $\varphi$, this implies

$$ \varphi(g)\Lambda_{2n}\varphi(h)^T = 0, \quad \forall g, h \in \mathcal{S}, \qquad (21) $$

where

$$ \Lambda_{2n} = \begin{bmatrix} 0_{n \times n} & I_{n \times n} \\ I_{n \times n} & 0_{n \times n} \end{bmatrix}. $$

**Lemma 1** (Commutation condition [17]). *The parity-check matrix $H$ of a stabilizer group $\mathcal{S}$ must satisfy*

$$ H\Lambda_{2n}H^T = H_XH_Z^T + H_ZH_X^T = 0_{r \times r}, \qquad (22) $$

where $0_{i \times j}$ denotes the zero matrix of size $i \times j$.

Starting from two classical binary codes defined by their parity-check matrices, we can construct a quantum stabilizer code. The key condition is that the symplectic product between the two matrices must vanish, ensuring that the corresponding quantum generators commute. Using these matrices, one defines X-type and Z-type generators that form the stabilizer group of the quantum code.

## 3.4 Quantum code construction via the hypergraph product method

Let $C_1$ and $C_2$ be respectively two classical linear codes with parameters $[n_1, k_1, d_1]$ and $[n_2, k_2, d_2]$, and parity-check matrices $H_1$ and $H_2$. Define the matrices $H_X$ and $H_Z$ ([8], [15]) by

$$ H_X = (H_1 \otimes I_{n_2} \quad I_{r_1} \otimes H_2^T) \quad \text{and} \quad H_Z = (I_{n_1} \otimes H_2 \quad H_1^T \otimes I_{r_2}), \qquad (23) $$

where $I_i$ denotes the identity matrix of size $i \times i$, $\otimes$ is the tensor (Kronecker) product and $r_i$ is the integer such that $r_i = n_i - k_i$.

The parity-check matrix [8] of the resulting quantum code $\mathcal{Q}$ is defined by

$$ H = \begin{pmatrix} H_X & 0 \\ 0 & H_Z \end{pmatrix}. \qquad (24) $$

In this construction:

- $H_Z$ (Z-type checks) combines the parity constraints of $C_1$ expanded over $C_2$ (first block) with the parity constraints of $C_2$ replicated along the parity rows of $C_1$ (second block).

- $H_X$ (X-type checks) follows a similar construction using dual structures of the classical codes.

The parameters ([8], [15]) of the resulting quantum code $\mathcal{Q}$ are denoted by $[[n, k, d]]$ and given by

$$ [[n, k, d]] = [[n_1n_2 + r_1r_2, k_1k_2 + k_1^\perp k_2^\perp, \min(d_1, d_2, d_1^\perp, d_2^\perp)]]. \qquad (25) $$

- $n$ is the total number of qubits, given by $n = n_1n_2 + r_1r_2$,

- $k$ is the logical dimension (number of encoded logical qubits),

$$ k = k_1k_2 + k_1^\perp k_2^\perp, $$

- $d$ is the minimum distance of the resulting code, related to the distances of the initial codes by

$$ d = \min(d_1, d_2, d_1^\perp, d_2^\perp). $$
The hypergraph product construction satisfies the necessary CSS condition since the symplectic product vanishes ($H_X H_Z^T = 0$):

$$
\begin{align*}
H_X \cdot H_Z^T &= (H_1 \otimes I_{n_2} \quad I_{r_1} \otimes H_2^T) (I_{n_1} \otimes H_2 \quad H_1^T \otimes I_{r_2})^T \\
&= (H_1 \otimes I_{n_2} \quad I_{r_1} \otimes H_2^T) \begin{pmatrix} (I_{n_1} \otimes H_2)^T \\ (H_1^T \otimes I_{r_2})^T \end{pmatrix} \\
&= (H_1 \otimes I_{n_2})(I_{n_1} \otimes H_2)^T + (I_{r_1} \otimes H_2^T)(H_1^T \otimes I_{r_2})^T \\
&= (H_1 \otimes I_{n_2})(I_{n_1} \otimes H_2^T) + (I_{r_1} \otimes H_2^T)(H_1 \otimes I_{r_2})
\end{align*}
$$

Since $(A \otimes B)(C \otimes D) = AC \otimes BD$,

$$
\begin{align*}
H_X \cdot H_Z^T &= H_1 I_{n_1} \otimes I_{n_2} H_2^T + I_{r_1} H_1 \otimes H_2^T I_{r_2} \\
&= H_1 \otimes H_2^T + H_1 \otimes H_2^T \\
&= 0.
\end{align*}
$$

However, constructing a quantum LDPC code using this method may be delicate due to orthogonality constraints. Nevertheless, if both classical codes $C_1$ and $C_2$ are LDPC codes, a QLDPC construction can be achieved.

## 3.5 Generalized Shor construction method

The generalized Shor construction is similar to the hypergraph product construction. The main difference lies in the structure of the matrices $H_X$ and $H_Z$, defined as

$$ H_X = H_1 \otimes I_{n_2} \quad \text{and} \quad H_Z = G_1 \otimes H_2, \qquad (26) $$

where $G_1$ is the generator matrix of $C_1$. The resulting quantum code $\mathcal{Q}$ obtained from the classical linear codes $C_1$ and $C_2$ has parameters ([8], [15])

$$ [[n, k, d]] = [[n_1 n_2, k_1 k_2, \min(d_1, d_2)]]. \qquad (27) $$

This generalized Shor construction produces a CSS code associated with the pair $(C_X, C_Z)$ satisfying $C_X^\perp \subseteq C_Z$. This relation can be verified by computing

$$
\begin{align*}
H_X \cdot H_Z^T &= (H_1 \otimes I_{n_2})(G_1 \otimes H_2)^T \\
&= (H_1 \otimes I_{n_2})(G_1^T \otimes H_2^T) \\
&= (H_1 G_1^T) \otimes (I_{n_2} H_2^T).
\end{align*}
$$

Since $G_1$ and $H_1$ are respectively the generator and parity-check matrices of $C_1$, we have $H_1 G_1^T = 0$. Therefore,

$$ H_X \cdot H_Z^T = [0 \otimes (I_{n_2} H_2^T)] = 0. \qquad (28) $$

# 4 Quantum code obtained from the two codes $\mathcal{L}_k$ and $\mathcal{L}_k^+$

Consider two codes $\mathcal{L}_k$ and $\mathcal{L}_{k'}^+$ with respective parameters $[2k, k, d]$ and $[3k', k', d']$. Let $G_{\mathcal{L}_k}$ and $G_{\mathcal{L}_{k'}^+}$ denote their respective generator matrices defined as above. Using $G_{\mathcal{L}_k}$ and $G_{\mathcal{L}_{k'}^+}$, we can determine their corresponding parity-check matrices $H_{\mathcal{L}_k}$ and $H_{\mathcal{L}_{k'}^+}$.

- For $G_{\mathcal{L}_k}$, set $-A_{\mathcal{L}_k}^T = G_k$. The generator matrix then becomes $G_{\mathcal{L}_k} = (I_k - A_{\mathcal{L}_k}^T)$ of dimension $k \times 2k$. Thus, $H_{\mathcal{L}_k} = (A_{\mathcal{L}_k} \quad I_{2k-k}) = (A_{\mathcal{L}_k} \quad I_k)$, where $H_{\mathcal{L}_k}$ has dimension $k \times 2k$.

- For $G_{\mathcal{L}_{k'}^+}$, set $-A_{\mathcal{L}_{k'}^+}^T = (G_k \quad I_k)$6. The generator matrix becomes $G_{\mathcal{L}_{k'}^+} = (I_k - A_{\mathcal{L}_{k'}^+}^T)$ of dimension $k \times 3k$. Hence, $H_{\mathcal{L}_{k'}^+} = (A_{\mathcal{L}_{k'}^+} \quad I_{2k})$, where $H_{\mathcal{L}_{k'}^+}$ has dimension $2k \times 3k$.
We now apply construction via the hypergraph product 23 and the generalized Shor 26 method to build the quantum code derived from $\mathcal{L}_k$ and $\mathcal{L}_k^+$, which we denote respectively by $C_1$ and $C_2$.

$$H_X = H_{\mathcal{L}_k} \otimes I_{3k} = (A_{\mathcal{L}_k} \quad I_k) \otimes I_{3k} \qquad (29)$$

and

$$H_Z = G_{\mathcal{L}_k} \otimes H_{\mathcal{L}_k^+} = (I_k \quad -A_{\mathcal{L}_k}^T) \otimes (A_{\mathcal{L}_k^+} \quad I_{2k}). \qquad (30)$$

The parity-check matrix $H$ of the resulting CSS quantum code 24 is therefore

$$H = \begin{pmatrix} (A_{\mathcal{L}_k} \quad I_k) \otimes I_{3k} & 0 \\ 0 & (I_k \quad -A_{\mathcal{L}_k}^T) \otimes (A_{\mathcal{L}_k^+} \quad I_{2k}) \end{pmatrix}. \qquad (31)$$

The parameters (25, 27) of this quantum code are

$$[[n_1 n_2, k_1 k_2, \min(d_1, d_2)]] = [[6k^2, k^2, \min(d, d')]]. \qquad (32)$$

Collecting the results:

- For every positive integer $k$, the code $L_k$ has parameters $[2k, k]$. Its minimum distance is equal to 3 for $k = 3$ and 4 for $k \ge 4$.

- The code $L_k^+$ has parameters $[3k, k]$. Its minimum distance is equal to 5 for $k = 4$ and 6 for $k \ge 5$.

Therefore, for every positive integer $k$, we obtain a family of quantum codes $QL_k$ with parameters

$$Q\mathcal{L}_k = [[6k^2, k^2, d]], \qquad (33)$$

where the minimum distance of this quantum LDPC code equals 3 for $k = 3$ and 4 for $k \ge 4$.

## 4.1 Rich combinatorial structure

The present constructed family of quantum codes relies on a nontrivial interaction between two families of classical linear codes, namely $L_k$ and $L_k^+$, The orthogonality relations, the systematically organized parity-check matrices $H_X$ and $H_Z$, give rise to highly structured Tanner graphs. Such regularity not only facilitates the analysis of code parameters but also enables natural generalizations of the construction.

## 4.2 Minimum distance and error robustness

The minimum distance of the resulting quantum code family is directly inherited from the properties of the underlying classical codes. The fact that the distance is strictly greater than 2, and in particular reaches the value 4 for all $k \ge 4$, guarantees the ability to detect any low-weight error and to correct at least one arbitrary quantum error.

Although the distance remains bounded, this behavior is consistent with many known quantum LDPC constructions, where locality and efficient decodability are prioritized over rapidly growing distance. The stability of the distance for $k \ge 4$ nevertheless reflects a non-accidental structural robustness of the construction.

## 4.3 Asymptotic parameters and code rate

From an asymptotic perspective, the quantum code family has parameters $[6k^2, k^2, d]$, which implies a constant rate equal to 1/6 as $k \to \infty$. Achieving simultaneously a constant rate and an LDPC structure constitutes a notable result, given the strong commutation constraints imposed by stabilizer quantum codes.

This property places the construction within a restricted class of nonzero-rate quantum LDPC codes, making it a relevant candidate for large-scale quantum error-correction schemes.
# 5 Practical Examples

**Example 2.** In this example, we construct a quantum code from $\mathcal{L}_4$ and $\mathcal{L}_4^+$, which are classical codes with parameters [8, 4, 4] and [12, 4, 5], respectively.

For $\mathcal{L}_4$, we have $G_{\mathcal{L}_4} = (I_4 \quad G_4)$ where $G_4 = \begin{pmatrix} 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 \\ 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 \end{pmatrix}$. Consequently, the parity-check matrix is $H_{\mathcal{L}_4} = (G_4 \quad I_4)$, which has dimensions $4 \times 8$.

For $\mathcal{L}_4^+$, the generator matrix is initially $G_{\mathcal{L}_4^+} = (I_4 \quad G_4 \quad I_4)$. By setting $-A_{\mathcal{L}_4^+}^T = (G_4 \quad I_4)$, it can equivalently be written as $G_{\mathcal{L}_4^+} = (I_4 \quad -A_{\mathcal{L}_4^+}^T)$, and the corresponding parity-check matrix becomes $H_{\mathcal{L}_4^+} = (A_{\mathcal{L}_4^+} \quad I_8)$, with dimensions $8 \times 12$.

$$H_{\mathcal{L}_4^+} = \begin{pmatrix} 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 1 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix}.$$

We now apply the hypergraph product method and the generalized Shor construction to build the quantum code from $\mathcal{L}_4$ and $\mathcal{L}_4^+$, denoted $C_1$ and $C_2$ respectively.

The parity-check matrix $H$ of the resulting quantum code is defined, according to equation (23, 26), by

$$H = \begin{pmatrix} H_X & 0 \\ 0 & H_Z \end{pmatrix} = \begin{pmatrix} (A_{\mathcal{L}_4} \quad I_4) \otimes I_{12} & 0 \\ 0 & (I_4 \quad -A_{\mathcal{L}_4}^T) \otimes (A_{\mathcal{L}_4^+} \quad I_8) \end{pmatrix}.$$

The resulting quantum code has parameters:

$$\mathcal{QL}_4 = [[n_1 n_2, k_1 k_2, \min(d_1, d_2)]] = [[96, 16, 4]].$$

**Example 3.** In this second example, we construct a quantum code from $\mathcal{L}_5$ and $\mathcal{L}_5^+$, which are classical codes with parameters [10, 5, 4] and [15, 5, 6], respectively.

Now, we have $G_{\mathcal{L}_5} = (I_5 \quad G_5)$ where $G_5 = \begin{pmatrix} 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 0 \end{pmatrix}$. Consequently, the parity-check matrix is $H_{\mathcal{L}_5} = (G_5 \quad I_5)$, which has dimensions $5 \times 10$.

For $\mathcal{L}_5^+$, the generator matrix is initially $G_{\mathcal{L}_5^+} = (I_5 \quad G_5 \quad I_5)$. By setting $-A_{\mathcal{L}_5^+}^T = (G_5 \quad I_5)$, it can equivalently be written as $G_{\mathcal{L}_5^+} = (I_5 \quad -A_{\mathcal{L}_5^+}^T)$, and the corresponding parity-check matrix becomes $H_{\mathcal{L}_5^+} = (A_{\mathcal{L}_5^+} \quad I_{10})$, with dimensions $10 \times 15$.

The parity-check matrix $H$ of the resulting quantum code is defined, according to equation 23,
$$
\begin{align*}
H_X &= H_{\mathcal{L}_5} \otimes I_{15}, \\
H_Z &= G_{\mathcal{L}_5} \otimes H_{\mathcal{L}_5^+}, \\
H &= \begin{pmatrix}
H_X & 0 \\
0 & H_Z
\end{pmatrix} \\
&= \begin{pmatrix}
(A_{\mathcal{L}_5} \quad I_5) \otimes I_{15} & 0 \\
0 & (I_5 \quad -A_{\mathcal{L}_5}^T) \otimes (A_{\mathcal{L}_5^+} \quad I_{10})
\end{pmatrix}.
\end{align*}
$$

The resulting quantum code has parameters:

$$
\mathcal{QL}_5 = [[n_1 n_2, k_1 k_2, \min(d_1, d_2)]] = [[120, 25, 4]].
$$

6 Encoding and Decoding Procedures for the new quantum
code QLk

In this section, we provide a detailed description of the encoding and decoding procedures
associated with the new quantum codes constructed $\mathcal{QL}_k$. The goal is to establish an explicit
operational framework clarifying how logical information is embedded into the stabilizer subspace
and how error correction can be implemented efficiently.

6.1 CSS Encoding Structure

The quantum code $\mathcal{QL}_k$ arises from a CSS construction defined by two binary linear codes
through the stabilizer matrices

$$
H_X = H_{L_k} \otimes I_{3k}, \quad H_Z = G_{L_k} \otimes H_{L_k^+}.
$$

These matrices define respectively the X-type and Z-type stabilizer generators. The commuta-
tion condition $H_X H_Z^T = 0$ ensures that the resulting stabilizer group defines a valid quantum
CSS code.

6.2 Initialization of the Register

The encoding procedure begins with the preparation of an 6k²-qubit register:

- The first $k^2$ qubits contain the logical input state

$$
|\psi_L\rangle = \sum_{x \in \{0,1\}^{k^2}} \alpha_x |x\rangle.
$$

- The remaining $6k^2 - k^2$ qubits are initialized in the computational basis state $|0\rangle$ and serve as redundancy and parity qubits.

6.3 Quantum encoding of the newly constructed code

From the construction of the matrices $H_X$ and $H_Z$, defined as

$$
H_X = H_{L_k} \otimes I_{3k} \quad \text{and} \quad H_Z = G_{L_k} \otimes H_{L_k^+},
$$

we obtain two matrices of respective dimensions 3k² × 6k² and 2k² × 6k².
For the matrix $H_Z$, it is straightforward to verify that the number of phase-flip operators (Pauli Z) appearing in each stabilizer generator is even. Consequently, the corresponding encoding procedure and the associated quantum circuit do not present any particular difficulty.

However, a more detailed analysis is required for the encoding of the generators associated with the matrix $H_X$.

In $H_X$, for all indices $i$ and $j$ such that $1 \le i \le 3k^2$ and $1 \le j \le 6k^2$, we have:

1. If $i \le 3k$, then $H_X[i, j] = 1$ except at the following $k$ positions:

i. when $j = m(3k) + i$ for all $m \in [1, k-1]$ such that $m(3k) + i \le 3k^2$,

ii. and when $j = 3k^2 + i$.

2. If $i \ge 3k$, then $H_X[i, j] = 1$ except at the following $k$ positions:

i. when $i = m(3k) + j$ for all $m \in [1, k-1]$ such that $m(3k) + j \le 3k^2$,

ii. when $j = m(3k) + i$ for all $m \in [1, k-1]$ such that $m(3k) + i \le 3k^2$,

iii. and when $j = 3k^2 + i$.

**Example 4.** Let us consider the case $k = 4$. We obtain:

1. If $i \le 12$, then $H_X[i, j] = 1$ except at the positions

i. $j = 12 + i$, $24 + i$, $36 + i$,

ii. and $j = 48 + i$.

2. If $i \ge 12$, then $H_X[i, j] = 1$ except at

i. the positions satisfying $i = j + 12$, $i = j + 24$, $i = j + 36$,

ii. the positions $j = 12 + i$, $24 + i$, $36 + i$ whenever these indices are less than or equal to 48,

iii. and $j = 48 + i$.

Hence, the first two generators of the quantum code $\mathcal{QL}_4 = [[96, 16, 4]]$, obtained for $k = 4$, are given by

$$g_1 = \begin{cases} I & \text{on all positions except} \\ X & \text{at positions } j = 13, 25, 37, 49, \end{cases}$$

$$g_2 = \begin{cases} I & \text{on all positions except} \\ X & \text{at positions } j = 14, 26, 38, 50. \end{cases}$$

The thirteenth generator is similarly given by

$$g_{13} = \begin{cases} I & \text{on all positions except} \\ X & \text{at positions } j = 1, 25, 37, 61. \end{cases}$$

*Remarque 1.* We observe that, for the new quantum code $\mathcal{QL}_k$, each X-type generator contains exactly $k$ bit-flip operations within its support. Consequently, the matrix $H_X$ takes the following structural form:
$$
H_X =
\begin{bmatrix}
I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I \\
\vdots & & I & & X & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & \vdots \\
\vdots & & \cdots & & \cdots & \cdots & & \cdots & \cdots & \cdots & & \cdots & \cdots & & \vdots \\
I & \cdots & \cdots & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I & X & I \\
X & I & \cdots & \cdots & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & \cdots & I \\
I & X & I & \cdots & \cdots & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I \\
\vdots & & \cdots & & \cdots & & & \cdots & & \cdots & & \cdots & & \cdots & & \vdots \\
I & \cdots & I & X & I & \cdots & I & \cdots & I & X & I & \cdots & I & X & I & I \\
X & I & \cdots & I & X & I & \cdots & I & \cdots & I & X & I & \cdots & I & I \\
I & X & I & \cdots & I & X & I & \cdots & I & \cdots & I & X & I & \cdots & I \\
\vdots & & \cdots & & \cdots & & & \cdots & & \cdots & & \cdots & & \cdots & & \vdots \\
I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I & \cdots & I & X & I & I \\
X & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I & \cdots & I & X & I \\
I & X & I & \cdots & I & X & I & \cdots & I & X & I & \cdots & I & \cdots & I & X \\
\vdots & & \cdots & & \cdots & & & \cdots & & \cdots & & \cdots & & \cdots & & \vdots
\end{bmatrix}
I_{3k^2}(X)
$$

where the matrix $I_{3k^2}(X)$ is defined by

$$
I_{i,j}(X) = \begin{cases} I & \text{if } i \neq j, \\ X & \text{if } i = j. \end{cases}
$$

6.4 Quantum encoding circuit

For the encoding of the new quantum code $\mathcal{QL}_k$, the input register has length $k^2$ qubits, while the output register contains $6k^2$ qubits. Therefore, $5k^2$ ancilla qubits initialized in the state $|0\rangle$ are required.

The encoding circuit corresponding to the elements of $H_X$ is constructed as follows:

1. For every circuit row such that $i \le 3k$:

- The root qubit is chosen as the $(3k + i)$-th qubit, denoted $q_{3k+i}$.

- A Hadamard gate $H$ is applied to $q_{3k+i}$ to generate a superposition.

- A sequence of CNOT gates controlled by $q_{3k+i}$ is then applied:

CNOT($3k + i \rightarrow 2 \times (3k) + i$),

CNOT($3k + i \rightarrow 3 \times (3k) + i$),

$\vdots$

CNOT($3k + i \rightarrow (k - 1) \times (3k) + i$),

and finally

CNOT($3k + i \rightarrow 3k^2 + i$).

2. For every circuit row such that $i \ge 3k$:

- The root qubit is chosen as the $(i - 3k)$-th qubit, denoted $q_{i-3k}$.

- A Hadamard gate is applied to $q_{i-3k}$.

- Controlled CNOT gates are then applied:

CNOT($i - 3k \rightarrow 2 \times (3k) + i$),

CNOT($i - 3k \rightarrow 3 \times (3k) + i$),
$$ \begin{array}{l} \vdots \\ \text{CNOT}(i - 3k \rightarrow m \times (3k) + i) \text{ with } m \times (3k) + i \le 3k^2, \\ \text{and finally} \\ \text{CNOT}(i - 3k \rightarrow 3k^2 + i). \end{array} $$

*Remarque 2.* As in any quantum encoding scheme, if the root qubit is initialized in the state $|1\rangle$, an X gate is applied prior to the Hadamard gate.

## 6.5 Simplified Decoding Procedure

Thanks to the highly regular structure of the quantum encoding for the code $QL_k$, the decoding process can be significantly simplified.

Each X-type stabilizer acts on exactly $k$ qubits within its support, while the Z-type stabilizers of $H_Z$ exhibit even parity across each generator. This structure allows for a CSS-type decoding to be implemented in two sequential stages:

- Phase-flip error correction: Z-type errors can be efficiently detected and corrected using the X-type stabilizers derived from $H_X$.

- Bit-flip error correction (X-errors): X-type errors can be detected and corrected via the Z-type stabilizers from $H_Z$.

Furthermore, the repetitive architecture of the encoding circuit enables local block-wise correction. Specifically, each root qubit together with its associated $k$ target qubits forms a block where syndromes can be measured and corrected in parallel. This block-based structure substantially reduces both the number of measurements and the required quantum operations during decoding, thereby enhancing the overall efficiency of the procedure.

## 7 Conclusion

We have introduced a novel family of quantum codes constructed from two families of classical linear codes, $L_k$ and $L_k^+$. The resulting CSS construction defines stabilizer codes with parameters

$$QL_k = [[6k^2, k^2, d]],$$

with a minimum distance $d = 4$ for $k \ge 4$. The code size grows quadratically with $k$ while maintaining a constant rate of 1/6, providing a favorable trade-off between the number of logical qubits and physical qubits.

This family is distinguished by its rich combinatorial structure, inherited from the incidence and orthogonality relations of the underlying classical codes. The stabilizer matrices are sparse, endowing the codes with an LDPC character and strong locality, where each qubit participates in a bounded number of stabilizers. This combinatorial regularity facilitates theoretical analysis, the design of efficient decoding algorithms, and implementation on realistic quantum architectures.

These results open multiple perspectives: improving the minimum distance while preserving LDPC structure and a constant rate, generalizing the construction to multiple or asymmetric products of classical codes, and developing new decoding algorithms that leverage the combinatorial regularity. Exploration of these directions could lead to more robust quantum codes suitable for large-scale applications.

**Acknowledgments.** The author thanks colleagues and collaborators for valuable discussions and feedback that contributed to this work.
References

[1] Alain Tapp. *Informatique Quantique : Algorithmes et Complexité de la Communication*. Thèse de doctorat, Université de Montréal, 1999.

[2] András Gilyén, Srinivasan Arunachalam et Nathan Wiebe. "Optimizing quantum optimization algorithms via faster quantum gradient computation". In: *Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms*, 2019, p. 1425-1444.

[3] Andrew M. Steane. "Enlargement of Calderbank Shor Steane quantum codes", 1998. eprint: quant-ph/9802061.

[4] Andrew M. Steane. "Simple quantum error-correcting codes". In: *Physical Review A* 54.6 (1996), p. 4741-4751. doi: 10.1103/physreva.54.4741.

[5] Anne-Céline Baboin. *Calcul quantique : Algèbre et géométrie projective*. Thèse de doctorat, Université de Franche-Comté, 2011.

[6] Arnaud Bodin. *Quantum : un peu de mathématiques pour l'informatique quantique*, avril 2024.

[7] A. G. Aruna, K. H. Vani et R. S. Meena. "A study on reversible logic gates of quantum computing". In: *Int. J. Computer Sci. Information Technol* 7 (2016), p. 427-432.

[8] Asit Kumar Pradhan et al. "Linear Time Iterative Decoders for Hypergraph-Product and Lifted-Product Codes", 2025. eprint: 2504.01728. https://arxiv.org/abs/2504.01728.

[9] A. R. Calderbank et al. "Quantum Error Correction via Codes over GF(4)". 1997. eprint: quant-ph/9608006. https://arxiv.org/abs/quant-ph/9608006.

[10] Cedric Richard. *Théorie et codage de l'information, Les codes linéaires*, 2025. https://www.cedric-richard.fr/assets/files/transparent-c6-1.pdf.

[11] Ching-Yi Lai et Chung-Chin Lu. "A Construction of Quantum Stabilizer Codes Based on Syndrome Assignment by Classical Parity-Check Matrices". In: *IEEE Transactions on Information Theory* 57.10 (2011), p. 7163-7179.

[12] Fanomezana Zanahary Tsaratanisoa et Luc Rabefihavanana. *Construction de nouveaux codes correcteurs d'erreurs via les fonctions sous-excédantes*. Thèse de doctorat, Université d'Antananarivo, 30 déc. 2019.

[13] Gérard Cohen, Sylvia Encheva et Simon Litsyn. "On binary constructions of quantum codes". 1998. eprint: quant-ph/9812065.

[14] Issam Andaloussia. *Optimisation des critères de performances des circuits réversibles quantiques de l'unité Arithmétique et Logique (UAL)*. Thèse de doctorat, Faculté des Sciences, 14 oct. 2022.

[15] Jean-Pierre Tillich. *Une introduction aux codes correcteurs quantiques*, 2008. https://www.math.u-bordeaux.fr/~gzemor/Tillich.pdf.

[16] L. Rabefihavanana, H. Andriatahiny et T. Rabeherimanana. "Error correcting codes from sub-exceeding functions". In: *Computer Science Journal of Moldova*, vol. 27, no. 1(79), 2019.

[17] Nicolas Delfosse. *Constructions et performances de codes LDPC quantiques*. Thèse de doctorat, Université Bordeaux 1, décembre 2012.
Luc RABEFIHAVANANA

ORCID: https://orcid.org/0009-0000-4977-8380

Departement of Mathematics and computer science

University of Antananarivo-Madagascar

E-mail: lucrabefihavanana@gmail.com

Harinaivo ANDRIATAHINY

Departement of Mathematics and computer science

University of Antananarivo-Madagascar

E-mail: hariandriatahiny@gmail.com

Ferdinand RANDRIAMIARAMPANAHY

Departement of Mathematics and computer science

University of Antananarivo-Madagascar

E-mail: randriamiferdinand@gmail.com