The surface code is a topological quantum error correcting code, and an example of a stabilizer code, defined on a two-dimensional spin lattice. The first type of surface code int…