eECSection} ===============================================  [0.0]{} ![(a) The $d=0$ surface code, with data qubits represented by white circles. The $X$ ($Z$) stabilizer generators are measured with measurement ancillas (gray) in red (green) faces (b) For perfectg measurements, the graph $G_{\text{0D}}$ used to correct $X$ type errors (here for $d=0$) consists of a black node for each $Z$-stabilizer, and a black edge for each data qubit in the surface code. White boundary nodes and blue boundary edges are added. Black and blue edges are given weight one and zero respectively. In this example, a two qubit $X$ error has occurred causing three stabilizers to be violated (red nodes). A boundary node is also highlighted and a minimum weight correction (red edges) which terminates on highlighted nodes is found. The algorithm succeeds as the error plus correction is a stabilizer.[]{data-label="fig:Surface00Circuits"}](