# In error correction code why don't we imitate the Hamming code instead of the complicated Steane code?

Instead of the complicated Steane code, I don't understand why don't we use a much simpler and exact imitation of the classical Hamming code.

So here is my idea: Let's have 7 qubits, and we will encode our qubit in the last wire. Based on this we will create CNOTs gates which will fix the parity of the code. The control would be qubit 1, 2, 4 just like classical code. This is all exactly like classical code.

Then to decode it, you can create 3 ancillas which simply read/copy the values of 1, 2, 4 qubits. So for now, just like classical qubits, you have the value specified in the three ancillas indicating where the error is.

All that remains to be done is performing a partial measurement of the three ancillas to just get the index of the error. The rest is unchanged.

So what's the problem with this? What is the point of creating categories of even codes and odd ones and collapsing into them like in Steane code?

• It's not clear what procedure you're describing. Please specify encode/decode circuits. The most likely mistake is that you're detecting Z errors but not X errors. Mar 11, 2019 at 0:01
• No, X errors. But even if I detected Z errors doesn't it entail X errors as well after hadamard rotation?? Basically I don't understand why is the Steane code ought to be so much different than the classical Hamming code. I want them to be very similar, so why do we first have to prepare a 0+1 state as 0000000+0000111? My idea is to simply encode the state like we do in classical. So the xors are performed between 1,2,4 and the rest. To decode we simply partially measure 1,2,4 and get result just like classical Hamming. Thank! Mar 11, 2019 at 1:02
• I still don't understand what code you are describing. You're just repeating the words from the post. You need to specify an encoding/decoding circuit pair. Mar 11, 2019 at 18:14
• Well, I don't explain much because my point is to imitate exactly the Hamming code with just one twist. So you encode it regularly, so that you keep it with pairity of zero which is the ideal . Then, when decoding, you add 3 ancilas and copy to them the three pairity-check-qubits 1,2,4 intitiated to |0>. Then, what happens after copying is, that your code has switched from V times 000 into V times Hv. When H is the standard Hamming. So then you can easily perform a partial measurement on these ancilas if you got 000 then no error, if somth else, then you got an error. Mar 11, 2019 at 22:26
• My point is , why do we need the two codes specifying even codes and odd ones? In any case even if my sent qubit is in superposition it would collapse when the space collapses to either even or odd. So why don't just imitate the Hamming as I showed? Mar 11, 2019 at 23:40