# Classical product code constructions for quantum Calderbank-Shor-Steane
codes

Dimiter Ostrev  Davide Orsucci  Francisco Lázaro  Balazs Matuz

( German Aerospace Center (DLR), Institute of Communications and Navigation,
Münchener Str. 20, 82234 Weßling, Germany
)

###### Abstract

Several notions of code products are known in quantum error correction, such
as hyper-graph products, homological products, lifted products, balanced
products, to name a few. In this paper we introduce a new product code
construction which is a natural generalisation of classical product codes to
quantum codes: starting from a set of component Calderbank-Shor-Steane (CSS)
codes, a larger CSS code is obtained where both $X$ parity checks and $Z$
parity checks are associated to classical product codes. We deduce several
properties of product CSS codes from the properties of the component codes,
including bounds on the code distance, and show that built-in redundancies in
the parity checks result in so-called meta-checks which can be exploited to
correct syndrome read-out errors. We then specialise to the case of single-
parity-check (SPC) product codes which in the classical domain are a common
choice for constructing product codes. Logical error rate simulations of a SPC
$3$-fold product CSS code having parameters $[[512,174,8]]$ are shown under
both a maximum likelihood decoder for the erasure channel and belief
propagation decoding for depolarising noise. We compare the results with other
codes of comparable block length and rate, including a code from the family of
asymptotically good quantum Tanner codes. We observe that our reference
product CSS code outperforms all other examined codes.

##  1 Introduction

Product code constructions yield families of error correction codes with good
properties, both in the classical and in the quantum domain. In classical
error correction, product codes were historically one of the first efficient
coding constructions [1]. The product code construction allows to obtain
powerful codes from two (or more) weaker component codes. For the case of two
component codes, the code words can be represented as a rectangular array
whose columns are code words of one code and rows are code words of the other,
see Figure 1. A further construction, tensor product codes, was originally
introduced in [2] with applications e.g., for channels with burst errors. The
code’s parity-check matrix (PCM) is obtained by taking the tensor product of
PCMs of two codes. Tensor product codes were further generalized in [3] and
extended to the construction of quantum error correcting codes in [4].

In general, classical code constructions cannot be directly applied in the
quantum domain, since the commutativity of all stabiliser generators has to be
enforced [5], which imposes additional constraints on the code structure. The
first notion of quantum product codes introduced has been that of hyper-graph
product [6], which gave the first family of quantum low-density parity-check
(LDPC) codes having constant rate and minimum distance scaling as the square
root of the block length. Later, it was realised that the hyper-graph product
can be seen as a special case of the homological product of chain complexes
[7], which can be leveraged, e.g., to construct quantum error correcting codes
exhibiting single-shot error correction properties [8]. Asymptotically
superior codes have been built using so-called lifted products [9] and
balanced products [10] constructions. These techniques have culminated in the
seminal result of constructing the first known families of asymptotically good
quantum LDPC codes, i.e. having constant stabiliser weight, constant rate, and
linearly growing minimum distance [11]. See also [12] for more details on
quantum product code constructions.

These quantum product techniques are in spirit and in implementation very
different from classical product codes. In contrast, Hivadi proposed in [13] a
pattern for constructing quantum Calderbank-Shor-Steane (CSS) codes [14, 15]
that is directly inspired by the classical product construction. The idea is
to find a PCM of a linear code and a permutation matrix $\pi$ such that the
$X$ and $Z$ PCM of the quantum CSS code is given by $H$ and
$H\pi^{\\!\mathsf{T}}$, respectively, and commutativity is enforced by
requiring that $H\pi H^{\\!\mathsf{T}}=0$. A suitable permutation $\pi$ was
derived in [13] for the $2$-fold product of $[4s,{4s-1}]$ single parity check
(SPC) codes for any $s\in\mathbb{N}$.

This work greatly generalizes the construction given in [13]. We show that the
construction does not apply uniquely to SPC codes, but actually to any family
of codes which can be seen as tensor products of other codes. Equipped with
this interpretation, we extend the construction to the $D$-fold product of
codes, which allows us to construct codes of arbitrarily large distances.
Furthermore, we show that it is also possible to construct codes having
different $X$ and $Z$ PCMs, which can yields codes having asymmetric
protection against $X$ and $Z$ errors and which might be appealing for certain
error models. We show that our codes come with so-called meta-checks naturally
embedded in their structure which is beneficial in case of erroneous syndrome
measurements. Finally, we numerically evaluate the performance of these codes
using the maximum likelihood decoder on the quantum erasure channel and a
quaternary belief propagation (BP) decoder on the depolarising channel. The
computer simulations show that a $[[512,174,8]]$ code from our construction
outperforms codes with similar block length and rate from other well-known
families.

The paper is organized as follows. Section 2 introduces required notation and
preliminary information, followed by a description of the new code
constructions in 3. A comparison with other codes from the literature is
presented in Section 4, while the resilience with respect to syndrome errors
is discussed in Section 5 before concluding the paper in Section 6.

##  2 Preliminaries and notation

###  2.1 Classical codes

Let $\mathbb{F}_{2}$ denote the field with two elements and
$\mathbb{F}_{2}^{n}$ denote the vector space over $\mathbb{F}_{2}$ of column
vectors with $n$ components, i.e., the set of bit strings of length $n$.
Extending the notation further, let $\mathbb{F}_{2}^{m\times n}$ denote the
space of matrices having $m$ rows and $n$ columns with elements from
$\mathbb{F}_{2}$.

Let $\mathcal{C}\subseteq\mathbb{F}_{2}^{n}$ be a linear vector space which we
interpret as the set of all valid code words. We say that $\mathcal{C}$ is a
(binary linear) code. If the $\mathbb{F}_{2}$-linear dimension of
$\mathcal{C}$ is $k$ (there are $2^{k}$ total code words) we say that
$\mathcal{C}$ encodes $k$ bits in $n$ bits, where $n$ is the length of the
code, $k$ is the dimension of the code and $R=k/n\leq 1$ is the rate of the
code. The distance $d$ of a code $\mathcal{C}$ is the minimum Hamming distance
between any pair of distinct code words and, since $\mathcal{C}$ is linear, we
also have $d=\min_{w\in\mathcal{C}\setminus\\{0\\}}|w|$, where $|\cdot|$
denotes the Hamming weight. We summarise the parameters of a classical code
$\mathcal{C}$ with an ordered triple $[n,k,d]$ giving the length, dimension,
and minimum distance of the code. Sometimes we omit the code minimum distance
and write only $[n,k]$.

A linear code can be defined as the kernel of a PCM
$H\in\mathbb{F}_{2}^{m\times n}$, i.e.,
$\mathcal{C}=\\{w\in\mathbb{F}_{2}^{n}:Hw=0\\}$. For a bit string
$y\in\mathbb{F}_{2}^{n}$ we call $e=Hy$ the syndrome associated to $y$. A code
can be also specified by a generator matrix $G\in\mathbb{F}_{2}^{n\times k}$
so that the code space is given by the $\mathbb{F}_{2}$-linear combination of
the columns of $G$, that is $\mathcal{C}=Im(G)$, and the equation $HG=0$
holds. A PCM $H$ may have linearly dependent rows, thus
$r=\operatorname{rank}(H)\leq m$ and the code dimension is given as $k=n-r\geq
n-m$. Product code constructions typically result in a certain number
$\overline{m}=m-r$ of linearly dependent (i.e., redundant) checks, which we
call meta-checks. Product code constructions can result in the introduction of
new meta-checks, besides the ones that may be already present in the
components codes.

Given $H$ we denote $w_{c}$ ($w_{r}$) the maximum Hamming weight of any given
column (row) of $H$. We say that a family of PCMs is sparse when $w_{c}$ and
$w_{r}$ are upper bounded by a constant or by a slowly growing function of the
code size.

###  2.2 Classical product codes ($\mathcal{C}_{\times}$)

$b_{1}$$b_{10}$$b_{19}$$b_{28}$$b_{37}$$b_{46}$$b_{2}$$b_{11}$$b_{20}$$b_{29}$$b_{38}$$b_{47}$$b_{3}$$b_{12}$$b_{21}$$b_{30}$$b_{39}$$b_{48}$$b_{4}$$b_{13}$$b_{22}$$b_{31}$$b_{40}$$b_{49}$$b_{5}$$b_{14}$$b_{23}$$b_{32}$$b_{41}$$b_{50}$$b_{6}$$b_{15}$$b_{24}$$b_{33}$$b_{42}$$b_{51}$$b_{7}$$b_{16}$$b_{25}$$b_{34}$$b_{43}$$b_{52}$$b_{8}$$b_{17}$$b_{26}$$b_{35}$$b_{44}$$b_{53}$$b_{9}$$b_{18}$$b_{27}$$b_{36}$$b_{45}$$b_{54}$$k_{1}=6$$m_{1}=3$$k_{2}=4$$m_{2}=2$

Figure 1: Array representation of the $54$ bits of a code given by the product
of a $[9,6]$ and of a $[6,4]$ systematic code. The final rate is
$R=(6/9)(4/6)=4/9$. The bits on white cells correspond to message bits, bits
on hatched cells corresponds to parity-check bits, bits on doubly-hatched
cells to checks-of-checks or meta-checks.

Consider two classical codes $\mathcal{C}_{1}\subseteq\mathbb{F}_{2}^{n_{1}}$
and $\mathcal{C}_{2}\subseteq\mathbb{F}_{2}^{n_{2}}$ having associated PCMs
$H_{1}\in\mathbb{F}_{2}^{m_{1}\times n_{1}}$ and
$H_{2}\in\mathbb{F}_{2}^{m_{2}\times n_{2}}$. The corresponding $2$-fold
product code $\mathcal{C}_{\times}$ is defined [1] as the code associated to
the following PCM $H_{\times}$,

$\displaystyle H_{\times}:=\begin{pmatrix}H_{1}&\otimes&I\\\
I&\otimes&H_{2}\end{pmatrix}\quad\in\
\mathbb{F}_{2}^{\,(n_{1}m_{2}+m_{1}n_{2})\times n_{1}n_{2}}.$ (1)

Above, $I$ denotes identity matrices of appropriate dimensions, i.e., of
dimension $n_{2}$ in the top block and $n_{1}$ in the bottom block, and
$\otimes$ the tensor or Kronecker product. The resulting product code space
$\mathcal{C}_{\times}$ is given by the tensor product of the component codes,
i.e.,

$\displaystyle\mathcal{C}_{\times}=\mathcal{C}_{1}\otimes\mathcal{C}_{2}\subseteq\
\mathbb{F}_{2}^{n_{1}}\otimes\mathbb{F}_{2}^{n_{2}}.$ (2)

The code dimension is $k_{\times}=k_{1}k_{2}$, the maximum weight by row and
columns can be directly deduced from (1), while the code minimum distance is
given by $d_{\times}=d_{1}d_{2}$ (see Appendix A for a proof of the minimum
distance). We refer to [16, Chapter 5.7] for further details on product codes.

######  Remark.

A $2$-fold product code is visualized in Figure 1. The $n_{\times}=n_{1}n_{2}$
bits are placed in a $2$-dimensional array having $n_{1}$ columns and $n_{2}$
rows. Errors in the product code word can be detected by measuring the
syndromes. For each row one can apply the PCM $H_{1}$ in order to extract the
associated syndrome, which is equivalent to applying a PCM given by
$H_{1}\otimes I$ to all the $n$ bits. Similarly, for each column one can apply
the PCM $H_{2}$ to extract the associated syndrome. For systematic codes (or
more precisely systematic encoders), the code words $w\in\mathbb{F}_{2}^{n}$
are given by the concatenation of the message $x\in\mathbb{F}_{2}^{k}$ and a
set of parity-check bits $c\in\mathbb{F}_{2}^{n-k}$, i.e., $w=(x,c)$. In the
corresponding product code, errors are detecting by checking whether the last
$m_{1}=n_{1}-k_{1}$ bits of a row are valid linear combinations of the message
bits. The same holds for the last $m_{2}=n_{2}-k_{2}$ bits in each column.
There are $m_{1}m_{2}$ bits that can be interpreted as checks-of-checks or
meta-checks (see Figure 1). Meta-checks can be useful in quantum error
correcting codes as discussed in Section 5.

The properties of $2$-fold product codes are summarised in the table below,
where the subscripts $1$ and $2$ refer to properties of $\mathcal{C}_{1}$ and
of $\mathcal{C}_{2}$, respectively.

Properties of $\mathcal{C}_{\times}$
---
length | $n_{\times}$ | = $n_{1}n_{2}$
checks | $m_{\times}$ | = $n_{1}m_{2}+m_{1}n_{2}$
meta-checks | $\overline{m}_{\times}$ | = $(m_{1}-r_{1})n_{2}+n_{1}(m_{2}-r_{2})+r_{1}r_{2}$
dimension | $k_{\times}$ | = $k_{1}k_{2}$
distance | $d_{\times}$ | = $d_{1}d_{2}$
row weight | $w_{\times,r}$ | = $\max(w_{1,r},w_{2,r})$
column weight | $w_{\times,c}$ | = $w_{1,c}+w_{2,c}$

###  2.3 Classical binary tensor product codes ($\mathcal{C}_{\otimes}$)

Let $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ be codes having associated PCMs
$H_{1}\in\mathbb{F}_{2}^{m_{1}\times n_{1}}$ and
$H_{2}\in\mathbb{F}_{2}^{m_{2}\times n_{2}}$. The associated tensor product
code $\mathcal{C}_{\otimes}$ is defined [2] as the code originating from the
PCM

$\displaystyle H_{\otimes}:=H_{1}\otimes H_{2}\quad\in\
\mathbb{F}_{2}^{m_{1}\times n_{1}}\otimes\mathbb{F}_{2}^{m_{2}\times
n_{2}}\cong\mathbb{F}_{2}^{m_{1}m_{2}\times n_{1}n_{2}}.$ (3)

