# How to determine the threshold value of the quantum error correction code

How to determine the threshold value of the quantum error correction code, what is the specific method, such as surface code, how to determine the threshold value of the color code with a decoder, I don’t understand it very well, please answer it in detail.

The general idea is to first specify an error model on the physical qubits and then enumerate all the ways a logical error might occur given that model and the details of the code in question. The logical error rate $$\bar{p}$$ will be some complicated function of the physical error rate $$p$$, and the threshold is found when the two rates are equated, i.e. when $$\bar{p} = f(p) = p$$. We stand to benefit from using the code whenever $$\bar{p} < p$$, otherwise we are better off using the physical qubits directly without any encoding. For a simple example that can be worked out analytically, see this previous answer of mine regarding Shor's code. For more complicated codes and larger devices, the threshold is usually studied numerically by plotting $$\bar{p}$$ vs. $$p$$ for various levels of code concatenation or, for the surface code, code distance (like page 14 of this paper).