arXiv:2508.14672 · Electronic Proceedings in Theoretical Computer Science
String Diagrams for Defect-Based Surface Code Computing
Mateusz Kupper, Dominic C. Horsman, Chris Heunen, Niel de Beaudrap
Abstract
Surface codes are a popular choice for implementing fault-tolerant quantum computing.Two-qubit gates may be realised in these codes using only nearest-neighbour interactions, either by lattice surgery [27] or by braiding defects around each other [43].The effect of lattice surgery operations may be simply described [3] using the ZX-calculus: a graphical language that has proven effective for program design and optimisation (see e.g.[23]).In this work, we formalise a similar description via the ZX-calculus of defect braiding, as it is conventionally described.We define a graphical calculus KNOT, denoting the logical effects (in the absence of byproduct operations) of defect braiding in surface codes: we show how these effects may be described via a fragment of ZX-calculus which we call the (0, π)-fragment.We then use a 'doubling' construction to define a subtheory of KNOT, more specialised to standard encoding techniques in the defect braiding literature.Within this subtheory, we encompass standard braiding techniques by families of 'ribbon-like' and 'tangle-like' diagrams, each with semantics distinct from KNOT, in terms of the (0, π)-fragment of ZX diagrams (again in the absence of byproducts).These subtheories may be used interoperably, and are each sound and complete for the (0, π)-fragment of ZX diagrams.This provides a starting point to use the formal diagrammatics to analyse the operational effects of defect braiding procedures.* Corresponding author; author order is reverse-alphabetical, with the purpose of sowing confusion.