Active error correction is usually described as a three-step process -- measuring syndromes, decoding the error, and applying the correcting operator. There seem to be alternatives to this approach, such as self-correcting dissipative memories. I will now describe an error correction procedure that is basically unitary. My questions will be if this procedure has a name, can be generalized or could be useful.

Consider the following circuit

enter image description here

One can check that for any statevector which lies in the repetition code subspace $|\psi\rangle=\alpha|000\rangle+\beta|111\rangle$ up to a single-qubit $X$ error (i.e. including $X_1|\psi\rangle, X_2|\psi\rangle$ and $X_3|\psi\rangle$) it acts as $|\psi\rangle=\alpha|000\rangle+\beta|111\rangle\to (\alpha|0\rangle+\beta|1\rangle)|state_{23}\rangle$. I.e. the first qubit acquires the decoded logical state and isn't entangled with the last two. For details see a table at the end. Therefore, this unitary circuit both corrects a single-qubit error $X$ and decodes a logical state. I will call it a decoder-corrector. Applying this decoder-corrector + resetting the ancilla qubits + making the repetition encoding again has the same effect as the usual error correction process, but without any syndrome measurements and decoding.

Although I do not have a nice circuit, I know that [[5, 1, 3]] code admits correction of arbitrary 1q errors in the same way (unitary decoder-corrector+ancilla reset+re-encoding).

  1. Does this procedure have a name? Does it exist for any error correcting code?
  2. Given that measuring syndromes+decoding is a costly process, could there be a setting where a similar procedure outperforms the standard active error correction?

Decoder-corrector circuit acting on the code space of the repetition code+single X errors.

enter image description here

  • $\begingroup$ One purpose of the syndrome measurement in QECC is that it projects the state into a subspace of having only X and/or Z errors, thus correcting these 2 errors suffices to correct any arbitrary single-qubit error. It looks like you would lose that with the above approach. $\endgroup$
    – GotCarter
    Aug 28, 2022 at 10:51
  • $\begingroup$ @GotCarter the circuit from my example will correct an arbitrary channel acting on the three-qubit state whose Kraus operators are linear combinations of $X_1, X_2, X_3$. Similarly, for [[5, 1, 3]] code arbitrary Kraus operators, which a linear-combinations of single-qubit errors, will be corrected. Same thing that is done by the active error correction. $\endgroup$ Aug 28, 2022 at 11:18

2 Answers 2


What you are doing is applying the deferred measurement principle to move classical corrections back into the quantum circuit.

There are some practical problems with doing this.

  1. It means your corrective circuit experiences as much noise as the computation it's protecting. For example, what if there is an X error on the target during the toffoli? That error is not detected. You want to get the correction away from the quantum computer, so that it's reliable.

  2. You still need to dissipate the entropy that accumulated into the ancillas qubits. In practice you need to continuously error correct, so you need to keep those ancillas qubits clean. So you need to dissipate their state into the environment, which isn't exactly like a measurement but it's basically a measurement.

  • $\begingroup$ Your reference to deferred measurements sounds neat, but I'm not sure how will that work quantitatively. For example, my scheme needs no extra ancilla qubits for syndrome measurements. Are they completely equivalent, or up to the details that may matter? Also (1) correcting circuit is indeed noisy, but so are syndrome measurements and decoding. Is it clear that they always win? (2) Totally agree there is a dissipation, but I assume that ancilla reset should be way cheaper and more accurate than syndrome measurements. $\endgroup$ Aug 28, 2022 at 14:31
  • $\begingroup$ @NikitaNemkov Using or not using ancilla qubits doesn't change the applicability of the deferred measurement principle. For (1) yes, generally, performing a syndrome measurement is more reliable than performing a Toffoli gate. In more complex codes, where correction uses more complex algorithms like matching instead of a single Toffoli, this gap gets much much wider. For (2), yes it can be cheaper (e.g. resets don't require amplification of a result). $\endgroup$ Aug 28, 2022 at 16:52
  • $\begingroup$ @NikitaNemkov Try searching "self correcting quantum code" for papers on codes that aren't based on syndrome measurements. $\endgroup$ Aug 28, 2022 at 16:53
  • $\begingroup$ Self-correcting memories look like a different concept to me. They outsource correction to dissipation and/or Hamiltonian dynamics, while here it is done quite "actively". Apparently, any stabilizer measurement+decoding can be replaced by a unitary transformation+ancilla reset. The question is in efficiency. As you suggested, using the deferred measurement principle allows finding an appropriate unitary, that will probably be very deep and use extra ancilla. It is not obvious to me though that the unitary can not be chosen much simpler, say comparable to a logical state preparation circuit. $\endgroup$ Aug 29, 2022 at 11:30

If I understand your question correctly then yes this is possible for any stabilizer code. You can look at this paper Efficient Quantum Circuit for Encoding and Decoding of the [[8,3,5]] Stabilizer Code (Fig. 2) for an example. There was an open access version at some point but now it's behind a paywall. The code is actually a distance 3 code ($[[8,3,3]]$) so that's a mistake in the paper. The process isn't too different from the approach where you measure the syndrome into a classical register and then apply the correction based on classical bits; the difference is that you apply the correction using a series of multi-qubit control gates based on the possible syndromes. I have software that generates the entire circuit automatically and I tested it for small codes; it's not python and it will take a while to translate it...Note that this needs as many ancilla qubits as stabilizers; I am not aware of a way to do this without ancilla. Where did you see the $[[5,1,3]]$ code decoded without ancilla?

  • 1
    $\begingroup$ So your code basically does what is described in an answer by Craig Gidney? Does it always use the same amount ancilla qubits as stabilizer measurements? My ancilla-free [[5, 1, 3]] decoder comes from a simple numerical experiment -- I basically asked for a unitary that decodes and undoes 1q errors and found in numerically idnm.github.io/blog/qml/qec/2022/06/16/… . $\endgroup$ Sep 2, 2022 at 7:59
  • $\begingroup$ @NikitaNemkov yes ancilla number $=n-k=m$=number of stabilizers. Thanks for the link; I think I see what you're doing : the encoding logical state $|\bar d_1 \cdots \bar d_k>$ is encoded as $ENC |d_1 \cdots d_k 0_1 \cdots 0_m>$ and the decoder outputs $|d_1 \cdots d_k t_1 \cdots t_m>$ where the $t_i$'s are assumed irrelevant. Strictly speaking the output is not the encoded state; looks closer to teleportation. Might be useful in different ways and I'm guessing it will work for arbitrary codes but I didn't check. Still an interesting application of neural networks/ML to look at problem $\endgroup$
    – unknown
    Sep 2, 2022 at 14:46
  • $\begingroup$ I think your description is exactly right. If you reset the ancilla qubits $t_1\dots t_m$ to all zero state and then use $ENC$ again, you got yourself the encoded state back with an error corrected, exactly the result that the standard error correction does. $\endgroup$ Sep 2, 2022 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.