and 2) determining the effect of the error-correction procedure on the logical qubit. These are inherently quantum mechanical problems and have no classical counterpart. Let us indeed consider the classical setting first (we will describe syndrome-based decoding).

In a numerical simulation of classical error correction, we prepare a codeword and simulate its noisy transmission. Given a received noisy bit string, the syndrome consists of parities of subsets of the received bits, which can be computed efficiently. The decoder then takes as input this syndrome and outputs the optimal recovery, i.e. the optimal sequence of bits to flip in order to recover the initial codeword. We can then check if this decoded codeword coincides with the initial codeword, which had been kept in memory for the sake of the simulation. Repeating this procedure enables us to estimate the fault rate.

It comes out of the above description that the syndrome does not need to be sampled: instead, it is the error itself which is sampled. In other words, we directly simulate the error process of, e.g., flipping each transmitted bit with some probability $p$. The syndrome is a function of the resulting noisy bit string, there is no additional randomness involved 