Note that a tensor product code is not the tensor product of the component
codes: we would obtain this result instead by taking the tensor product of the
generator matrices of the codes. Using the fact that a code $\mathcal{C}$ and
its dual $\mathcal{C}^{\perp}:=\\{w\in\mathbb{F}_{2}^{n}\ |\ \langle
v,w\rangle=0,\ \forall v\in\mathcal{C}\\}$ (where $\langle\cdot,\cdot\rangle$
denotes the $\mathbb{F}_{2}$ inner product) are obtained from one another by
interchanging the roles of the parity check and of the generator matrix, we
obtain

$\displaystyle\mathcal{C}_{\otimes}:=(\mathcal{C}_{1}^{\perp}\otimes\mathcal{C}_{2}^{\perp})^{\perp}\quad\subseteq\
\mathbb{F}_{2}^{n_{1}}\otimes\mathbb{F}_{2}^{n_{2}}\cong\mathbb{F}_{2}^{n_{1}n_{2}}.$
(4)

From the defining properties of the tensor product it follows that
$r_{\otimes}=\operatorname{rank}(H_{\otimes})$ is equal to
$r_{1}r_{2}=\operatorname{rank}(H_{1})\operatorname{rank}(H_{2})$, hence the
dimension of the code is
$k_{\otimes}=n_{1}n_{2}-r_{1}r_{2}=k_{1}n_{2}+n_{1}k_{2}-k_{1}k_{2}$.
Moreover, one can immediately verify that the row and column weights of
$H_{\otimes}$ are simply given by the product of the individual row and column
weights of the component codes. Tensor product codes do not have meta-checks,
unless some are already present in the component codes. Finally, the distance
of the code is $d_{\otimes}=\min(d_{1},d_{2})$ which is discussed in Appendix
A for completeness. See [17] for a short introduction to the topic and the
extension to non-binary component codes.

In summary, tensor product constructions allow to create codes having higher
rates than the component codes, at the cost of increasing the PCM weights and
no improvement in the code distance. The properties of the tensor product code
are summarised in the table below.

Properties of $\mathcal{C}_{\otimes}$
---
length | $n_{\otimes}$ | $=n_{1}n_{2}$
checks | $m_{\otimes}$ | $=m_{1}m_{2}$
meta-checks | $\overline{m}_{\otimes}$ | $=m_{1}m_{2}-r_{1}r_{2}$
dimension | $k_{\otimes}$ | $=n_{1}n_{2}-r_{1}r_{2}$
distance | $d_{\otimes}$ | $=\min(d_{1},d_{2})$
row weight | $w_{\otimes,r}$ | $=w_{1,r}w_{2,r}$
column weight | $w_{\otimes,c}$ | $=w_{1,c}w_{2,c}$

###  2.4 Quantum CSS codes

Let $\mathbb{C}(\mathbb{F}_{2}^{n})\cong\mathbb{C}^{2^{n}}$ be the complex
Hilbert space associated to the space of $n$ qubits, equipped with an
orthonormal basis. Each of the $2^{n}$ basis vectors is indexed by an element
of $\mathbb{F}_{2}^{n}$. The Pauli operators are $\mathcal{P}=\\{I,X,Y,Z\\}$
(with $Y=iXZ$) and the $n$-qubit Pauli group $\mathcal{P}_{n}$ acting on
$\mathbb{C}(\mathbb{F}_{2}^{n})$ is obtained by taking tensor products of $n$
Pauli operators, together with a global phase $\alpha\in\\{\pm 1,\pm i\\}$.
That is, an element of $\mathcal{P}_{n}$ has the form $P=\alpha
P_{1}\otimes\cdots\otimes P_{n}$, where $P_{j}\in\\{I,X,Y,Z\\}$ for all $j$.
Stabiliser codes are defined by a commutative subgroup
$\mathcal{S}\subseteq\mathcal{P}_{n}$ such that $-I\notin\mathcal{S}$. The
quantum code space is a $\mathbb{C}$-linear subspace
$\mathcal{C}\subseteq\mathbb{C}(\mathbb{F}_{2}^{n})$ defined as the set of
quantum states that are stabilised by all the elements of $\mathcal{S}$, that
is $\mathcal{C}:=\\{\lvert\psi\rangle\in\mathbb{C}(\mathbb{F}_{2}^{n})\ |\
s\lvert\psi\rangle=\lvert\psi\rangle,\ \forall s\in\mathcal{S}\\}$. The
stabiliser group has $2^{r}$ elements, can be generated by $r$ independent
elements, and defines a quantum code $\mathcal{C}$ having
$\mathbb{C}$-dimension $2^{n-r}=2^{k}$. In analogy with the classical case, we
say that $k$ is the code dimension, $n$ the code length, and $R=k/n$ the code
rate.

A CSS code is a stabiliser code where the stabiliser generators can be chosen
to be either tensor products of $I$ and $X$ operators only, or tensor products
of $I$ and $Z$ operators only. One can thus represent a CSS code with two
binary PCMs: $H^{z}\in\mathbb{F}_{2}^{m^{z}\times n}$, which is associated to
parity checks in the $Z$ (computational) basis, and
$H^{x}\in\mathbb{F}_{2}^{m^{x}\times n}$, which is associated to parity checks
in the $X$ (Hadamard) basis. For instance, the stabiliser elements $X\otimes
X\otimes I$ corresponds to the row vector $(1,1,0)$ in $H^{x}$ and $Z\otimes
I\otimes Z$ to the row vector $(1,0,1)$ in $H^{z}$. The dimension of the
resulting binary code is given by $k=n-r^{x}-r^{z}=k^{x}+k^{z}-n$, where
$r^{x}=\operatorname{rank}(H^{x})\leq m^{x}$,
$r^{z}=\operatorname{rank}(H^{z})\leq m^{z}$, $k^{x}=\dim(\ker(H^{x}))$ and
$k^{z}=\dim(\ker(H^{z}))$. Commutativity of the generators is equivalent to
requiring

$\displaystyle H^{x}(H^{z})^{\\!\mathsf{T}}=0\mod 2.$ (5)

Neglecting the global phase, an error pattern $P=P_{1}\otimes\cdots\otimes
P_{n}\in\mathcal{P}_{n}$ is in one to one correspondence with an ordered pair
of vectors $(v^{z},v^{x})$, with $v^{z},v^{x}\in\mathbb{F}_{2}^{n}$: we have
$[v^{z}]_{j}=1$ if $P_{j}\in\\{Y,Z\\}$ and $[v^{z}]_{j}=0$ otherwise;
similarly, we have $[v^{x}]_{j}=1$ if $P_{j}\in\\{X,Y\\}$ and $[v^{x}]_{j}=0$
otherwise. Note that $X$ checks (specified via $H^{x}$) are sensitive to $Z$
errors and that $Z$ checks (specified via $H^{z}$) are sensitive to $X$
errors.

For quantum CSS codes, one can distinguish different kinds of code minimum
distance which we refer to as the pure distance $\delta$ and the code distance
$d$. The pure distances for $X$ and $Z$ errors are given, respectively, by

$\displaystyle\delta^{x}$ $\displaystyle:=\min\big{\\{}|v^{x}|\ \big{|}\
H^{z}v^{x}=0,v^{x}\neq 0\big{\\}}$ (6) $\displaystyle\delta^{z}$
$\displaystyle:=\min\big{\\{}|v^{z}|\ \big{|}\ H^{x}v^{z}=0,v^{z}\neq
0\big{\\}}$ (7)

and we simply call $\delta:=\min(\delta^{x},\delta^{z})$ the pure distance. By
contrast, the code distances for $X$ and $Z$ errors are obtained by
considering only errors patterns that do not leave the code-subspace invariant
and thus do result in a logical error:

$\displaystyle d^{x}$ $\displaystyle:=\min\big{\\{}|v^{x}|\ \big{|}\
H^{z}v^{x}=0,v^{x}\notin\operatorname{span}\\!\big{(}(H^{x})^{\\!\mathsf{T}}\big{)}\big{\\}}$
(8) $\displaystyle d^{z}$ $\displaystyle:=\min\big{\\{}|v^{z}|\ \big{|}\
H^{x}v^{z}=0,v^{z}\notin\operatorname{span}\\!\big{(}(H^{z})^{\\!\mathsf{T}}\big{)}\big{\\}}$
(9)

We call $d:=\min(d^{x},d^{z})$ the code distance. Note that we always have
$d\geq\delta$ and $d$ can be significantly larger than $\delta$ in certain
cases111For instance, the surface code has constant pure distance, $\delta=4$,
while the code distance scales as the square root of the length
$d=O(\sqrt{n})$.. We summarise the parameters of a quantum code $\mathcal{C}$
with the notation $[[n,k,d]]$ or, omitting the code distance, $[[n,k]]$.

##  3 Main constructions

We first present a method for obtaining asymmetric and symmetric 2-fold
products of CSS codes. Then, we generalise the symmetric construction to
$D$-fold products. Classical product and tensor product constructions are
employed in such a way that the commutativity condition for CSS codes is
automatically fulfilled.

###  3.1 Asymmetric $2$-fold product construction of CSS codes
($\mathcal{C}_{\ltimes}$)

######  Definition 1.

Let $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ be CSS codes having, for
$\ell\in\\{1,2\\}$, PCMs associated to $X$ and $Z$ checks given by
$H_{\ell}^{x}\in\mathbb{F}_{2}^{m_{\ell}^{x}\times n_{\ell}}$ and by
$H_{\ell}^{z}\in\mathbb{F}_{2}^{m_{\ell}^{z}\times n_{\ell}}$. Because of the
commutativity condition, these PCMs satisfy:

$\displaystyle
H_{\ell}^{x}(H_{\ell}^{z})^{\\!\mathsf{T}}=0\qquad\ell\in\\{1,2\\}$ (10)

We define the asymmetric 2-fold product quantum CSS code
$\mathcal{C}_{\ltimes}$ as the code associated to the following $X$ and $Z$
parity check matrices:

$\displaystyle H^{x}_{\ltimes}$
$\displaystyle:=\begin{pmatrix}H^{x}_{1}&\otimes&I\\\
I&\otimes&H^{x}_{2}\end{pmatrix}$ (11) $\displaystyle H^{z}_{\ltimes}$
$\displaystyle:=\Big{(}\\!\\!\begin{array}[]{ccc}H^{z}_{1}&\otimes&H^{z}_{2}\end{array}\\!\\!\Big{)}.$
(13)

We have given the definition of $\mathcal{C}_{\ltimes}$ for two arbitrary CSS
codes for sake of generality. We note that asymmetric product codes as here
defined typically provide more protection against $Z$ errors than $X$ errors.
This may be beneficial for error channels where $Z$ errors occur more
frequently than $X$ errors [18, 19, 20, 21]. Alternatively, the construction
methods for the $X$ and $Z$ PCMs may be reversed. This CSS code features meta-
checks in the PCM based on the product code construction but no meta-checks in
PCM based on the tensor-product code construction. Finally, the commutativity
condition $H^{x}_{\ltimes}(H^{z}_{\ltimes})^{\\!\mathsf{T}}=0$ can be verified
using Eq. (10) and the multi-linearity of tensor products (which implies
$0\otimes M=0$ for any matrix $M$).

Expressions for the pure distances can be easily derived from the distances of
the underlying codes and the properties of the classical product and tensor
product construction. The true code distances [see the definitions given in
Eq. (8) and (9)] cannot be easily computed, but can only be lower bounded
using $d^{x}\geq\delta^{x}$ and $d^{z}\geq\delta^{z}$. In contrast to the
classical case, the distance of $\mathcal{C}_{\ltimes}$ can be smaller than
the product of distances of the component codes; for instance,
$d_{\ltimes}^{z}<d_{1}^{z}d_{2}^{z}$, as we show in Appendix A.

We report in the table below the properties of $\mathcal{C}_{\ltimes}$ both
for the general case (left column) and for the special case in which the two
component codes are equal (right column). These properties can be
straightforwardly derived from the classical product and tensor product
constructions. The dimension of the CSS code $\mathcal{C}_{\ltimes}$ is most
easily expressed in terms of the quantities
$k_{\ell}^{x}=\dim(\ker(H_{\ell}^{x})),r_{\ell}^{z}=\operatorname{rank}(H_{\ell}^{z})$.

Properties of $\mathcal{C}_{\ltimes}$
---
length | $n_{\ltimes}$ | $=n_{1}n_{2}$ | $n_{\ltimes}$ |  $=n^{2}$ |
$X$ checks | $m_{\ltimes}^{x}$ | $=m_{1}^{x}n_{2}+n_{1}m_{2}^{x}$ | $m_{\ltimes}^{x}$ | $=2nm^{x}$
$Z$ checks | $m_{\ltimes}^{z}$ | $=m_{1}^{z}m_{2}^{z}$ | $m_{\ltimes}^{z}$ | $=(m^{z})^{2}$
$X$ meta-checks | $\overline{m}_{\ltimes}^{x}$ | $=(m_{1}^{x}-r_{1}^{x})n_{2}+n_{1}(m_{2}^{x}-r_{2}^{x})+r_{1}^{x}r_{2}^{x}$ | $\overline{m}_{\ltimes}^{x}$ |  $=2n(m^{x}-r^{x})+(r^{x})^{2}$ |
dimension | $k_{\ltimes}$ | $=k_{1}^{x}k_{2}^{x}-r_{1}^{z}r_{2}^{z}$ | $k_{\ltimes}$ |  $=(k^{x})^{2}-(r^{z})^{2}$ |
$Z$ pure distance | $\delta_{\ltimes}^{z}$ | $=\delta^{z}_{1}\delta^{z}_{2}$ | $\delta_{\ltimes}^{z}$ | $=(\delta^{z})^{2}$
$X$ pure distance | $\delta_{\ltimes}^{x}$ | $=\min(\delta^{x}_{1},\delta^{x}_{2})$ | $\delta_{\ltimes}^{x}$ | $=\delta^{x}$
$X$ row weight | $w_{\ltimes,r}^{x}$ | $=\max(w_{1,r}^{x},w_{2,r}^{x})$ | $w_{\ltimes,r}^{x}$ | $=w_{r}^{x}$
$Z$ row weight | $w_{\ltimes,r}^{z}$ | $=w_{1,r}^{z}w_{2,r}^{z}$ | $w_{\ltimes,r}^{z}$ | $=(w_{r}^{z})^{2}$
$X$ column weight | $w_{\ltimes,r}^{x}$ | $=w_{1,c}^{x}+w_{2,c}^{x}$ | $w_{\ltimes,r}^{x}$ | $=2w_{c}^{x}$
$Z$ column weight | $w_{\ltimes,c}^{z}$ | $=w_{1,c}^{z}w_{2,c}^{z}$ | $w_{\ltimes,c}^{z}$ | $=(w_{c}^{z})^{2}$

