set $\mathcal{E}(g)$ for a 1-flag circuit $C(g)$ have distinct syndromes. As $C(g)$ is a 1-flag circuit, a single fault that leads to an error of weight greater than one will cause the circuit $C(g)$ to flag. Moreover, when a flag has occurred due to at most one fault, a complete set of fault-free stabilizer measurements will infer the resulting element of the flag error set which has been applied to the data qubits. In fact, one would only require distinct syndromes for errors in the flag error set that are logically inequivalent, as defined in \[Def:LogEquivDef\].

As an example, consider the 1-flag circuit in \[fig:StabFTwithAncilla\]. A single fault at any of the blue CNOT gates can lead to an error $E_{b}$ with $\text{wt}(E_{b}) \le 2$ on the data. The set $\mathcal{E}(Z^{\otimes 4})$ contains all errors $E_{b}$ which resulted from a fault at a blue CNOT gate causing the circuit $C(Z^{\otimes 4})$ of \[fig:StabFTwithAncilla\] to flag, i.e., $\mathcal{E}(g) = \{ I,Z_{q_{3}}Z_{q_{4}},X_{q_{2}}Z_{q_{3}}Z_{q_{4}},Z_{q_{1}}X_{q_{2}},Z_{q_{4}},$ $X_{q_{3}}Z_{q_{4}},Y_{q_{3}}Z_{q_{4}} \}$ with qubits $q_1$ to $q_4$.

With the above definitions, we can construct a fault-tolerant flag error correction protocol for $d=3$ stabilizer codes satisfying the following condition.

Consider a stabilizer code $\mathcal{S} =  \langle g_{1},g_{2},\cdots , g_{r} \rangle$ and 