in producing it. What also comes out of the above description is that each run of the algorithm will either result in a failure or a success, and that determining which occurred is computationally trivial.

In the quantum setting, it is generically not possible to sample the error because the noise model isn’t always stochastic in nature. A simple example is the systematic rotation channel, where each qubit undergoes a small rotation $U_\theta = e^{i\frac{\theta}{2} X} = \cos\frac \theta 2 I + i\sin\frac\theta 2 X$. We can think of this error as a [*coherent superposition*]{} of having no error $I$ [*and*]{} having a bit flip error $X$. This is distinct from a stochastic model having no error $I$ [*or*]{} having a bit flip error $X$. Under the coherent error model, the syndrome has an undetermined value and we are forced to numerically simulate its measurement.

To illustrate this, consider a 3-qubit code with stabilizers $ZZI$ and $IZZ$, and with corresponding logical states $\ket{\bar 0} = \ket{000}$ and $\ket{\bar 1} = \ket{111}$. Starting in an arbitrary initial code state $\ket{\bar\psi} = \alpha\ket{\bar 0} + \beta\ket{\bar 1}$, the error model will result in the state $U_\theta^{\otimes 3}\ket{\bar\psi}$. Upon measurement, the syndromes have 