the following probabilities $$\begin{aligned}
\Pr(s = 00) &= (\cos\tfrac\theta 2)^6 + (\sin\tfrac\theta 2)^6,\\
\Pr(s = 01) &= \Pr(s = 10) = \Pr(s = 11) \\
&= (\cos\tfrac\theta 2)^4(\sin\tfrac\theta 2)^2 + (\cos\tfrac\theta 2)^2(\sin\tfrac\theta 2)^4. \nonumber\end{aligned}$$ After error correction, the syndrome ++ will result in the state $$\ket{\bar\psi^{s = 00}} \propto \left[(\cos\tfrac\theta 2)^3 I  -i (\sin\tfrac\theta 2)^3 ZZZ\right]\ket{\bar\psi}$$ while the other three syndromes would produce the state $$\ket{\bar\psi^{s}} \propto \left[(\cos\tfrac\theta 2)^2(\sin\tfrac\theta 2) I  +i (\sin\tfrac\theta 2)^2(\cos\tfrac\theta 2) ZZZ\right]\ket{\bar\psi}.$$ Thus, we see that the syndrome value is not determined by the error, so it must be sampled, and that in all cases the final state is not exactly equal to the original state, nor is it orthogonal – a residual logical error $\cE_1^s$ remains. In this example, the probabilities and residual logical error could be computed analytically, but in general this will not be possible. For most codes and under generic single qubit noise models $\cE_0$, simulating the syndrome measurement and evaluating the resulting logical error $\cE_1^s$ can only be done by simulating an $n$-qubit density matrix, with memory requirement $4^n$. The algorithm presented in uses special structure of concatenated codes to circumvent this exponential cost, and the algorithm of [@DP17] uses the 