###  3.2 Symmetric 2-fold product construction of CSS codes
($\mathcal{C}_{\boxtimes}$)

######  Definition 2.

Let $\mathcal{C}_{1},\mathcal{C}_{2},\mathcal{C}_{3},\mathcal{C}_{4}$ be a set
of four CSS codes such that, for each $\ell\in\\{1,2,3,4\\}$, the PCMs
associated to $X$ and $Z$ checks are
$H_{\ell}^{x}\in\mathbb{F}_{2}^{m_{\ell}^{x}\times n_{\ell}}$ and
$H_{\ell}^{z}\in\mathbb{F}_{2}^{m_{\ell}^{z}\times n_{\ell}}$. Because of the
commutativity condition, these PCMs must satisfy:

$\displaystyle
H_{\ell}^{x}(H_{\ell}^{z})^{\\!\mathsf{T}}=0\qquad\ell\in\\{1,2,3,4\\}$ (14)

We define the symmetric 2-fold product quantum CSS code
$\mathcal{C}_{\boxtimes}$ as the code associated to the following $X$ and $Z$
parity check matrices:

$\displaystyle H^{x}_{\boxtimes}$
$\displaystyle:=\begin{pmatrix}H_{1}^{x}&\otimes&H_{2}^{x}&\otimes&I&\otimes&I\\\
I&\otimes&I&\otimes&H_{3}^{x}&\otimes&H_{4}^{x}\end{pmatrix}$ (15)
$\displaystyle H^{z}_{\boxtimes}$
$\displaystyle:=\begin{pmatrix}H_{1}^{z}&\otimes&I&\otimes&H_{3}^{z}&\otimes&I\\\
I&\otimes&H_{2}^{z}&\otimes&I&\otimes&H_{4}^{z}\end{pmatrix}.$ (16)

Note that both the $X$ parity checks and $Z$ checks are given by classical
product codes. Specifically, these are the products of component codes
associated to $H_{1}^{x}\otimes H_{2}^{x}$ and $H_{3}^{x}\otimes H_{4}^{x}$
(for $H^{x}_{\boxtimes}$) and $H_{1}^{z}\otimes H_{3}^{z}$ and
$H_{2}^{z}\otimes H_{4}^{z}$ (for $H^{z}_{\boxtimes}$). This implies, in
particular, that $H^{x}_{\boxtimes}$ and $H^{z}_{\boxtimes}$ are not full-
rank. One can immediately verify the commutativity condition
$H^{x}_{\boxtimes}(H^{z}_{\boxtimes})^{\\!\mathsf{T}}=0$ using Eq. (14).

The properties of the quantum CSS code $\mathcal{C}_{\boxtimes}$ are given in
the table below, both for the general case and for the special case where the
component codes are equal; the dimension of the code is computed via the
equation
$k_{\boxtimes}=n_{\boxtimes}-\operatorname{rank}(H_{\boxtimes}^{x})-\operatorname{rank}(H_{\boxtimes}^{z})$
and expressed in terms of the quantities
$r_{\ell}^{x}=\operatorname{rank}(H_{\ell}^{x}),r_{\ell}^{z}=\operatorname{rank}(H_{\ell}^{z})$.

Properties of $\mathcal{C}_{\boxtimes}$
---
length | $n_{\boxtimes}$ | $=n_{1}n_{2}n_{3}n_{4}$ | $n_{\boxtimes}$ |  $=n^{4}$ |
$X$ checks | $m_{\boxtimes}^{x}$ | $=m_{1}^{x}m_{2}^{x}n_{3}n_{4}+n_{1}n_{2}m_{3}^{x}m_{4}^{x}$ | $m_{\boxtimes}^{x}$ | $=2n^{2}(m^{x})^{2}$
$Z$ checks | $m_{\boxtimes}^{z}$ | $=m_{1}^{z}n_{2}m_{3}^{z}n_{4}+n_{1}m_{2}^{z}n_{3}m_{4}^{z}$ | $m_{\boxtimes}^{z}$ | $=2n^{2}(m^{z})^{2}$
$X$ meta-checks | $\overline{m}_{\boxtimes}^{x}$ | $=(m_{1}^{x}m_{2}^{x}-r_{1}^{x}r_{2}^{x})n_{3}n_{4}+n_{1}n_{2}(m_{3}^{x}m_{4}^{x}-r_{3}^{x}r_{4}^{x})$ | $\overline{m}_{\boxtimes}^{x}$ | $=2n^{2}((m^{x})^{2}-(r^{x})^{2})$
|  | $+\;r_{1}^{x}r_{2}^{x}r_{3}^{x}r_{4}^{x}$ |  | $+\;(r^{x})^{4}$
$Z$ meta-checks | $\overline{m}_{\boxtimes}^{z}$ | $=(m_{1}^{z}m_{3}^{z}-r_{1}^{z}r_{3}^{z})n_{2}n_{4}+n_{1}n_{3}(m_{2}^{z}m_{4}^{z}-r_{2}^{z}r_{4}^{z})$ | $\overline{m}_{\boxtimes}^{z}$ | $=2n^{2}((m^{z})^{2}-(r^{z})^{2})$
|  | $+\;r_{1}^{z}r_{2}^{z}r_{3}^{z}r_{4}^{z}$ |  | $+\;(r^{z})^{4}$
dimension | $k_{\boxtimes}$ | $=\scalebox{0.8}{$\prod$}_{\ell}n_{\ell}+\scalebox{0.8}{$\prod$}_{\ell}r^{x}_{\ell}+\scalebox{0.8}{$\prod$}_{\ell}r^{z}_{\ell}$ | $k_{\boxtimes}$ | $=n^{4}+(r^{x})^{4}+(r^{z})^{4}$
|  | $-\,r_{1}^{x}r_{2}^{x}n_{3}n_{4}-n_{1}n_{2}r_{3}^{x}r_{4}^{x}-r_{1}^{z}n_{2}r_{3}^{z}n_{4}-n_{1}r_{2}^{z}n_{3}r_{4}^{z}$ |  |  $-\,2n^{2}(r^{x})^{2}-2n^{2}(r^{z})^{2}$ |
$Z$ pure distance | $\delta_{\boxtimes}^{z}$ | $=\min(\delta^{z}_{1},\delta^{z}_{2})\,\min(\delta^{z}_{3},\delta^{z}_{4})$ | $\delta_{\boxtimes}^{z}$ | $=(\delta^{z})^{2}$
$X$ pure distance | $\delta_{\boxtimes}^{x}$ | $=\min(\delta^{x}_{1},\delta^{x}_{3})\,\min(\delta^{x}_{2},\delta^{x}_{4})$ | $\delta_{\boxtimes}^{x}$ | $=(\delta^{x})^{2}$
$X$ row weight | $w_{\boxtimes,r}^{x}$ | $=\max(w_{1,r}^{x}w_{2,r}^{x},w_{3,r}^{x}w_{4,r}^{x})$ | $w_{\boxtimes,r}^{x}$ | $=(w_{r}^{x})^{2}$
$Z$ row weight | $w_{\boxtimes,r}^{z}$ | $=\max(w_{1,r}^{z}w_{3,r}^{z},w_{2,r}^{z}w_{4,r}^{z})$ | $w_{\boxtimes,r}^{z}$ | $=(w_{r}^{z})^{2}$
$X$ column weight | $w_{\boxtimes,r}^{x}$ | $=w_{1,c}^{x}w_{2,c}^{x}+w_{3,c}^{x}w_{4,c}^{x}$ | $w_{\boxtimes,r}^{x}$ | $=2(w_{c}^{x})^{2}$
$Z$ column weight | $w_{\boxtimes,c}^{z}$ | $=w_{1,c}^{z}w_{3,c}^{z}+w_{2,c}^{z}w_{4,c}^{z}$ | $w_{\boxtimes,c}^{z}$ | $=2(w_{c}^{z})^{2}$

######  Remark.

We note that there is some arbitrariness in our choice of how to present the
PCMs of the product code. For instance, we may choose as $Z$ PCM

$\displaystyle H^{\prime
z}_{\boxtimes}:=\begin{pmatrix}H_{1}^{z}&\otimes&I&\otimes&I&\otimes&H_{4}^{z}\\\
I&\otimes&H_{2}^{z}&\otimes&H_{3}^{z}&\otimes&I\end{pmatrix}$ (17)

while keeping the $X$ PCM unchanged. However, this definition is equivalent to
the one given in Eq. (15), up to a re-labelling of the qubits and of the
component codes.

###  3.3 Symmetric D-fold product construction of CSS codes
($\mathcal{C}_{\textbf{(D)}}$)

The construction of symmetric product CSS codes can be easily generalised to
higher dimensions, by taking the product of $D^{2}$ CSS codes. For instance,
by using the PCMs of a set of $9$ CSS codes one can construct the PCMs of a
$3$-fold product code as follows:

$\displaystyle
H_{(3)}^{x}:=\left(\begin{array}[]{ccccccccccccccccc}H_{1}^{x}&\otimes&H_{2}^{x}&\otimes&H_{3}^{x}&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I\\\
I&\otimes&I&\otimes&I&\otimes&H_{4}^{x}&\otimes&H_{5}^{x}&\otimes&H_{6}^{x}&\otimes&I&\otimes&I&\otimes&I\\\
I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&H_{7}^{x}&\otimes&H_{8}^{x}&\otimes&H_{9}^{x}\end{array}\right)$
(21) $\displaystyle
H_{(3)}^{z}:=\left(\begin{array}[]{ccccccccccccccccc}H_{1}^{z}&\otimes&I&\otimes&I&\otimes&H_{4}^{z}&\otimes&I&\otimes&I&\otimes&H_{7}^{z}&\otimes&I&\otimes&I\\\
I&\otimes&H_{2}^{z}&\otimes&I&\otimes&I&\otimes&H_{5}^{z}&\otimes&I&\otimes&I&\otimes&H_{8}^{z}&\otimes&I\\\
I&\otimes&I&\otimes&H_{3}^{z}&\otimes&I&\otimes&I&\otimes&H_{6}^{z}&\otimes&I&\otimes&I&\otimes&H_{9}^{z}\end{array}\right).$
(25)

It is easy to check that it is a CSS code and its properties can be derived
similarly as done for the case of a 2-fold product. The general definition of
the symmetric D-fold product construction of CSS codes is as follows.

######  Definition 3.

Let $\mathcal{C}_{1},\ldots,\mathcal{C}_{D^{2}}$ be a set of $D^{2}$ CSS codes
and, for each $\ell\in\\{1,\ldots,D^{2}\\}$, let
$H_{\ell}^{x}\in\mathbb{F}_{2}^{m_{\ell}^{x}\times n_{\ell}}$ and
$H_{\ell}^{z}\in\mathbb{F}_{2}^{m_{\ell}^{z}\times n_{\ell}}$ be the PCMs
associated to $X$ and $Z$ checks, respectively. We define the symmetric
$D$-fold product CSS code $\mathcal{C}_{(D)}$ as the code associated to the
following $X$ and $Z$ parity check matrices:

$\displaystyle H^{x}_{(D)}$
$\displaystyle:=\overset{D-1}{\underset{j=0}{{\Big{[}}\textup{Stack}{\Big{]}}}}\bigotimes_{\ell=1}^{D^{2}}\mathcal{H}_{\ell,j}^{x}\qquad\mathcal{H}_{\ell,j}^{x}=\begin{cases}H_{\ell}^{x}&\text{if
}jD+1\leq\ell\leq(j+1)D\\\ I_{n_{\ell}}&\text{otherwise}\end{cases}$ (26)
$\displaystyle H^{z}_{(D)}$
$\displaystyle:=\overset{D-1}{\underset{j=0}{{\Big{[}}\textup{Stack}{\Big{]}}}}\bigotimes_{\ell=1}^{D^{2}}\mathcal{H}_{\ell,j}^{z}\qquad\mathcal{H}_{\ell,j}^{z}=\begin{cases}H_{\ell}^{z}&\text{if
}(\ell-1)\equiv j\mod D\\\ I_{n_{\ell}}&\text{otherwise}\end{cases}$ (27)

where Stack denotes the operation of creating an $m\times n$ matrix
($m=\sum_{j}m_{j}$) by stacking $m_{j}\times n$ matrices one above the other.

Other equivalent definitions of the code $\mathcal{C}_{(D)}$ could be given,
by choosing different ordering of the matrices $H_{\ell}^{x}$ and
$H_{\ell}^{z}$ in the tensor products. The properties of this code can be
obtained with similar procedures as in the previous examples. For instance, we
can compute the number of meta-checks $\overline{m}_{(D)}^{\alpha}$, for
$\alpha\in\\{x,z\\}$, by

