# Does a $[\![3,1,2]\!]$ code exist?

Is it possible to encode a single logical qubit in 3 physical qubits so that the resulting code has distance 2?

In other words, does a $$[\![3,1,2]\!]$$ code exist?

• No $$[\![3,1,2]\!]$$ stabilizer code exists. This simple argument is given for example below equation (14) in https://arxiv.org/abs/quant-ph/0512170. In general it shows that no $$[\![2n+1,2n-1,2]\!]$$ stabilizer code exists.

• No $$[\![3,1,3]\!]$$, $$[\![3,2,2]\!]$$, or $$[\![2,1,2]\!]$$ code exists; this follows from the quantum singleton bound $$n-k\geq 2(d-1).$$

• There is a well known $$[\![4,2,2]\!]$$ stabilizer code with stabilizer $$XXXX,ZZZZ$$. This is the smallest known quantum code with $$d \geq 2$$.

No, there is no $$[\![3,1,2]\!]$$ code.

## Background

As in classical error correction, existence of quantum codes can often be ruled out using a range of inequalities that codes must satisfy. Indeed, the question already makes use of the singleton bound to rule out existence of similar codes. Below, I will use equations and inequalities in theorem $$10$$ on page $$7$$ in Quantum shadow enumerators. The paper derives the quantum analogue of the shadow of a classical binary code and uses it to extend the results in Quantum MacWilliams Identities which in turn derives quantum versions of MacWilliams identities relating the weight distribution of a code $$C$$ and its dual $$C^\perp$$.

## No $$[\![3,1,2]\!]$$ code exists

Theorem $$10$$ lists a few equations and ineqalities that relate weights$$^1$$ $$A_i$$ and $$B_i$$ and shadow weights$$^2$$ $$S_i$$ for $$i=0,\dots,n$$ to each other and to the parameters of the code $$[\![n,k,d]\!]=(\!(n,K=2^k,d)\!)$$. If the code exists, then the relations are satisfied. Suppose then that there is a code $$[\![3,1,2]\!]=(\!(3,2,2)\!)$$. We will use equations and inequalities in theorem $$10$$ to derive a contradiction. It is sufficient to compute $$A_0,\dots,A_3$$, $$B_0$$, $$B_1$$ and $$S_0$$ since at this point we will obtain a contradiction with one of the inequalities - namely, $$S_0\ge 0$$ - proving that no $$[\![3,1,2]\!]$$ code exists.

First, we compute Krawtchouk polynomials $$P_i(x):=P_i(x,n=3)$$

\begin{align} P_0(x)&=1\\ P_1(x)&=9-4x. \end{align}\tag1

We won't need $$P_2(x)$$ and $$P_3(x)$$. Next, we use the polynomials to write down equations for $$B_0$$, $$B_1$$ and $$S_0$$ in terms of $$A_i$$

\begin{align} 8B_0 &= A_0+A_1+A_2+A_3\\ 8B_1 &= 9A_0+5A_1+A_2-3A_3\\ 8S_0 &= A_0-A_1+A_2-A_3. \end{align}\tag2

Now, by the first relation in theorem $$10$$, we have $$A_0=K^2=4$$ and by the fourth one $$2B_0=A_0$$ and $$2B_1=A_1$$. Substituting into $$(2)$$, we obtain

\begin{align} A_1+A_2+A_3&=12\\ A_1+A_2-3A_3&=-36 \end{align}\tag3

so $$A_1+A_2=0$$ and $$A_3=12$$. However, from the second relation in theorem $$10$$, we know that $$A_1\ge 0$$ and $$A_2\ge 0$$, so $$A_1=A_2=0$$. But then $$S_0=-1$$ and we arrive at a contradiction with the last relation in theorem $$10$$, namely $$S_0\ge 0$$. Therefore, no code $$[\![3,1,2]\!]$$ exists.

$$^1$$ For definition of $$A_i$$ and $$B_i$$ see discussion on page $$2$$ in Quantum shadow enumerators.
$$^2$$ For definition of $$S_i$$ see theorem $$4$$ on page $$4$$ in Quantum shadow enumerators and preceding discussion.

• Nice! The shadow enumerators paper, below theorem 10, mentions the bounds in the GF(4) paper arxiv.org/abs/quant-ph/9608006. The GF(4) paper has a table, made from the same type of inequalities used in your answer, with bounds on maximum distance given $n$ and $k$ (the table was originally meant for additive codes, but it turns out the bounds are valid for all codes, except where they are marked by $\beta$ in which case the bound is +1 for the non-additive case). In particular, the table states that every $[[3,1,d]]$ code is $d=1$, confirming what you have worked out above. Aug 5 at 12:59