# Who is responsible for implementing quantum error correction?

There are various options for error correction. For example, the Shore code or a whole class of surface codes.

But I don't really understand at what level they should be implemented.

For example, I have any circuit that implements an algorithm that requires 3 qubits. A quantum computer has at least 27 qubits. Therefore, I can use the Shore code to correct errors, because the 9-qubit Shore code corrects any errors.

To start correcting the errors, I need to allocate 3 logical qubits at the upper level (the level of creating the algorithm) and 27 physical qubits at the lower level.

Thus, after each operation (for example, after operation H) on one logical qubit, I have to insert an implementation of the Shore code. Do I understand correctly? But won't it create a lot more errors (because every statement has an error)?

• is it "shor" code not shore code? May 12, 2021 at 4:36
• @kodlu I meant that Shor's code is Shore's code. In various sources, I have seen both. May 12, 2021 at 9:58
• @alexhak Then the sources that have "Shore" got it wrong and you should probably not trust anything else they say. This is after Peter Shor, the same person who wrote the famous Shor algorithm for factoring numbers, and there's really no confusion on how that should be spelled if they know the first thing about quantum computing. Mar 14 at 17:12

A error correction mechanism (or error mitigation) is needed to lower the perceived noise. To do so, you apply the error correction procedure at a "lower" level than the level you use to perform the computation. Lower level means the qubits used to describe the code are closer to the physical implementation, while the qubits you use to perform the computation are the logical qubits that the code exposes.

To perform error correction, you should not decode anything (by that I mean do the inverse of the encoding operation) as that would put you logicial (precious) information directly back onto the less protected physical qubits.

Error correction is performed by making appropriate measurements to reveal the syndrome of the error. From this syndrome, you can then use several algorithms to recover the likely error that affected your physical qubits and correct its effect.

As you mentionned, this whole procedure is not guaranteed to give good performance as manipulating the physical qubits (to perform the syndrome measurements and the correction) might just mess it up more. Yet, by doing this carefully -- that's the whole point of fault-tolerance -- you can pile up several level of such scheme and if the physical errors are low enough, each level reduces the overall error leaving you at the very top with logical qubits that are essentially error-free.

One last thing: here you didn't implement any useful transformation on the logical qubits (ie computation). For the whole scheme to work, you also need to be able to manipulate the logical qubits without having to decode them as it would expose your precious quantum information again to the high error rate of physical qubits. This is also the focus of fault-tolerant quantum computing.

Right now, experimental system are struggling to achieve the low error rates needed to perform a layer of FTQC encoding, not to mention the high number of physical qubits that are needed to perform several such layers.

So, if you implement the 9-qubit Shor code, this will result in increased error rates while decreasing the number of available qubits to perform useful computation by a factor 9. So if you are doing it as an exercise to see what happens, that's great. If you try to mitigate errors for performing a useful QC, then you should look to some other technique taylored to your problem to mitigate the effect of noise.

Cheers.

• Thanks! Yes, I do it as an exercise. That is, in our case, we should consider the entire algorithm wrapped in the Shor's code as a noise channel? And how, without decoding, can we detect and fix the error? I assume that you mean using two more additional qubits (ancillas) to take a measurement from them. But in this case, instead of 9 physical qubits, we will need 11. May 12, 2021 at 14:40
• yes you would need additional ancillaes to perform syndrome measurement.
– holl
May 12, 2021 at 21:16

If your operations are too noisy, then, yes, this circuit will be more noisy than just computing with single, unencoded, qubits. This is the point of the "fault-tolerant threshold". It tells you that if your per-qubit error rate is lower than some threshold value, each level of error correction progressively reduces the noise. Current estimates for the fault-tolerant threshold are somewhere around 1%.

That said, you shouldn't really be decoding if you can avoid it (you usually can). You should do everything on the encoded qubit.

• Thanks! That is, in our case, we should consider the entire algorithm wrapped in the Shor's code as a noise channel? And how, without decoding, can we detect and fix the error? I assume that you mean using two more additional qubits (ancillas) to take a measurement from them. But in this case, instead of 9 physical qubits, we will need 11. May 12, 2021 at 14:43
• Yes, you need a few ancillas to do syndrome extraction. May 12, 2021 at 15:22