single qubit Cliffords). (a) Non-fault-tolerant circuit. A single fault $IZ$ occurring on the third CNOT (from the left) results in the error $IIZZ$ on the data block. (b) Flag version of \[fig:StabNonFT\]. An ancilla (flag) qubit prepared in ${|+\rangle}$ and two extra CNOT gates signals when a weight two data error is caused by a single fault. Subsequent rounds of error correction may identify which error occurred. Consider an $IZ$ error on the second CNOT, in the non-flag circuit this would result in a weight two error, but in this case, this fault causes the circuit to flag. (c) An alternative flag circuit with lower depth than (b). All bad locations are illustrated in blue.[]{data-label="fig:ErrorPropSteane"}](StabFTwithAncillaV2.png "fig:"){width="\textwidth"}

As shown in \[fig:StabFTwithAncilla\], the circuit can be modified by including an additional ancilla (flag) qubit, and two extra CNOT gates. This modification leaves the bad locations and the fault-free action of the circuit unchanged. However, any single fault leading to an error $E$ with $\mathrm{wt}(E) \ge 2$ will also cause the measurement outcome of the flag qubit to flip [@CR17v1]. The following definitions will be useful:

Consider a circuit for measuring a stabilizer generator that includes at least one flag ancilla. The ancilla 