  We consider the problem of optimally decoding a quantum error correction code
-- that is to find the optimal recovery procedure given the outcomes of partial
"check" measurements on the system. In general, this problem is NP-hard.
However, we demonstrate that for concatenated block codes, the optimal decoding
can be efficiently computed using a message passing algorithm. We compare the
performance of the message passing algorithm to that of the widespread
blockwise hard decoding technique. Our Monte Carlo results using the 5 qubit
and Steane's code on a depolarizing channel demonstrate significant advantages
of the message passing algorithms in two respects. 1) Optimal decoding
increases by as much as 94% the error threshold below which the error
correction procedure can be used to reliably send information over a noisy
channel. 2) For noise levels below these thresholds, the probability of error
after optimal decoding is suppressed at a significantly higher rate, leading to
a substantial reduction of the error correction overhead.
