  We compare the performance of quantum error correcting codes when memory
errors are unitary with the more familiar case of dephasing noise. For a wide
range of codes we analytically compute the effective logical channel that
results when the error correction steps are performed noiselessly. Our examples
include the entire family of repetition codes, the 5-qubit, Steane, Shor, and
surface codes. When errors are measured in terms of the diamond norm, we find
that the error correction is typically much more effective for unitary errors
than for dephasing. We observe this behavior for a wide range of codes after a
single level of encoding, and in the thresholds of concatenated codes using
hard decoders. We show that this holds with great generality by proving a bound
on the performance of any stabilizer code when the noise at the physical level
is unitary. By comparing the diamond norm error $D'_\diamond$ of the logical
qubit with the same quantity at the physical level $D_\diamond$, we show that
$D'_\diamond \le c D^d_\diamond $ where $d$ is the distance of the code and $c$
is constant that depends on the code but not on the error. This bound compares
very favorably to the performance of error correction for dephasing noise and
other Pauli channels, where an error correcting code of odd distance $d$ will
exhibit a scaling $D'_\diamond \sim D_\diamond^{(d+1)/2}$.