$\displaystyle\overline{m}_{(D)}^{\alpha}=m_{(D)}^{\alpha}-\left(n_{(D)}-k_{(D)}^{\alpha}\right)\qquad\alpha\in\\{x,z\\}\,,$
(28)

where $k_{(D)}^{x}$ and $k_{(D)}^{z}$ are the classical code dimensions
associated to the $X$ and $Z$ PCMs. These can be computed as a function of
$n_{\ell}$ and $r_{\ell}^{\alpha}$ using the definitions of $H_{(D)}^{\alpha}$
in (26) and (27), resulting in

$\displaystyle k_{(D)}^{x}$
$\displaystyle=\prod_{j=0}^{D-1}\Bigg{(}\prod_{\ell=jD+1}^{(j+1)D}n_{\ell}-\prod_{\ell=jD+1}^{(j+1)D}r_{\ell}^{x}\Bigg{)}$
(29) $\displaystyle k_{(D)}^{z}$
$\displaystyle=\prod_{j=0}^{D-1}\Bigg{(}\prod_{\begin{subarray}{c}(\ell-1)\equiv
j\\\ \mod
D~{}~{}\end{subarray}}n_{\ell}-\prod_{\begin{subarray}{c}(\ell-1)\equiv j\\\
\mod D~{}~{}\end{subarray}}r_{\ell}^{z}\Bigg{)}.$ (30)

We summarise the properties of this family of codes for the special case where
all the component codes are equal (the expressions for the general case are
lengthy and can be derived straightforwardly).

Properties of $\mathcal{C}_{\textup{(D)}}$
---
length | $n_{(D)}$ |  $=n^{D^{2}}$ |
$X$ checks | $m_{(D)}^{x}$ | $=D\,n^{D(D-1)}\,(m^{x})^{D}$
$Z$ checks | $m_{(D)}^{z}$ | $=D\,n^{D(D-1)}\,(m^{z})^{D}$
$X$ meta-checks | $\overline{m}_{(D)}^{x}$ | $=D\,n^{D(D-1)}\,(m^{x})^{D}+(n^{D}-(r^{x})^{D})^{D}-n^{D^{2}}$
$Z$ meta-checks | $\overline{m}_{(D)}^{z}$ | $=D\,n^{D(D-1)}\,(m^{z})^{D}+(n^{D}-(r^{z})^{D})^{D}-n^{D^{2}}$
dimension | $k_{(D)}$ |  $=(n^{D}-(r^{x})^{D})^{D}+(n^{D}-(r^{z})^{D})^{D}-n^{D^{2}}$ |
$Z$ pure distance | $\delta_{(D)}^{z}$ | $=(\delta^{z})^{D}$
$X$ pure distance | $\delta_{(D)}^{x}$ | $=(\delta^{x})^{D}$
$X$ row weight | $w_{(D),r}^{x}$ | $=(w_{r}^{x})^{D}$
$Z$ row weight | $w_{(D),r}^{z}$ | $=(w_{r}^{z})^{D}$
$X$ column weight | $w_{(D),c}^{x}$ | $=D(w_{c}^{x})^{D}$
$Z$ column weight | $w_{(D),c}^{z}$ | $=D(w_{c}^{z})^{D}$

###  3.4 Single-parity-check D-fold product CSS codes
($\mathcal{C}_{\textbf{SPC(D)}}$)

We now specialise the symmetric D-fold product construction to the case where
the component codes are all given by single-parity-check (SPC) codes. The
choice of SPC codes as the component CSS codes is motivated by the fact that
the length of $D$-fold product codes grow very fast in $D$ (as $n^{D^{2}}$),
thus reasonably sized product codes can be obtained only for very small sizes
of the component codes. A favourable choice is then
$H_{\ell}^{x}=H_{\ell}^{z}=\begin{pmatrix}1&\\!\\!1\end{pmatrix}\
\forall\ell$, corresponding to the 2-qubit code having stabiliser generators
$X\otimes X$ and $Z\otimes Z$. Note that this CSS code has zero encoding rate,
since the only quantum state in its code space is the Bell state
$\lvert\Phi^{+}\rangle=\frac{1}{\sqrt{2}}(\lvert 0,0\rangle+\lvert
1,1\rangle)$. Nonetheless, the $D$-fold product CSS codes obtained from it has
positive encoding rate for all $D\geq 2$. We thus arrive at the following
definition which, for $D=2$ and up to column permutations, reduces to the
product CSS codes introduced by Hivadi in [13].

######  Definition 4.

Consider the following set of PCMs for the component codes
$\mathcal{C}_{1},\ldots,\mathcal{C}_{D^{2}}$:

$\displaystyle
H^{x}_{\ell}=H^{z}_{\ell}:=\begin{cases}(\underbrace{1~{}\cdots~{}1}_{2s})&\text{for
}\ell=(i-1)D+i,\;i=1,\dots,D\\\ (\,1~{}~{}1\,)&\text{otherwise}\end{cases}$
(31)

and employ them to construct a $D$-fold product CSS code as described in
Definition 3. We call the resulting code a single-parity-check $D$-fold
product CSS code and denote it either $\mathcal{C}_{\mathrm{SPC}(D,s)}$ or
more simply $\mathcal{C}_{\mathrm{SPC}(D)}$ in the case $s=1$.

Note that the codes associated to $X$ and $Z$ checks are the same up to
permutations of the columns of $H^{x}$ and $H^{z}$, and are isomorphic to the
$D$-fold product of the $[s2^{D},s2^{D}-1]$ SPC code. The free parameter
$s\in\mathbb{N}$ may be used to increase the rate. The SPC$(D,s)$ code family
features a pure distance that asymptotically grows with $D$ and, moreover, the
distance is equal to the pure distance, $d=\delta=2^{D}$, as we prove in
Appendix A.

The properties of this code family are summarised in the table below.

Properties of $\mathcal{C}_{\mathrm{SPC}(D,s)}$
---
length | $n~{}$ |  $=(s2^{D})^{D}$ |
$X$ and $Z$ checks | $m^{x}=m^{z}$ |  $=D(s2^{D})^{D-1}$ |
$X$ and $Z$ meta-checks | $\overline{m}^{x}=\overline{m}^{z}$ |  $=D(s2^{D})^{D-1}+(s2^{D}-1)^{D}-(s2^{D})^{D}$ |
dimension | $k~{}$ |  $=2(s2^{D}-1)^{D}-(s2^{D})^{D}$ |
$X$ and $Z$ distance | $\delta^{x}=\delta^{z}$ |  $=d^{x}=d^{z}=2^{D}$ |
$X$ and $Z$ row weight | $w_{r}^{x}=w_{r}^{z}$ |  $=s2^{D}$ |
$X$ and $Z$ column weight | $w_{c}^{x}=w_{c}^{z}$ |  $=D$ |

##  4 Comparison with previous works

In this section, we compare the performance of our codes against the
performance of other code families.

We start by selecting the SPC$(3)$ code, i.e., the CSS code from the family
described in Section 3.4 with parameters $D=3,s=1$. More explicitly, this is
the CSS code associated to the following 3-fold product codes:

$\displaystyle
H_{\mathrm{SP}C(3)}^{x}=\left(\begin{array}[]{ccccccccccccccccc}h&\otimes&h&\otimes&h&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I\\\
I&\otimes&I&\otimes&I&\otimes&h&\otimes&h&\otimes&h&\otimes&I&\otimes&I&\otimes&I\\\
I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&I&\otimes&h&\otimes&h&\otimes&h\end{array}\right)$
(35) $\displaystyle
H_{\mathrm{SP}C(3)}^{z}=\left(\begin{array}[]{ccccccccccccccccc}h&\otimes&I&\otimes&I&\otimes&h&\otimes&I&\otimes&I&\otimes&h&\otimes&I&\otimes&I\\\
I&\otimes&h&\otimes&I&\otimes&I&\otimes&h&\otimes&I&\otimes&I&\otimes&h&\otimes&I\\\
I&\otimes&I&\otimes&h&\otimes&I&\otimes&I&\otimes&h&\otimes&I&\otimes&I&\otimes&h\end{array}\right)$
(39)

where $h=\begin{pmatrix}1&\\!\\!1\end{pmatrix}$ and
$I=\left(\begin{smallmatrix}1&0\\\ 0&1\end{smallmatrix}\right)$. This results
in a $[[512,174,8]]$ CSS code where all row weights are 8 and all column
weights are 3; each matrix has 23 linearly dependent rows (i.e., meta-checks).

###  4.1 Previous code families participating in the comparison

Next, we search for codes from other families having similar parameters to the
SPC$(3)$ code.

#### Bicycle codes [22]

were one of the first families of quantum LDPC codes to be proposed. A bicycle
code is obtained by first randomly selecting a $n/2\times n/2$ cyclic matrix
$C$, which in our case has row weight 8. Next, the matrix
$H_{0}=\begin{pmatrix}C&C^{{\\!\mathsf{T}}}\end{pmatrix}$ is constructed.
Then, we proceed to remove $k/2$ rows from $H_{0}$ in order to obtain a matrix
$H_{1}$ with $(n-k)/2$ rows. Finally, the PCM of the bicycle code is obtained
by setting $H^{x}=H^{z}=H_{1}$. Different strategies can be followed in order
to remove rows from $H_{0}$ to obtain $H_{1}$. In our case we follow an
approach that aims at obtaining a matrix $H_{1}$ whose column weights are as
uniform as possible. In particular, we follow a greedy approach in which rows
are removed one by one, and the row to be removed is always selected so as to
keep the column weights as uniform as possible.

#### Hypergraph product codes [6]

were introduced as a generalization of the surface code; thus the surface code
can be viewed as a hypergraph product of a certain representation of the
repetition code with itself. More generally, [6, Theorem 1] gives the
following construction: if $H$ is a full rank $m\times n$ PCM of a $[n,k,d]$
classical linear code, then the quantum CSS code with parity check matrices
$H^{x}=\begin{pmatrix}H\otimes I&I\otimes H^{{\\!\mathsf{T}}}\end{pmatrix}$
and $H^{z}=\begin{pmatrix}I\otimes H&H^{{\\!\mathsf{T}}}\otimes
I\end{pmatrix}$ has parameters $[[n^{2}+m^{2},k^{2},d]]$. For the present
comparison, we want a hypergraph product code with parameters as close as
possible to $[[512,174]]$; the closest that one can get within this family is
for $n=21,m=8,k=13$, giving a $[[505,169]]$ quantum CSS code. It is known that
the distance of a $[21,13]$ classical linear code is at most 4 [23]. Using a
computer search, we found a sparse $[21,13,4]$ classical code that leads to a
$[[505,169,4]]$ hypergraph product code. The rows of the parity check matrices
have weights between 9 and 13. Most of the columns have weight 3, but some
have higher weights up to 10.

#### Quantum Tanner codes [24]

were introduced as an asymptotically good family of quantum LDPC codes.
Recently, [25, 26, 27, 28] have discussed efficient decoders for these codes.
There are slight variations in the construction of quantum Tanner codes
between the various references. For the present comparison, we adopt the
approach of [26, 28] which avoids the total non-conjugacy constraint.

A quantum Tanner code is described by seven components: a finite group $G$,
two subsets $A,B\subset G$ of size $\Delta$ each that are closed under
inversion, two full rank $m\times\Delta$ parity check matrices
$H_{A},H_{B}^{\bot}$ and two full rank $(\Delta-m)\times m$ parity check
matrices $H_{A}^{\bot},H_{B}$, where $H_{A},H_{A}^{\bot}$ are orthogonal, and
so are $H_{B},H_{B}^{\bot}$, and where $m\leq\Delta/2$ is a parameter that
determines a lower bound $(1-2m/\Delta)^{2}$ on the rate.

The group $G$ and its two subsets $A,B$ define an incidence structure with
vertices, edges and squares called a left-right Cayley complex [29]. In the
approach of [26, 28], the vertices are

$\displaystyle V=\big{\\{}(g,i,j)\;\big{|}\;g\in
G,i\in\\{0,1\\},j\in\\{0,1\\}\big{\\}}$ (40)

the edges are $E=E_{A}\cup E_{B}$ with

$\displaystyle E_{A}$
$\displaystyle=\big{\\{}((g,i,0),(ag,i,1))\;\big{|}\;g\in G,a\in
A,i\in\\{0,1\\}\big{\\}}$ (41) $\displaystyle E_{B}$
$\displaystyle=\big{\\{}((g,0,j),(gb,1,j))\;\big{|}\;g\in G,b\in
B,j\in\\{0,1\\}\big{\\}}$ (42)

and the squares are

$\displaystyle Q=\big{\\{}((g,0,0),(ag,0,1),(agb,1,1),(gb,1,0))\;\big{|}\;g\in
G,a\in A,b\in B\big{\\}}.$ (43)

Qubits are placed on the squares and constraints are placed on the vertices.
If $i+j\mod 2=0$, vertex $(g,i,j)$ imposes the $x$ constraints with PCM
$H_{A}\otimes H_{B}$ on the connected squares/qubits, and if $i+j\mod 2=1$,
then vertex $(g,i,j)$ imposes the $z$ constraints with PCM
$H_{A}^{\bot}\otimes H_{B}^{\bot}$ on the connected squares/qubits.

The resulting quantum CSS code has $\Delta^{2}|G|$ qubits and
$2m(\Delta-m)|G|$ rows in each of its parity check matrices $H^{x},H^{z}$. The
quality of the code is determined by the spectral expansion properties of the
left Cayley graph $\operatorname{Cay}_{L}(A,G)$ and the right Cayley graph
$\operatorname{Cay}_{R}(G,B)$ (i.e. the second largest magnitude of an
eigenvalue of the adjacency matrix should be as small as possible), as well as
the distance and robustness properties of the classical linear codes with
parity check matrices $H_{A}\otimes H_{B}$ and $H_{A}^{\bot}\otimes
H_{B}^{\bot}$.

