# Knill-Laflamme error correction conditions for codespace of dimension 1

The Knill-Laflamme theorem for the conditions of quantum error correction can be stated as follows:

Let $$\mathcal{C}$$ be a quantum error correcting code defined as a subspace of the $$n$$ qubit Hilbert space, $$\mathcal{H}_2^{\otimes n}$$, and let $$\mathcal{E} \subset \mathbb{C}^{2^n\times2^n}$$ be a set of errors. Then $$\mathcal{C}$$ can correct $$\mathcal{E}$$ if and only if $$\langle\psi_i|E_a^\dagger E_b|\psi_j\rangle = c_{ab}\delta_{ij} ,$$ where $$E_a$$, $$E_b$$ $$\in \mathcal{E}$$ and {$$|\psi_i\rangle$$} is a base for the codespace $$\mathcal{C} \subset \mathcal{H}_2^{\otimes n}$$.

I know this might sound a bit silly, but what if the codespace $$\mathcal{C}$$ has dimension 1? Then the condition above reduces to $$\langle\psi_0|E_a^\dagger E_b|\psi_0\rangle = c_{ab}$$ which is only a single condition for each choice of $$E_a, E_b$$ and so can easily be satisfied by taking $$c_{ab}:= \langle\psi_0|E_a^\dagger E_b|\psi_0\rangle$$. Does that mean a code with codespace of dimension $$1$$ corrects every error?

It seems like the answer should be yes, you can correct any error, because you can just take whatever the result of your computation was and just replace it with $$|\psi_0 \rangle$$.

Update: The first answers to the question How to calculate distance of $k=0$ stabilizer code? seem to imply that every $$K=1$$ code ($$k=0$$ for a stabilizer code) should be regarded as having infinite distance since we are taking a minimum over an empty set, the set of weights of errors the preserve the codespace but act nontrivially on it (there are no such errors when $$K=1$$). Is this perspective that $$K=0$$ implies $$d = \infty$$ standard?

By contrast, the second answer says that:

"In the classic paper https://arxiv.org/pdf/quant-ph/9608006.pdf, on page 10, the distance of an $$[n,0]$$ code is defined as the smallest non-zero weight of any stabilizer in the code. The physical interpretation for this definition given is, "An $$[[n, 0, d]]$$ code is a quantum state such that, when subjected to a decoherence of $$[(d − 1)/2]$$ coordinates, it is possible to determine exactly which coordinates were decohered."

which would imply that assigning some sort of finite distance is useful/meaningful. I believe that this second notion of distance also coincides with what you get if you use the weight enumerator definition of distance enumerators polynomials and distance for a quantum error correcting code

Similar question here Distance of one dimensional quantum error correcting code