  Topological quantum error-correcting codes are a promising candidate for
building fault-tolerant quantum computers. Decoding topological codes
optimally, however, is known to be a computationally hard problem. Various
decoders have been proposed that achieve approximately optimal error
thresholds. Due to practical constraints, it is not known if there exists an
obvious choice for a decoder. In this paper, we introduce a framework which can
combine arbitrary decoders for any given code to significantly reduce the
logical error rates. We rely on the crucial observation that two different
decoding techniques, while possibly having similar logical error rates, can
perform differently on the same error syndrome. We use machine learning
techniques to assign a given error syndrome to the decoder which is likely to
decode it correctly. We apply our framework to an ensemble of Minimum-Weight
Perfect Matching (MWPM) and Hard-Decision Re-normalization Group (HDRG)
decoders for the surface code in the depolarizing noise model. Our simulations
show an improvement of 38.4%, 14.6%, and 7.1% over the pseudo-threshold of MWPM
in the instance of distance 5, 7, and 9 codes, respectively. Lastly, we discuss
the advantages and limitations of our framework and applicability to other
error-correcting codes. Our framework can provide a significant boost to error
correction by combining the strengths of various decoders. In particular, it
may allow for combining very fast decoders with moderate error-correcting
capability to create a very fast ensemble decoder with high error-correcting
capability.
