# MWPM algorithm for depolarizing-like noise channel (i.e. non-zero probability of $Y$ errors)

I would like to understand how the MWPM decoder can be used in the case of a noise model where $$X$$,$$Y$$ and $$Z$$ can all be introduced with a comparable probability (one example would be the depolarizing noise model).

My current understanding of the decoder relies upon considering two graphs when the error occur: one associated to $$Z$$ errors and one associated to $$X$$ errors, and to decode the graph independently by applying a min-weight correction $$R_X$$ that fixes the $$X$$ errors, and then a min-weight correction $$R_Z$$ that fixes the $$Z$$ errors ($$X$$ and $$Z$$ are dealt as independent events). When I mean "fix", I mean that the net operation Error+Correction is equal to some stabilizer.

Because we treat $$X$$ and $$Z$$ errors independently, the "logic" of the MWPM in this case is based upon the following noise model:

$$\mathcal{N}(\rho)=(1-(p_X+p_Z)) \rho + p_X X \rho X + p_Z Z \rho Z$$

As soon as there is a probability to have $$Y$$ errors, with a probability $$p_Y$$ both an $$X$$ and $$Z$$ error will be introduced. How is the decoder modified in such a case?

I guess (but I'm unsure, see below) that keeping the same strategy of independent decoding would still do the job. With respect to the graph associated to $$X$$ errors, everything behave as if $$p_X \to p_X + p_Y$$, and with respect to the graph associated to $$Z$$ errors, everything behave as if $$p_Z \to p_Z + p_Y$$.

However, maybe one can optimize the MWPM decoder to acknowledge the correlations between $$X$$ and $$Z$$ (and maybe it would lead to better performances?). In this case I don't see how the decoding graphs are constructed?

In summary, my questions are:

• Do you agree that if $$Y$$ error are introduced (with a probability to occur that is comparable to $$X$$ and $$Z$$), the decoder that decodes independently $$X$$ and $$Z$$ would still work efficiently? Or maybe because it ignores correlations it completely ruins the protection (because "for some reason" events of errors less than $$t$$, for a code distance $$d=2t+1$$, would now lead to logical errors).
• If there is a way to "optimize" the MWPM to deal with cases where $$Y$$ error are also introduced (for instance depolarizing noise), I would be interested by a nice pedagogic reference on the matter.

As a last comment if it can guide the answer: I am not looking for the "supper dubber state of the art method". My goal is to get better intuition in order to make a small simulation for my own pedagogic purposes.

## 2 Answers

The simplest thing you can do is to tell the decoder to ignore the existence of Y errors and decoding the X and Z subgraphs totally independently. This is not optimal, it will require better performance out of the hardware to achieve the same final logical performance as more advanced methods, but it does work.

Beyond that, people use heuristics and hacks to handle the correlations. For example, after doing the initial naive totally-independent matching, the decoder has picked out certain edges as the X errors and Z errors it thinks occurred. You consider each such error. For example, consider one of the predicted X errors. It may truly be an X error but perhaps it was actually a Y error with a corresponding effect on the Z graph. To account for this, you lower the weight of the edge corresponding to that Z error in the Z subgraph, using some approximation of Bayes' rule driven by the presence of this predicted X error. You do this for all predicted errors, then rerun the decoding on the two now-weighted subgraphs. The reweighting process approximates the correlations from Y errors, improving the result. You then report that result, which took twice as long to compute since you performed matching twice but it handily outperforms the accuracy of the naive just-decode-separately approach.

• Thanks a lot! I need a bit of time to fully understand your second suggestion but you solved my most important issue. Commented Apr 2, 2023 at 16:20

First of all, I think that the protection would not be "ruined". I mean this because even if the $$X$$ and $$Z$$ graphs are independently decoded, whenever a qubit is determined to have suffer from an error in both of the graphs, the resulting error would be a $$Y$$ error. Therefore, such approach would also correct some errors of such nature. However, since the probability of occurrence for $$Y$$ errors in a depolarizing channel is the same as for $$X$$ and $$Y$$ errors, the performance of the decoder will be lowered substantially due to the fact that considering $$X$$ and $$Z$$ errors in a independent manner implies that the probability of a $$Y$$ to occur would be $$p_y=p_xp_z$$, which is lower than what it is expected. Thus, the performance loss will be a function of the correlation as you were discussing, the optimal performance of such naive decoder will be for the named independent $$XZ$$ channel, where $$p_y=p_xp_z$$ is fulfilled.

If you are interested in reading more on the topic of how this correlation may be addressed using the MWPM decoder, I recommend you the following papers:

• Many thanks for the confirmation and the references. Commented Apr 2, 2023 at 16:20