  Quantum hardware suffers from high error rates and noise, which makes
directly running applications on them ineffective. Quantum Error Correction
(QEC) is a critical technique towards fault tolerance which encodes the quantum
information distributively in multiple data qubits and uses syndrome qubits to
check parity. Minimum-Weight-Perfect-Matching (MWPM) is a popular QEC decoder
that takes the syndromes as input and finds the matchings between syndromes
that infer the errors. However, there are two paramount challenges for MWPM
decoders. First, as noise in real quantum systems can drift over time, there is
a potential misalignment with the decoding graph's initial weights, leading to
a severe performance degradation in the logical error rates. Second, while the
MWPM decoder addresses independent errors, it falls short when encountering
correlated errors typical on real hardware, such as those in the 2Q
depolarizing channel.
  We propose DGR, an efficient decoding graph edge re-weighting strategy with
no quantum overhead. It leverages the insight that the statistics of matchings
across decoding iterations offer rich information about errors on real quantum
hardware. By counting the occurrences of edges and edge pairs in decoded
matchings, we can statistically estimate the up-to-date probabilities of each
edge and the correlations between them. The reweighting process includes two
vital steps: alignment re-weighting and correlation re-weighting. The former
updates the MWPM weights based on statistics to align with actual noise, and
the latter adjusts the weight considering edge correlations.
  Extensive evaluations on surface code and honeycomb code under various
settings show that DGR reduces the logical error rate by 3.6x on average-case
noise mismatch with exceeding 5000x improvement under worst-case mismatch.