For the present comparison, we require a quantum Tanner code having length and
dimension close to $[[512,174]]$. Observing that
$\Delta^{3}\leq\Delta^{2}|G|$, we see that the only possible choices are those
with $\Delta\leq 8$; out of these, only the combination $\Delta=5,m=1$ gives
rate around 174/512. Further, given $m=1$, we want the minimum distance of
$\ker(H_{A}\otimes H_{B})$, $\ker(H_{A}^{\bot}\otimes H_{B}^{\bot})$ to be
more than 1; this determines
$H_{A}=H_{B}^{\bot}=\begin{pmatrix}1&1&1&1&1\end{pmatrix}$ and therefore a
natural choice is

$\displaystyle H_{A}^{\bot}=H_{B}=\begin{pmatrix}1&1&0&0&0\\\ 0&1&1&0&0\\\
0&0&1&1&0\\\ 0&0&0&1&1\end{pmatrix}.$ (44)

The last step is to choose $G,A,B$. Requiring a block size around 512 fixes
$|G|=20$ or $21$. A computer search determines that the best spectral
expansion properties are given by the choices

$\displaystyle G$ $\displaystyle=\langle s,t|s^{4}=t^{5}=1,ts=st^{2}\rangle$
(45) $\displaystyle A$ $\displaystyle=\\{1,s,s^{3},t^{2}s^{2},t^{3}s^{2}\\}$
(46) $\displaystyle B$
$\displaystyle=\\{1,ts^{3},t^{2}s,t^{2}s^{2},t^{4}s^{2}\\}.$ (47)

The resulting PCMs $H^{x},H^{z}$ have rank 156 each, so we obtain a
$[[500,188]]$ quantum Tanner code. The row weights of the parity check
matrices are all 10, and the column weights are either 2 or 4.

###  4.2 Decoding performance with the quantum erasure channel

$10^{-2}$$10^{-1}$$10^{-5}$$10^{-4}$$10^{-3}$$10^{-2}$$10^{-1}$$10^{0}$Qubit erasure probability $\beta$Logical error ratebicycle codehypergraph productquantum Tannerreference SPC(3) coderandom CSS code |  $10^{-3}$$10^{-2}$$10^{-1}$$10^{-5}$$10^{-4}$$10^{-3}$$10^{-2}$$10^{-1}$$10^{0}$Depolarising rate $\epsilon$Logical error ratebicylcle codehypergraph productquantum Tannerreference SPC(3) coderandom CSS code
---|---
Figure 2: Monte Carlo simulation of the logical error rates of 5 different CSS
codes. Left: maximum likelihood decoding under erasure channel
($\mathcal{E}_{\beta}$). Right: BP decoding under depolarising channel
($\mathcal{D}_{\epsilon}$). See main text for details.

The first error model we consider is the quantum erasure channel
$\mathcal{E}_{\beta}$, which acts on a single qubit state $\rho$ as

$\displaystyle\mathcal{E}_{\beta}(\rho)=\big{(}1-\beta\big{)}\,\rho\otimes|0\rangle\langle
0|+\beta\,\frac{I}{2}\otimes|1\rangle\langle 1|$ (48)

where $\beta$ is a parameter of the channel specifying the probability of
erasure (see [30, Chapter 5] for an introduction to quantum channels). The
rightmost qubit is interpreted as a “flag” which can be read-out
deterministically (since $\lvert 0\rangle$ and $\lvert 1\rangle$ are
orthogonal states) and which heralds whether an erasure has occurred.

The main reason for considering the erasure channel is that it has been
observed in [31, Section III] that for any stabiliser code on the erasure
channel it is possible to efficiently perform maximum likelihood decoding: it
is sufficient to find any error pattern, e.g. by Gaussian elimination,
supported on the erased positions that produces the same
syndrome222Technically, the decoder outputs an error pattern $e$ from the most
probable coset of errors, that is, maximising the sum of the probabilities of
all errors that differ from $e$ by a stabiliser of the code.. This allows to
the test the performance of the codes in an unbiased manner, that is, in a way
that is decoupled from the performance of efficient but sub-optimal decoding
algorithms, such as belief propagation. We note, however, that erasure errors
do occur in certain quantum computation models or for concatenated codes where
the inner decoder can signal a decoding failure.

The probability of decoding error as a function of the probability of erasure
is shown in Figure 2 (left) for the bicycle, hypergraph product, quantum
Tanner code, our construction, and for a randomly chosen (not sparse)
$[[512,174]]$ CSS code drawn from the probability distribution described in
[32]. In the present case, this means that a random $512\times 512$ invertible
matrix $A$ is chosen, then the first 169 rows of $A$ and the second 169 rows
of $(A^{-1})^{{\\!\mathsf{T}}}$ are chosen as $H^{x}$ and $H^{z}$,
respectively.

###  4.3 Decoding performance with the depolarising channel

The second error model we consider is the depolarising channel
$\mathcal{D}_{\epsilon}$, which acts on a single qubit state $\rho$ as

$\displaystyle\mathcal{D}_{\epsilon}(\rho)$
$\displaystyle=\big{(}1-\epsilon\big{)}\,\rho+\frac{\epsilon}{3}\,\big{(}X\rho
X+Y\rho Y+Z\rho
Z\big{)}=\left(1-\frac{4\epsilon}{3}\right)\rho+\frac{4\epsilon}{3}\frac{I}{2}$
(49)

where $\epsilon$ is a parameter of the channel. The first expression clarifies
that $X$, $Y$ and $Z$ Pauli errors occur with equal probability, while the
second expression is based on the identity $\frac{1}{4}(\rho+X\rho X+Y\rho
Y+Z\rho Z)=I/2$ and shows that the completely depolarising channel is obtained
for $\epsilon=3/4$.

On the depolarising channel, there is no known efficiently computable maximum
likelihood decoder. Instead, we use a quaternary belief propagation decoder:
the messages are indexed by values in $\mathbb{F}_{4}$ or, equivalently, by a
Pauli matrix. The advantage of using this decoder, instead of using two
independent binary belief propagation decoders for $X$ and $Z$ checks is that
it keeps into account the correlation between $X$ and $Z$ errors in the
depolarising channel. Quaternary BP decoding was first introduced in [33] (and
see [34] for a review of decoding algorithms for quantum LDPC codes). For
completeness we describe our implementation of the quaternary belief
propagation decoder in Appendix B. Further decoding improvement may be
achieved using post-processing techniques such as ordered-statistics decoding
[9, 35, 36] and stabiliser inactivation [37], or by exploiting the soft
syndrome information that is accessible in some quantum computing hardware
[38, 39, 40].

The probability of decoding error as a function of the depolarising rate of
the channel is shown in Figure 2 (right) for the bicycle code, the hypergraph
product code, the quantum Tanner code, and the $[[512,174]]$ code from our
3-fold product construction; we also include the randomly chosen dense
$[[512,174]]$ CSS code. We observe that our reference SPC$(3)$ code surpasses
all other considered codes, judging by the BP error correction performance,
over the considered range of depolarising noise intensities ($\epsilon$).

##  5 Meta-checks and detection of syndrome errors

In this section we show how meta-checks can be used to mitigate the effect of
syndrome of read-out errors. In particular, the SPC$(3,s)$ code has a distance
with respect to syndrome errors that is equal to 3, allowing us to detect and
locate one syndrome read-out error, which is a first step in the direction of
fault-tolerance [41, 42].

Quantum read-out measurements are prone to errors, hence the syndrome outcomes
may be faulty, i.e., incorrect. Fault-tolerant error correcting codes showcase
the possibility of detecting and locating errors even in the face of syndrome
read-out errors. The syndrome measurements are physically implemented via
quantum circuits acting on both data and ancillary qubits and measuring out
the ancillary qubits alone and thus correlated errors are typically present.
Circuit-level noise simulations are therefore necessary to perform an accurate
evaluation of the performance of a quantum error-correcting code [43].
Nonetheless, a simplified but informative analysis can be obtained using a so-
called phenomenological error model: data qubit errors and syndrome read-out
errors are drawn independently at random, possibly with different error
probabilities.

We now explain briefly how the presence of redundant checks helps to correct
errors that occur during the syndrome read-out measurements. We start
considering a generic CSS code and then we specialise to the SPC$(3,s)$ code.
Let $H\in\mathbb{F}_{2}^{m\times n}$ be a matrix with rank $r<m$ (so that
$m-r$ checks are redundant), $H$ can be either the $X$ or the $Z$ PCM of the
CSS code. Consider the subspace
$\mathcal{S}=\operatorname{span}(H)\subset\mathbb{F}_{2}^{m}$ of dimension
$r$. If the device performing the syndrome measurement was perfect, the
measured syndrome would be an element of $\mathcal{S}$. However, when the
syndrome measurement is faulty, the measured syndrome is an element
$s^{\prime}\in\mathbb{F}_{2}^{m}$ that is not necessarily in $\mathcal{S}$. In
that case, we regard $\mathcal{S}$ as a linear error-correcting code and try
to correct the faulty $s^{\prime}$ to the subspace $\mathcal{S}$. The faulty
syndrome decoding works independently from any data-qubit error that may be
present since the meta-checks, by construction, are insensitive to them.

The matrix $H$ plays the role of a PCM for the quantum CSS code and of a
generator matrix for $\mathcal{S}=\operatorname{span}(H)$. We now want to find
another matrix $M$, such that $\ker(M)=\operatorname{span}(H)$; we call $M$ a
meta-check matrix. One way to obtain $M$ is the following: use Gaussian
elimination to find an invertible $M^{\prime\prime}\in\mathbb{F}_{2}^{m\times
m}$ such that

$\displaystyle\underbrace{\left(\begin{array}[]{c}~{}M^{\prime}{}\\\ \hline\cr
M\end{array}\right)}_{=M^{\prime\prime}}\bigg{(}~{}H~{}\bigg{)}=\left(\begin{array}[]{c}~{}E{}\\\
\hline\cr 0\end{array}\right).$ (54)

where $M^{\prime}\in\mathbb{F}_{2}^{r\times m}$ and
$M\in\mathbb{F}_{2}^{(m-r)\times m}$ are full rank matrices, and where
$E\in\mathbb{F}_{2}^{r\times n}$ is the reduced row echelon form of $H$. Then,
$\ker(M)=\operatorname{span}(H)$ as needed.

The minimum distance $d_{M}$ of the meta-check matrix $M$ can be upper bounded
as $d_{M}\leq w_{c}^{\min}$, where $w_{c}^{\min}$ is the minimum column weight
of $H$. To see this, let $H^{i}$ a minimum-weight column of $H$; by assumption
$H^{i}\in\operatorname{span}(H)=\ker(M)$, meaning that $H^{i}$ is a code word
of $\mathcal{S}$ having weight $w_{c}^{\min}$, thus proving the claim. The
proof that SPC($3,s$) codes have meta-check distance $d_{M}=w_{c}^{\min}=3$
can be found in Appendix A.

Note that syndrome read-out errors do not directly affect the data qubits, so
there is no physical correction to be applied. Nonetheless, the location of
the faulty syndrome can be forwarded to the decoder that is tasked with
decoding the quantum CSS code associated to $H$, thus yielding a two-step
decoding. However, as noted in [44, Section VII] the decoding performance
typically improves if one uses a single stage BP decoder directly using as
input the extended PCM

$\displaystyle\widetilde{H}=\left(\begin{array}[]{c|c}~{}H{}&~{}I{}\\\
\hline\cr 0&M\\\ \end{array}\right)$ (57)

where the identity matrix has size $m$. The extended PCM $\widetilde{H}$ can
be interpreted as adding one hidden variable for each syndrome which may flip
the result of the measurements and adding a meta-check code $M$ to correct the
effect of these hidden variables.

##  6 Conclusions and outlook

In this work we have introduced new methods for constructing families of CSS
codes associated to classical product codes. Quantum CSS codes are challenging
to construct (compared to classical ones) since a commutativity condition
between $X$ and $Z$ checks has to be satisfied, as given in Eq. (5). Our first
construction for CSS product codes is asymmetrical, in the sense that $X$
parity checks are constructed from a classical product code and $Z$ parity
checks from a classical tensor product code, with the goal of automatically
satisfying Eq. (5). A second construction is more symmetrical, having both $X$
and $Z$ checks associated to classical product codes, while the component
codes are in the form of classical tensor product codes; this second
construction showcases an increased (pure) distance against both kinds of
Pauli errors compared to the component CSS codes it is constructed from. The
third construction is a multi-dimensional generalisation of the second one,
allowing to obtain $D$-fold products of component CSS codes.

An advantage of our classically-inspired product code construction is that
extensive parallelisation can be achieved in measuring the parity checks.
Using the array representation of a 2-fold product code (see Figure 1) it is
clear that the parity checks of the component codes can be applied in parallel
over all the rows of the array and, in a second step, measured in parallel
over all the columns of the array. The same is true for CSS product codes and,
if the qubits are physically arranged in a 2-dimensional array, as typical in
several quantum computing architectures [21, 45, 46, 47, 48, 49], this can
result in simplified hardware implementations. A caveat is that the columns of
the PCM associated to $Z$ are permuted compared the PCM associated to $Z$
checks: this means that the $Z$ syndrome measurements act on qubits that are
no longer aligned along single rows or columns of the 2-dimensional array.

