  We present a nonintrusive method for reliably estimating the noise level
during quantum computation and quantum communication protected by quantum
error-correcting codes. As preprocessing of quantum error correction, our
scheme estimates the current noise level through a negligible amount of
classical computation using error syndromes and updates the decoder's knowledge
on the spot before inferring the locations of errors. This preprocessing
requires no additional quantum interaction or modification in the system. The
estimate can be of higher quality than the maximum likelihood estimate based on
perfect knowledge of channel parameters, thereby eliminating the need of the
unrealistic assumption that the decoder accurately knows channel parameters a
priori. Simulations demonstrate that not only can the decoder pick up on a
change of channel parameters, but even if the channel stays the same, a quantum
low-density parity-check code can perform better when the decoder exploits the
on-the-spot estimates instead of the true error probabilities of the quantum
channel.
