  Quantum error correction is instrumental in protecting quantum systems from
noise in quantum computing and communication settings. Pauli channels can be
efficiently simulated and threshold values for Pauli error rates under a
variety of error-correcting codes have been obtained. However, realistic
quantum systems can undergo noise processes that differ significantly from
Pauli noise. In this paper, we present an efficient hard decoding algorithm for
optimizing thresholds and lowering failure rates of an error-correcting code
under general completely positive and trace-preserving (i.e., Markovian) noise.
We use our hard decoding algorithm to study the performance of several
error-correcting codes under various non-Pauli noise models by computing
threshold values and failure rates for these codes. We compare the performance
of our hard decoding algorithm to decoders optimized for depolarizing noise and
show improvements in thresholds and reductions in failure rates by several
orders of magnitude. Our hard decoding algorithm can also be adapted to take
advantage of a code's non-Pauli transversal gates to further suppress noise.
For example, we show that using the transversal gates of the 5-qubit code
allows arbitrary rotations around certain axes to be perfectly corrected.
Furthermore, we show that Pauli twirling can increase or decrease the threshold
depending upon the code properties. Lastly, we show that even if the physical
noise model differs slightly from the hypothesized noise model used to
determine an optimized decoder, failure rates can still be reduced by applying
our hard decoding algorithm.
