# 5 qubit codewords definition in terms of operators: Mermin

Book: Quantum computer science by David Mermin Chapter:5 Page-118

The 5-Qbit codewords are most clearly and usefully defined in terms of the $$M_{i}$$ (rather than writing out their lengthy explicit expansions in computational-basis states):

\begin{aligned}| \overline{0}\rangle =\dfrac{1}{4}\left( 1+M_{0}\right) \left( 1+M_{1}\right) \left( 1+M_{2}\right) \left( 1+M_{3}\right) | 00000\rangle \\ \end{aligned} This is how the operators to project the state to the eigenspace with Eigenvalues +1 or - 1.But then what is this denoting?.

When I say that, what is this denoting, I mean to ask what exactly is happening in terms of error detection and then correction. After asking this question, I have realized that whole point of denoting that 5 qubit codeword can be realized by this expression is too much.I think this equation just proves the point that the state all zeros can be thought as an eigenstate of this operator.

Correct me if I am wrong. (if my understanding is wrong)

But then what’s the point? Yes now all the error is having different eigen value based on the individual operator which gives us the error syndromes but how do we find this magical operators in the first place?

• Can you try and better explain/state your question? I am a bit lost by 'But then what is this denoting'.
– JSdJ
Feb 14, 2021 at 15:20
• @ JSdJ. Thanks. I will. I will update the post now. Feb 14, 2021 at 15:37
• @JSdJ I have edited now but can you tell me if I understand it right? Feb 14, 2021 at 15:50

When I say that, what is this denoting, I mean to ask what exactly is happening in terms of error detection and then correction. After asking this question, I have realized that whole point of denoting that 5 qubit codeword can be realized by this expression is too much.I think this equation just proves the point that the state all zeros can be thought as an eigenstate of this operator.

Okay, so I am not sure if I have properly understood everything that you are asking, but let me try to shed some light.

The state $$|\overline{0}\rangle$$ is some $$5$$-qubit state. We use the $$\overline{0}$$ label to indicate two things:

• The bar/line over the $$0$$ indicates that this is a logical qubit. It is a combination of multiple (physical) qubits, were we restrict the 'valid' states to be only a subset of all different quantum states that the physical qubits can take together. In this case, there are $$5$$ physical qubits, so there are $$2^{5} = 32$$ different states*. We only pick two out of these $$32$$, and say that they are the two states of our logical qubit, which of course has two states, because, well, it is a qubit.
• The $$0$$ itself indicates that we have chosen this state to be the logical $$0$$ - of course there should also be a logical $$1$$, and together they make the logical qubit. The state being labelled $$0$$ does not, in principle, have anything to do with the physical-qubits-state $$|00000\rangle$$, but in this case there is a weak correlation, as pointed out by your equation - a little more on that later.

So, the question is now, how do we choose this subset? It turns out, it is extremely useful to choose this subset implicitly, by saying that it is the set of states which are in the $$+1$$ eigenspaces of a list of distinct operators on the physical qubits - we call this the shared ($$+1$$) eigenspace of these operators.

Any of these operators has a $$+1$$ and a $$-1$$ eigenspace - which are equally large; and for the code's sake we only care about the $$+1$$ eigenstates. Any time I add an extra operator, it hacks the space of valid states in half; I want $$2$$ out of $$32$$ states to be valid, so I need to add $$4$$ operators - for the $$5$$-qubit code, these operators are $$M_{0},M_{1},M_{2},M_{3}$$.

If I want to work out what these states actually are, I can use a little trick - I take whatever state from my $$5$$-qubit space, and I project that state on all eigenspaces one after another. The projector upon the $$+1$$ eigenspace of an operator $$M$$ is $$P_{M} = \frac{1}{2}(I+M)$$. So, if I make the - more or less arbitrary - choice of starting with $$|00000\rangle$$, a valid state of my logical qubit is:

$$\frac{1}{2^{4}}(I+M_{0})(I+M_{1})(I+M_{2})(I+M_{3})|00000\rangle,$$

which, for the $$5$$-qubit code, is not the same as $$|00000\rangle$$. That means that $$|00000\rangle$$ is not an eigenstate of the above operator, and therefore that it is not a valid state of the code.

But then what’s the point? Yes now all the error is having different eigen value based on the individual operator which gives us the error syndromes

The point, for many people, is that this framework allows us to understand everything that is happening with there errors only in terms of those operators, which together form the stabilizer of this code. For any error's action we don't actually have to work out the code states and how they are affected, we can just infer everything interesting that there is to know from their relations with the stabilizer operators. A $$5$$-qubit code has codewords in a space of $$32$$ elements, but this of course scales very quickly. If I have $$20$$ physical qubits to make a logical qubit, the qubit states are in a space of $$2^{20}$$ elements, so even writing down a single codeword takes a long time. But using this operator framework, I only need to keep track of $$19$$ operators.

but how do we find this magical operators in the first place?

Well, yeah, that is the million dollar question. Designing codes can be all about finding operators that have good properties. There are ways where you can, for instance, create quantum codes from classical linear codes, known as CSS codes, but that is definitely not the only way to come up with these things.

*I'm implicitly only counting basis states here, where I do not actually choose the basis, but just know that there will be $$32$$ elements in that basis. Of course there are many more superpostitions, but we don't care about that currently.

• +1 for bursting one of my misconception that $|00000\rangle$ is not an eigen state of that operator. Feb 14, 2021 at 16:41
• You're welcome; does this actually answer your question(s), or is there something missing?
– JSdJ
Feb 14, 2021 at 21:08
• Ah sorry. I accepted. Feb 14, 2021 at 21:20