Product codes yield good performances when using SPC codes as the component
codes (albeit other choices are possible [50, 51, 52]). The heuristic
motivation is that SPC codes have high encoding rate (only one parity bit of
overhead) but small distance ($d=2$); the product construction allows to
increase the distance at the expense of decreasing the rate and yields codes
having good properties for intermediate code sizes. These good properties are
retained also by the corresponding quantum CSS codes. For instance, we obtain
a 3-fold product SPC code that can encode 174 logical qubits in 512 physical
qubits ($R=174/512\simeq 0.34$) and having distance $d=8$. This code has good
performances both for erasure channels and for depolarising noise under BP
decoding; for instance, the second best code in our comparison is a
$[[500,188]]$ quantum Tanner code, which exhibits logical error rates that are
around two order of magnitude higher for realistic values of the depolarising
noise.

Given the promising results of these product codes, we aim to further
investigate their properties. Open questions regard whether there are other
good choices for the component codes, besides SPC codes. This could be
especially true for the asymmetric product construction, where the fact that
only two component CSS codes are needed (instead of the four required in the
symmetric construction) gives leeway in the choice of larger component CSS
codes. Another interesting question is the possibility of achieving better
practical results via code concatenation, e.g., using a surface code for low-
level error correction and a product code as a high-level code to further
boost the fidelity of the encoded logical qubits [21, 53, 54, 55].

Regarding the code minimum distance $d$, it would be interesting to find
better lower bounds, since bounds based on the pure distance $\delta$ are in
general not tight (but we have shown that for the special case of SPC product
codes we have $d=\delta$). The fault-tolerance properties of these codes could
be further investigated, simulating the performance of decoders under
realistic circuit-level noise [43]. Finally, methods for implementing fault-
tolerant Clifford gates [56] and magic-state distillation [57, 58] within
these code families should be ascertained for realising universal quantum
computation with CSS product codes.

## Acknowledgements

This project was funded within the QuantERA II Programme that has received
funding from the European Union’s Horizon 2020 research and innovation
programme under Grant Agreement No 101017733, through the project EQUIP.

##  Appendix A Proofs of code distance properties

###  A.1 Classical product code minimum distance: $d_{\times}=d_{1}d_{2}$

The codes we consider are $\mathbb{F}_{2}$-linear, hence the code minimum
distance is equal to the minimum Hamming weight of any non-zero code-word.
Consider then minimum distance code-words $x_{1}\in\mathcal{C}_{1}$ and
$x_{2}\in\mathcal{C}_{2}$, and denote their Hamming weights $d_{1}$ and
$d_{2}$, respectively. The non-zero code-word $x=x_{1}\otimes
x_{2}\in\mathcal{C}_{1}\times\mathcal{C}_{2}$ has weight $d_{1}d_{2}$, thus
the product code has distance $d_{\times}\leq d_{1}d_{2}$. Conversely, all
non-zero code-words must have at least $d_{2}$ rows that are not identically
zero and each of these rows must have at least $d_{1}$ ones in it. Therefore,
$d_{\times}\geq d_{1}d_{2}$.

###  A.2 Classical tensor product code minimum distance:
$d_{\otimes}=\min(d_{1},d_{2})$

Given any minimum weight words $x\in\mathcal{C}_{1},y\in\mathcal{C}_{2}$
(i.e., $|x|=d_{1}$, $|y|=d_{2}$, $H_{1}x=0$, $H_{2}y=0$) and given any two
unit vectors $\textup{e}_{i}$ and $\textup{e}_{j}$ (having a one in position
$i$ and in position $j$, respectively, and zeros elsewhere) we have
$|x\otimes\textup{e}_{i}|=d_{1}$, $|\textup{e}_{j}\otimes y|=d_{2}$, and
moreover

$\displaystyle H_{\otimes}(x\otimes\textup{e}_{i})=H_{1}x\otimes
H_{2}\textup{e}_{i}=0\otimes H_{2}\textup{e}_{i}=0\,.$ (58)

Analogously we have $H_{\otimes}(\textup{e}_{j}\otimes y)=0$, which proves
$d_{\otimes}\leq\min(d_{1},d_{2})$. Conversely, assume by contradiction that
$w\in\mathcal{C}_{\otimes}$ is a non-zero code-word having Hamming weight
$d<\min(d_{1},d_{2})$. We can write $w$ as the sum of $d$ unit vectors,
$w=\sum_{\alpha=1}^{d}\textup{e}_{i(\alpha)}\otimes\textup{e}_{j(\alpha)}$.
The vectors $x_{\alpha}:=H_{1}\textup{e}_{i(\alpha)}$ are linearly
independent, since otherwise we could find a word of $\mathcal{C}_{1}$ with
Hamming weight less or equal to $d<d_{1}$. Similarly,
$y_{\alpha}:=H_{2}\textup{e}_{j(\alpha)}$ are linearly independent. By the
definition of tensor product, $\\{x_{\alpha}\otimes
y_{\beta}\\}_{\alpha,\beta}$ are linearly independent, which implies

$\displaystyle 0\neq\sum_{\alpha=1}^{d}x_{\alpha}\otimes
y_{\alpha}=\sum_{\alpha=1}^{d}H_{1}\textup{e}_{i(\alpha)}\otimes
H_{2}\textup{e}_{j(\alpha)}=(H_{1}\otimes H_{2})w$ (59)

contra the hypothesis that $w\in\mathcal{C}_{\otimes}$, hence we must have
$d_{\otimes}\geq\min(d_{1},d_{2})$.

###  A.3 Examples of asymmetric CSS product codes having
$d_{\ltimes}^{z}<d_{1}^{z}d_{2}^{z}$

Let us construct an asymmetric product CSS codes where the two base codes are
both the 9-qubit Shor code. The $X$ and $Z$ PCMs of the Shor code are given
by, respectively,

$\displaystyle H^{x}:=\left(\begin{array}[]{ccccccccc}1&1&1&1&1&1&0&0&0\\\
0&0&0&1&1&1&1&1&1\\\ \end{array}\right)\qquad
H^{z}:=\left(\begin{array}[]{ccccccccc}1&1&0&0&0&0&0&0&0\\\
0&1&1&0&0&0&0&0&0\\\ 0&0&0&1&1&0&0&0&0\\\ 0&0&0&0&1&1&0&0&0\\\
0&0&0&0&0&0&1&1&0\\\ 0&0&0&0&0&0&0&1&1\\\ \end{array}\right)$ (68)

and note that it is a CSS code having distances $d^{x}=3,d^{z}=3$ and pure
distances $\delta^{x}=3,\delta^{z}=2$; for instance, $Z^{\otimes 2}\otimes
I^{\otimes 7}$ (corresponding to the vector
$\textup{e}_{1}+\textup{e}_{2}\in\mathbb{F}_{2}^{9}$) is a weight 2
undetectable Pauli operator which acts as the identity on the logical
subspace. We define the asymmetric product CSS code
$\mathcal{C}_{\ltimes}^{\text{Shor}}$ via the PCMs:

$\displaystyle H^{x}_{\ltimes}=\begin{pmatrix}H^{x}&\otimes&I\\\
I&\otimes&H^{x}\end{pmatrix}\qquad
H^{z}_{\ltimes}=\Big{(}\\!\\!\begin{array}[]{ccc}H^{z}&\otimes&H^{z}\end{array}\\!\\!\Big{)}.$
(70)

The weight-$6$ Pauli-$Z$ operator associated to the vector

$\displaystyle
v^{z}:=(\textup{e}_{1}+\textup{e}_{2})\otimes(\textup{e}_{1}+\textup{e}_{4}+\textup{e}_{7})$
(71)

is as undetectable logical error for $\mathcal{C}_{\ltimes}^{\text{Shor}}$.
First, notice that
$H^{x}(\textup{e}_{1}+\textup{e}_{2})=H^{x}(\textup{e}_{1}+\textup{e}_{4}+\textup{e}_{7})=0$,
hence $v^{z}$ is undetected by $X$ parity checks, $H^{x}_{\ltimes}v^{z}=0$.
Second, let $u=e_{1}\otimes\sum_{i=1}^{9}e_{i}$, and note that
$H_{\ltimes}^{z}u=0$ while $u^{\\!\mathsf{T}}v^{z}=1$; therefore $v^{z}$ is
not a stabiliser,
$v^{z}\notin\operatorname{span}\\!\big{(}(H_{\ltimes}^{z})^{\\!\mathsf{T}}\big{)}$.
This shows that $d_{\ltimes}^{x}\leq 6<9=d_{1}^{x}d_{2}^{x}$.

The pattern can be extended as follows. Let

$H_{D}=\begin{pmatrix}1&1&0&0&\cdots&0&0\\\ 0&1&1&0&\cdots&0&0\\\
\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\\
0&0&0&0&\cdots&1&1\end{pmatrix}\in\mathbb{F}_{2}^{(D-1)\times
D}\;\;\;\;1_{D}=\begin{pmatrix}1\\\ 1\\\ \vdots\\\
1\end{pmatrix}\in\mathbb{F}_{2}^{D}$ (72)

The generalised code Shor$(D)$ has parity check matrices $H^{x}=H_{D}\otimes
1_{D}^{\\!\mathsf{T}}$, $H^{z}=I_{D}\otimes H_{D}$ and distances
$d^{x}=d^{z}=\delta^{x}=D$ and $\delta^{z}=2$. We then consider the asymmetric
product CSS code $\mathcal{C}_{\ltimes}^{\text{Shor}(D)}$ using again Eq.
(70). Let us consider the weight-$2D$ Pauli-$Z$ operator associated to the
vector $v^{z}:=e_{1}\otimes(e_{1}+e_{2})\otimes 1_{D}\otimes e_{1}$ as well as
the vector $u=e_{1}\otimes e_{1}\otimes e_{1}\otimes 1_{D}$. From
$H^{x}_{\ltimes}v^{z}=0$, $H^{z}_{\ltimes}u=0$, $u^{\\!\mathsf{T}}v^{z}=1$, we
see that $v^{z}$ is an undetected logical error, therefore the distance of
$\mathcal{C}_{\ltimes}^{\text{Shor}(D)}$ is upper bounded as
$d_{\ltimes}^{z}\leq 2D$.

###  A.4 Single-parity-check D-fold product CSS code distance:
$d_{\mathrm{SPC}(D,s)}=2^{D}$

We have shown in the main text that $\delta_{\mathrm{SPC}(D,s)}=2^{D}$, thus
$d_{\mathrm{SPC}(D,s)}\geq 2^{D}$. Here we show that there exist logical
errors of weight $2^{D}$, thus establishing $d_{\mathrm{SPC}(D,s)}\leq 2^{D}$.

We claim that the following vector corresponds to undetectable logical error
of weight $2^{D}$ for both $H_{\mathrm{SPC}(D)}^{x}$ and
$H_{\mathrm{SPC}(D)}^{z}$:

$\displaystyle w_{(D)}=\bigotimes_{\ell=1}^{D^{2}}a_{\ell}\qquad
a_{\ell}:=\begin{cases}u\,:=(1,1,\underbrace{0~{}\cdots~{}0}_{2(s-1)})^{\\!\mathsf{T}}&\text{for
}\ell=(i-1)D+i,\;i=1,\dots D\\\
\textup{e}_{1}:=(1,0)^{\\!\mathsf{T}}&\text{otherwise}\end{cases}$ (73)

For example, $w_{(2)}=u\otimes\textup{e}_{1}\otimes\textup{e}_{1}\otimes u$
and
$w_{(3)}=u\otimes\textup{e}_{1}\otimes\textup{e}_{1}\otimes\textup{e}_{1}\otimes
u\otimes\textup{e}_{1}\otimes\textup{e}_{1}\otimes\textup{e}_{1}\otimes u$.
The vector $w_{(D)}$ is a tensor product of $D$ copies of $u$ and of vectors
of Hamming weight one, hence it has weight $2^{D}$. Note that exactly one PCM
in the tensor products given in Eqs. (26) and (27) is in a position $\ell$ of
the form $(i-1)D+i$ and therefore we obtain
$H_{\mathrm{SPC}(D)}^{x}w_{(D)}=H_{\mathrm{SPC}(D)}^{z}w_{(D)}=0$. To see that
$w_{(D)}$ is not in the image of $(H_{\mathrm{SPC}(D)}^{x})^{\\!\mathsf{T}}$
or of $(H_{\mathrm{SPC}(D)}^{z})^{\\!\mathsf{T}}$ consider the vector

$\displaystyle v_{(D)}=\bigotimes_{\ell=1}^{D^{2}}b_{\ell}\qquad
b_{\ell}:=\begin{cases}\textup{e}_{1}:=(1,0,\underbrace{0~{}\cdots~{}0}_{2(s-1)})^{\\!\mathsf{T}}&\text{if
}\text{for }\ell=(i-1)D+i,\;i=1,\dots D\\\
u^{\prime}\,:=(1,1)^{\\!\mathsf{T}}&\text{otherwise}\end{cases}$ (74)

Now, note that
$H_{\mathrm{SPC}(D)}^{x}v_{(D)}=H_{\mathrm{SPC}(D)}^{z}v_{(D)}=0$ while
$w_{(D)}^{\\!\mathsf{T}}v_{(D)}=1$.

###  A.5 Meta-check distance for SPC(3, s) codes: $d_{M}=3$

We now show that for a SPC($3,s$) code the meta-check distance is exactly
$d_{M}=w_{c}=3$ and therefore it can be used to detect and locate one faulty
syndrome. Up to a permutation of the columns, the PCMs for both $X$ and $Z$
checks of the SPC($3,s$) have the form

$\displaystyle
H_{\mathrm{SPC}(3,s)}=\left(\begin{array}[]{ccccc}H_{s}&\otimes&I&\otimes&I\\\
I&\otimes&H_{s}&\otimes&I\\\ I&\otimes&I&\otimes&H_{s}\end{array}\right)$ (78)

where $H_{s}=(1\cdots 1)$ is the PCM associated to a $[8s,8s-1]$ SPC code. An
associated meta-check matrix can be constructed as the following block matrix:

