# Where does the "correction" in quantum error correction occur, specifically when using repetition codes?

I'm reading the part of the qiskit textbook that deals with this (https://qiskit.org/textbook/ch-quantum-hardware/error-correction-repetition-code.html) and so far it seems as though they're just protecting from errors using repetitions.

In the article they spoke a bit about detecting the errors using syndrome measurements, so I thought the next step would be correcting them....but then they went on to speak about lookup table decoder and majority voting to understand the output

So where exactly does the correcting of the errors (identified using syndrome measurements) occur? Can someone clear this up for me please

For surface codes, the syndrome measurements collapse the errors into either being $$X$$ or $$Z$$ errors. All Clifford gates have easy-to-compute commutation relations with $$X$$ and $$Z$$ gates. So the idea is not to actually correct the errors, since that would require more quantum operations which are difficult and error-prone, but to simply track the errors and use them to adjust how results are interpreted at the end.

As an example, suppose we have a simple circuit that applies an $$H$$ gate to a qubit and then measures the qubit in the $$Z$$-basis. If we measure a $$Z$$ error just before the $$H$$ gate, and no other errors, then we know that $$HZ=XH$$, so this is the same as having an $$X$$ error after the $$H$$ gate. Thus, if we measure a 0, then we know that the actual result was 1, because the $$X$$ error would flip the output.

I didn't read the qiskit article carefully so I'm not sure, but my guess is that they are thinking of something similar.

• Thanks so much much, this helped a bit. It turns out that the 'correction' I was looking for is actually the 'decoding process' of looking at majority voting to determine the output. So it was there all along, I just didnt realize Oct 6 at 20:35