  A powerful feature of stabiliser error correcting codes is the fact that
stabiliser measurement projects arbitrary errors to Pauli errors, greatly
simplifying the physical error correction process as well as classical
simulations of code performance. However, logical non-Clifford operations can
map Pauli errors to non-Pauli (Clifford) errors, and while subsequent
stabiliser measurements will project the Clifford errors back to Pauli errors
the resulting distributions will possess additional correlations that depend on
both the nature of the logical operation and the structure of the code.
Previous work has studied these effects when applying a transversal $T$ gate to
the three-dimensional colour code and shown the existence of a non-local
"linking charge" phenomenon between membranes of intersecting errors. In this
work we generalise these results to the case of a $CCZ$ gate in the
three-dimensional surface code and find that many aspects of the problem are
much more easily understood in this setting. In particular, the emergence of
linking charge is a local effect rather than a non-local one. We use the
relative simplicity of Clifford errors in this setting to simulate their effect
on the performance of a single-shot magic state preparation process (the first
such simulation to account for the full effect of these errors) and find that
their effect on the threshold is largely determined by probability of $X$
errors occurring immediately prior to the application of the gate, after the
most recent stabiliser measurement.