$\displaystyle M_{\mathrm{SPC}(3,s)}=\left(\begin{array}[]{ccccc ccccc
ccccc}&&\\!\\!\\!\\!0&&&I&\otimes&1&\otimes&H_{s}&I&\otimes&H_{s}&\otimes&1\\\
1&\otimes&I&\otimes&H_{s}&&&\\!\\!\\!\\!0&&&H_{s}&\otimes&I&\otimes&1\\\
1&\otimes&H_{s}&\otimes&I&H_{s}&\otimes&1&\otimes&I&&&\\!\\!\\!\\!0&&\end{array}\right)$
(82)

and one can easily verify that $M_{\mathrm{SPC}(3,s)}H_{\mathrm{SPC}(3,s)}=0$.
The corresponding meta-check code $\mathcal{S}$ has distance three if and only
if all weight one errors $e\in\mathbb{F}_{2}^{192s^{2}}$ result in distinct
nonzero meta-syndrome outcomes
$M_{\mathrm{SPC}(3,s)}e\in\mathbb{F}_{2}^{24s}$. To show it, notice that for
any unit vectors $\textup{e}_{i},\textup{e}_{j}\in\mathbb{F}_{2}^{8s}$ we have
$(I\otimes H_{s}\otimes 1)(\textup{e}_{i}\otimes\textup{e}_{j}\otimes
1)=\textup{e}_{i}\otimes 1\otimes 1$ and similarly for other permutations of
the tensor components; note that $\textup{e}_{i}\otimes 1\otimes 1$ is
different from zero. It is then possible to determine from the position of the
non-zero entries of $M_{\mathrm{SPC}(3,s)}e$ whether the non-zero entry of the
error $e$ is located in the first, second or third block of $64s^{2}$ bits.
Supposing, without loss of generality, that the non-zero entry of $e$ is
located in one of the first $64s^{2}$ bits means that
$e=1\otimes\textup{e}_{i}\otimes\textup{e}_{j}$ for some values $i,j$. Then
the two meta-syndrome outcomes $(1\otimes I\otimes
H_{s})e=1\otimes\textup{e}_{i}\otimes 1$ and $(1\otimes H_{s}\otimes
I)e=1\otimes 1\otimes\textup{e}_{j}$ contain sufficient information to
determine the values $i,j$ and thus locate the position of the syndrome error.

##  Appendix B Quaternary belief propagation decoding of stabiliser codes

We describe an efficient implementation of quaternary BP decoding used in this
work. This is a message passing algorithm where information about the
likelihood of a Pauli error $\mathcal{P}=\\{I,X,Y,Z\\}$ on a qubit is
exchanged along the edges of a graph.

###  B.1 Preliminaries and notation

#### Stabiliser code representation

Let $\mathcal{S}=\\{S_{1},\ldots,S_{m}\\}$ be a set of generators of a
stabiliser group for a quantum linear code, where each generator is a
$n$-qubit Pauli operator, $S_{i}\in\mathcal{P}_{n}$. The set of generators
$\mathcal{S}$ can be specified via a matrix
$\mathrm{H}\in\mathbb{F}_{4}^{m\times n}$ where each matrix element
$\mathrm{H}_{i,j}$ is in
$\mathbb{F}_{4}=\\{\mathrm{I},\mathrm{X},\mathrm{Y},\mathrm{Z}\\}$ and in one-
to-one correspondence to a Pauli operator $\mathcal{P}=\\{I,X,Y,Z\\}$. The
rows of the matrix $\mathrm{H}$ correspond to different stabilisers while the
columns correspond to different physical qubits. The matrix $\mathrm{H}$ is
sufficient to fully specify a stabiliser code, in contrast with the notation
used in the rest of the paper where two binary matrices ($H^{x}$ and $H^{z}$)
are needed to define a CSS code.

#### Commutation and anti-commutation relations

We define an inner product
$\left\langle\cdot,\cdot\right\rangle:\mathbb{F}_{4}\times\mathbb{F}_{4}\rightarrow\mathbb{F}_{2}$
as

$\left\langle\cdot,\cdot\right\rangle$ | $\mathrm{I}$ | $\mathrm{X}$ | $\mathrm{Y}$ | $\mathrm{Z}$
---|---|---|---|---
$\mathrm{I}$ | 0 | 0 | 0 | 0
$\mathrm{X}$ | 0 | 0 | 1 | 1
$\mathrm{Y}$ | 0 | 1 | 0 | 1
$\mathrm{Z}$ | 0 | 1 | 1 | 0

i.e., the inner product $\langle\cdot,\cdot\rangle$ is equal to $0$ if the
corresponding Pauli matrices commute and is equal to 1 if the Pauli matrices
anti-commute. The commutativity of the stabiliser generators then translates
to

$\displaystyle\sum_{j=1}^{n}\left\langle\mathrm{H}_{i,j},\mathrm{H}_{k,j}\right\rangle=0\mod
2\qquad\forall\,i,k\in\\{1,\ldots,m\\}$ (83)

which generalises the CSS commutativity condition in Eq. (5). Similarly, given
a $n$-qubit Pauli error $E\in\mathcal{P}_{n}$ having associated a vector
$\mathrm{E}\in\mathbb{F}_{4}^{n}$, the corresponding syndrome outcomes
$s\in\mathbb{F}_{2}^{m}$ are obtained as

$\displaystyle
s_{i}=\sum_{j=1}^{n}\left\langle\mathrm{H}_{i,j},\mathrm{E}_{j}\right\rangle\mod
2\,.$ (84)

Let the set $\mathcal{Z}_{i,j}$ and $(\overline{\mathcal{Z}}_{i,j})$ be

$\displaystyle\mathcal{Z}_{i,j}:=\big{\\{}\,\mathrm{P}\in\mathbb{F}_{4}\,\big{|}\
\left\langle\mathrm{H}_{i,j},\mathrm{P}\right\rangle=0\big{\\}}\qquad\overline{\mathcal{Z}}_{i,j}:=\mathbb{F}_{4}\setminus\mathcal{Z}_{i,j}\,.$
(85)

In other words, $\mathcal{Z}_{i,j}$ ($\overline{\mathcal{Z}}_{i,j}$)
corresponds to the set of Pauli operators that stabiliser $S_{i}$ commutes
with (anti-commutes with) at qubit $j$.

#### Quantum Tanner graph representation

The code’s stabiliser matrix $\mathrm{H}$ can be represented as a quantum
Tanner graph, i.e., a labeled bipartite graph having two distinct sets of
vertices, called variable nodes (VNs) and check nodes (CNs), as well as a set
of $\mathbb{F}_{4}$-labeled edges connecting vertices of different types. VNs
are associated to physical qubits and CNs to stabiliser generators. An edge
connects a VN $\mathtt{v}_{j}$ to a CN $\mathtt{c}_{i}$ if and only if
$\mathrm{H}_{i,j}\in\mathbb{F}_{4}\setminus\\{\mathrm{I}\\}$. The edge label
corresponds to $\mathrm{H}_{i,j}$ (for $\mathrm{H}_{i,j}\neq\mathrm{I}$). The
set of neighbours of a VN $\mathtt{v}_{j}$ (or of a CN $\mathtt{c}_{i}$) is
denoted by $\mathcal{N}(\mathtt{v}_{j})$ ($\mathcal{N}(\mathtt{c}_{i})$). See
Figure 3 for a graphical representation.

#### Message passing

Decoding can be cast as passing messages between VNs and CNs along the edges
of the Tanner graph. In a successive manner, all CNs send messages to all the
neighbouring VNs, and all VNs exchange messages with all the neighbouring CNs
until a stopping criterion is reached. CNs and VNs process incoming messages
according to certain rules. Messages are (for instance) quaternary probability
vectors representing an estimate of the probability of a given value of
$\mathrm{E}_{j}$. However, the CN operations can be strongly simplified.
Observe that the inner product in (84) yields the same binary value for two
distinct values of $\mathrm{E}_{j}$, i.e.,
$\left\langle\mathrm{H}_{i,j},\mathrm{E}_{j}\right\rangle$ is zero for
$\mathrm{E}_{j}\in\mathcal{Z}_{i,j}$ and one for
$\mathrm{E}_{j}\in\overline{\mathcal{Z}}_{i,j}$. Hence, we can add up the
respective probabilities and apply the CN processing on a binary probability
vector.

#### Log-domain decoding

For numerical stability message passing decoders are often implemented using
logarithmic probabilities or their ratios referred to as log-likelihood ratios
(LLRs). For binary outcomes, with probability estimates $p_{0}$ and
$p_{1}=1-p_{0}$ we define the LLR as

$\displaystyle L=\log\frac{p_{0}}{p_{1}}.$ (86)

For quaternary outcomes with probabilities
$p_{\mathrm{I}},p_{\mathrm{X}},p_{\mathrm{Y}},p_{\mathrm{Z}}$ we define an LLR
vector as

$\displaystyle
l=\left(0,\log\frac{p_{\mathrm{X}}}{p_{\mathrm{I}}},\log\frac{p_{\mathrm{Y}}}{p_{\mathrm{I}}},\log\frac{p_{\mathrm{Z}}}{p_{\mathrm{I}}}\right).$
(87)

#### Conversions between binary and quaternary message passing

Consider a stabiliser $S_{i}$ and a qubit $j$ and let
$p=(p_{\mathrm{I}},p_{\mathrm{X}},p_{\mathrm{Y}},p_{\mathrm{Z}})$. Quaternary
messages from $\mathtt{v}_{j}$ to $\mathtt{c}_{i}$ are converted to binary
messages by computing $p_{1}$ as the sum of the probabilities associated to
operators in $\overline{\mathcal{Z}}_{i,j}$ and then $p_{0}=1-p_{1}$. Binary
messages from $\mathtt{c}_{i}$ to $\mathtt{v}_{j}$ are converted to quaternary
messages by equally splitting the probability $p_{1}$ among the operators in
$\overline{\mathcal{Z}}_{i,j}$ and equally splitting $p_{0}$ among the other
two Pauli operators (i.e., those in $\mathcal{Z}_{i,j}$). See Figure 3 for an
example. For conversion of quaternary to binary messages, we will make use of
the soft-max operator ($\operatorname*{max^{*}}$) which is defined as

$\displaystyle\operatorname*{max^{*}}(a,b):=$
$\displaystyle\,\log(\exp(a)+\exp(b))$ (88) $\displaystyle=$
$\displaystyle\,\max(a,b)+\log\left(1+\exp\left(-|a-b|\right)\right).$ (89)

The first expression makes it obvious that $\operatorname*{max^{*}}$ is
symmetric and associative, the second expression is the one that shall be used
for a numerically stable implementation.

###  B.2 Update rules

CN update rule in $\mathbb{F}_{2}$
---
VN update rule in $\mathbb{F}_{4}$
Figure 3: Example binary/quaternary inter-conversion in message passing for a
quantum Tanner graph having 7 VNs (qubits) and 3 CNs (stabiliser generators).
Edges transmitting messages to one CN $\mathtt{c}_{j}$ (top) and to one VN
$\mathtt{v}_{i}$ (bottom) are highlighted and the edges are labelled
(coloured) according to the Pauli operator measured by the stabiliser $S_{i}$
on qubit $j$.

Let us focus on iteration number $t$. An iteration consists in messages sent
from CNs to VNs followed by messages sent from VNs to CNs.

Let the message received by CN $\mathtt{c}_{i}$ from the VN $\mathtt{v}_{j}$
be $L_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}^{(t-1)}$. The message that the
CN $\mathtt{c}_{i}$ sends to VN $\mathtt{v}_{j}$,
$L_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t)}$, is obtained by using the
standard update rule for binary message passing decoders (embedding the
syndrome value $s_{i}$):

$\displaystyle L_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t)}$
$\displaystyle=(-1)^{s_{i}}\,2\tanh^{-1}\left(\prod_{j^{\prime}:\,\mathtt{v}_{j^{\prime}}\in\mathcal{N}(\mathtt{c}_{i})\setminus\mathtt{v}_{j}}\tanh\left(\frac{1}{2}L_{\mathtt{v}_{j^{\prime}}\rightarrow\mathtt{c}_{i}}^{(t-1)}\right)\right).$
(90)

######  Remark.

There are a manifold of approximations of the CN (CN) update rule in the
literature which permit a hardware-friendly implementation.

The LLR $L_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t)}$ is converted into
a quaternary LLR $l_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t)}$ for
further processing at the VNs:

$\displaystyle l_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t,\mathrm{P})}$
$\displaystyle=\begin{cases}0&\text{for }\mathrm{P}\in\mathcal{Z}_{i,j}\\\
-L_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}^{(t)}&\text{for
}\mathrm{P}\in\overline{\mathcal{Z}}_{i,j}\end{cases}$ (91)

where $\mathrm{P}\in\mathbb{F}_{4}$ indexes the values of the message. The VN
update operation is the standard one for quaternary message passing and yields
the error probability estimates

$\displaystyle l_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}^{(t)}$
$\displaystyle=\overline{l}_{j}+\sum_{i^{\prime}:\,\mathtt{c}_{i^{\prime}}\in\mathcal{N}(\mathtt{v}_{j})\setminus\mathtt{c}_{i}}{l}_{\mathtt{c}_{i^{\prime}}\rightarrow\mathtt{v}_{j}}^{(t)}$
(92)

where $\overline{l}_{j}$ is the channel message and is a $\mathrm{P}$-indexed
vector which depends on the channel model. For the depolarising noise in Eq.
(49) we have

$\displaystyle\overline{l}_{j}^{(\mathrm{P})}$
$\displaystyle=\begin{cases}0&\text{for }\mathrm{P}=\mathrm{I}\\\
\log\left(\frac{\epsilon}{3(1-\epsilon)}\right)&\text{for
}\mathrm{P}\in\mathbb{F}_{4}\setminus\\{\mathrm{I}\\}\end{cases}.$ (93)

######  Remark.

The evaluation of (92) can be simplified by avoiding to construct a quaternary
LLR vector $l^{(t)}_{\mathtt{c}_{i^{\prime}}\rightarrow\mathtt{v}_{j}}$. It is
sufficient to add its two non-zero elements to the respective elements of
$l^{(t)}_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}$ in (92).

Finally, we convert $l_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}^{(t)}$ to a
scalar LLR $L^{(t)}_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}$ that is given
as input the respective CN,

$\displaystyle L^{(t)}_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}$
$\displaystyle=\operatorname*{max^{*}}_{\mathrm{P}\in\mathcal{Z}_{i,j}}(l_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}^{(t,\mathrm{P})})-\operatorname*{max^{*}}_{\mathrm{P}\in\overline{\mathcal{Z}}_{i,j}}(l_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}^{(t,\mathrm{P})}).$
(94)

###  B.3 Initialization and final decision

We give the message from VN $\mathtt{v}_{j}$ to CN $\mathtt{c}_{i}$ at the
beginning of the very first decoding iteration. We have

$\displaystyle l^{(0)}_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}$
$\displaystyle=\overline{l}_{j}$ (95)

and from (94) we obtain

$\displaystyle L^{(0)}_{\mathtt{v}_{j}\rightarrow\mathtt{c}_{i}}$
$\displaystyle=\log\left(\frac{3-2\epsilon}{2\epsilon}\right).$ (96)

A hard decision $\hat{\mathrm{E}}_{j}$ on the value of $\mathrm{E}_{j}$ is
made according to

$\displaystyle\hat{\mathrm{E}}_{j}$
$\displaystyle=\operatorname*{argmax}~{}\left(\overline{l}_{j}+\sum_{i:\mathtt{c}_{i}\in\mathcal{N}(\mathtt{v}_{j})}{l}_{\mathtt{c}_{i}\rightarrow\mathtt{v}_{j}}\right).$
(97)

Recall that for convenience the elements of quaternary LLR are indexed by
$t\in\mathbb{F}_{4}$. The decoder returns this hard decision after a maximum
number of decoding iterations is reached or when the estimated error vector
$\hat{\mathrm{E}}$ satisfies all parity-checks.

## References

  * [1] Peter Elias.  Error-free coding.  Trans. IRE Professional Group on Inf. Theory, 4(4):29–37, 1954\.
  * [2] Jack K Wolf.  On codes derivable from the tensor product of check matrices.  IEEE Transactions on Information Theory, 11(2):281–284, 1965.
  * [3] Hideki Imai and Hiroshi Fujiya.  Generalized tensor product codes.  IEEE Transactions on Information Theory, 27(2):181–187, 1981.
  * [4] Jihao Fan, Yonghui Li, Min-Hsiu Hsieh, and Hanwu Chen.  On quantum tensor product codes.  arXiv:1605.09598, 2016.
  * [5] Daniel Gottesman.  Stabilizer codes and quantum error correction.  PhD thesis, California Institute of Technology, 1997.
  * [6] Jean-Pierre Tillich and Gilles Zémor.  Quantum LDPC codes with positive rate and minimum distance proportional to the square root of the blocklength.  IEEE Transactions on Information Theory, 60(2):1193–1202, 2013\.
  * [7] Sergey Bravyi and Matthew B Hastings.  Homological product codes.  In Proceedings of the forty-sixth annual ACM symposium on Theory of computing, pages 273–282, 2014.
  * [8] Armanda O Quintavalle, Michael Vasmer, Joschka Roffe, and Earl T Campbell.  Single-shot error correction of three-dimensional homological product codes.  PRX Quantum, 2(2):020340, Jun 2021.
  * [9] Pavel Panteleev and Gleb Kalachev.  Degenerate quantum LDPC codes with good finite length performance.  Quantum, 5:585, 2021.
  * [10] Nikolas P Breuckmann and Jens N Eberhardt.  Balanced product quantum codes.  IEEE Transactions on Information Theory, 67(10):6653–6674, 2021\.
  * [11] Pavel Panteleev and Gleb Kalachev.  Asymptotically good quantum and locally testable classical LDPC codes.  In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 375–388, 2022.
  * [12] Nikolas P Breuckmann and Jens N Eberhardt.  Quantum low-density parity-check codes.  PRX Quantum, 2(4):040101, 2021.
  * [13] Morteza Hivadi.  On quantum SPC product codes.  Quantum Information Processing, 17(12):1–14, 2018.
  * [14] Robert Calderbank and Peter W Shor.  Good quantum error-correcting codes exist.  Physical Review A, 54(2):1098, 1996.
  * [15] Andrew M Steane.  Error correcting codes in quantum theory.  Physical Review Letters, 77(5):793, 1996.
  * [16] William Wesley Peterson, Wesley Peterson, Edward J Weldon, and Edward J Weldon.  Error-correcting codes.  MIT press, 1972.
  * [17] Jack K Wolf.  An introduction to tensor product codes and applications to digital storage systems.  In 2006 IEEE Information Theory Workshop-ITW’06 Chengdu, pages 6–10. IEEE, 2006.
  * [18] Panos Aliferis and John Preskill.  Fault-tolerant quantum computation against biased noise.  Physical Review A, 78(5):052331, 2008.
  * [19] John M Martinis.  Superconducting phase qubits.  Quantum information processing, 8(2):81–103, 2009.
  * [20] Jérémie Guillaud and Mazyar Mirrahimi.  Repetition cat qubits for fault-tolerant quantum computation.  Physical Review X, 9(4):041053, 2019.
  * [21] Christopher Chamberland, Kyungjoo Noh, Patricio Arrangoiz-Arriola, Earl T Campbell, Connor T Hann, Joseph Iverson, Harald Putterman, Thomas C Bohdanowicz, Steven T Flammia, et al.  Building a fault-tolerant quantum computer using concatenated cat codes.  PRX Quantum, 3(1):010329, 2022.
  * [22] David JC MacKay, Graeme Mitchison, and Paul L McFadden.  Sparse-graph codes for quantum error correction.  IEEE Transactions on Information Theory, 50(10):2315–2330, 2004\.
  * [23] Markus Grassl.  Bounds on the minimum distance of linear codes and quantum codes.  Online available at http://www.codetables.de, 2007.  Accessed on 2022-09-26.
  * [24] Anthony Leverrier and Gilles Zémor.  Quantum Tanner codes.  arXiv:2202.13641, 2022.
  * [25] Shouzhen Gu, Christopher A. Pattison, and Eugene Tang.  An efficient decoder for a linear distance quantum LDPC code.  arXiv:/2206.06557, 2022.
  * [26] Anthony Leverrier and Gilles Zémor.  Efficient decoding up to a constant fraction of the code length for asymptotically good quantum codes.  arXiv:2206.07571, 2022.
  * [27] Irit Dinur, Min-Hsiu Hsieh, Ting-Chun Lin, and Thomas Vidick.  Good quantum LDPC codes with linear time decoders.  arXiv:2206.07750, 2022.
  * [28] Anthony Leverrier and Gilles Zémor.  A parallel decoder for good quantum LDPC codes.  arXiv:2208.05537, 2022.
  * [29] Irit Dinur, Shai Evra, Ron Livne, Alexander Lubotzky, and Shahar Mozes.  Locally testable codes with constant rate, distance, and locality.  arXiv:2111.04808, 2021.
  * [30] Masahito Hayashi.  Quantum information.  Springer, 2006.
  * [31] Nicolas Delfosse and Gilles Zémor.  Linear-time maximum likelihood decoding of surface codes over the quantum erasure channel.  Phys. Rev. Research, 2:033042, Jul 2020.
  * [32] Dimiter Ostrev.  QKD parameter estimation by two-universal hashing.  arXiv:2109.06709, 2021.
  * [33] David Poulin and Yeojin Chung.  On the iterative decoding of sparse quantum codes.  arXiv:0801.1241, 2008.
  * [34] Zunaira Babar, Panagiotis Botsinis, Dimitrios Alanis, Soon Xin Ng, and Lajos Hanzo.  Fifteen years of quantum LDPC coding and improved decoding strategies.  iEEE Access, 3:2492–2519, 2015.
  * [35] Joschka Roffe, David R White, Simon Burton, and Earl Campbell.  Decoding across the quantum low-density parity-check code landscape.  Physical Review Research, 2(4):043423, 2020.
  * [36] Javier Valls, Francisco Garcia-Herrero, Nithin Raveendran, and Bane Vasić.  Syndrome-based min-sum vs OSD-0 decoders: FPGA implementation and analysis for quantum LDPC codes.  IEEE Access, 9:138734–138743, 2021.
  * [37] Julien du Crest, Mehdi Mhalla, and Valentin Savin.  Stabilizer inactivation for message-passing decoding of quantum LDPC codes.  arXiv:2205.06125, 2022.
  * [38] Kosuke Fukui, Akihisa Tomita, Atsushi Okamoto, and Keisuke Fujii.  High-threshold fault-tolerant quantum computation with analog quantum error correction.  Physical review X, 8:021054, May 2018.
  * [39] Christopher A Pattison, Michael E Beverland, Marcus P da Silva, and Nicolas Delfosse.  Improved quantum error correction using soft information.  arXiv:2107.13589, 2021.
  * [40] Nithin Raveendran, Narayanan Rengaswamy, Asit Kumar Pradhan, and Bane Vasić.  Soft syndrome decoding of quantum ldpc codes for joint correction of data and syndrome errors.  arXiv:2205.02341, 2022.
  * [41] Daniel Gottesman.  Theory of fault-tolerant quantum computation.  Physical Review A, 57(1):127–137, Jan 1998.
  * [42] Daniel Gottesman.  An introduction to quantum error correction and fault-tolerant quantum computation.  In Quantum information science and its contributions to mathematics, Proceedings of Symposia in Applied Mathematics, volume 68, pages 13–58, 2010.
  * [43] Craig Gidney.  Stim: a fast stabilizer circuit simulator.  Quantum, 5:497, 2021.
  * [44] Oscar Higgott and Nikolas P Breuckmann.  Improved single-shot decoding of higher dimensional hypergraph product codes.  arXiv:2206.03122, 2022.
  * [45] Daniel Barredo, Sylvain De Léséleuc, Vincent Lienhard, Thierry Lahaye, and Antoine Browaeys.  An atom-by-atom assembler of defect-free arbitrary two-dimensional atomic arrays.  Science, 354(6315):1021–1023, 2016.
  * [46] Christian Gross and Immanuel Bloch.  Quantum simulations with ultracold atoms in optical lattices.  Science, 357(6355):995–1001, 2017.
  * [47] Frank Arute, Kunal Arya, Ryan Babbush, Dave Bacon, Joseph C Bardin, Rami Barends, Rupak Biswas, Sergio Boixo, Fernando GSL Brandao, David A Buell, et al.  Quantum supremacy using a programmable superconducting processor.  Nature, 574(7779):505–510, 2019.
  * [48] Philip C Holz, Silke Auchter, Gerald Stocker, Marco Valentini, Kirill Lakhmanskiy, Clemens Rössler, Paul Stampfer, Sokratis Sgouridis, Elmar Aschauer, Yves Colombe, et al.  2d linear trap array for quantum information processing.  Advanced Quantum Technologies, 3(11):2000031, 2020.
  * [49] Yulin Wu, Wan-Su Bao, Sirui Cao, Fusheng Chen, Ming-Cheng Chen, Xiawei Chen, Tung-Hsun Chung, Hui Deng, Yajie Du, Daojin Fan, et al.  Strong quantum computational advantage using a superconducting quantum processor.  Physical review letters, 127(18):180501, 2021.
  * [50] Franco Chiaraluce and Roberto Garello.  Extended hamming product codes analytical performance evaluation for low error rate applications.  IEEE Transactions on Wireless Communications, 3(6):2353–2361, 2004\.
  * [51] Raphaël Le Bidan, Camille Leroux, Christophe Jego, Patrick Adde, and Ramesh Pyndiah.  Reed-Solomon turbo product codes for optical communications: From code optimization to decoder design.  EURASIP Journal on Wireless Communications and Networking, 2008:1–14, 2008.
  * [52] Husameldin Mukhtar, Arafat Al-Dweik, and Abdallah Shami.  Turbo product codes: Applications, challenges, and future directions.  IEEE Communications Surveys & Tutorials, 18(4):3052–3069, 2016\.
  * [53] Zhaoyi Li, Isaac Kim, and Patrick Hayden.  Concatenation schemes for topological fault-tolerant quantum error correction.  arXiv:2209.09390, 2022.
  * [54] Nithin Raveendran, Narayanan Rengaswamy, Filip Rozpędek, Ankur Raina, Liang Jiang, and Bane Vasić.  Finite rate QLDPC-GKP coding scheme that surpasses the CSS Hamming bound.  Quantum, 6:767, 2022.
  * [55] ChunJun Cao and Brad Lackey.  Quantum Lego: building quantum error correction codes from tensor networks.  PRX Quantum, 3(2):020332, 2022.
  * [56] Narayanan Rengaswamy, Robert Calderbank, Henry D Pfister, and Swanand Kadhe.  Synthesis of logical Clifford operators via symplectic geometry.  In 2018 IEEE International Symposium on Information Theory (ISIT), pages 791–795. IEEE, 2018.
  * [57] Sergey Bravyi and Alexei Kitaev.  Universal quantum computation with ideal clifford gates and noisy ancillas.  Physical Review A, 71(2):022316, 2005.
  * [58] Daniel Litinski.  Magic state distillation: Not as costly as you think.  Quantum, 3:205, 2019.

  *[CN]: