In practice, it is often desirable to choose a quantum error-correcting code capable of tolerating a high error rate and not requiring long-ranged connectivity between physical qubits. The surface code [1]}, [2]} is a commonly used code because it has both these properties, enjoying a high threshold of \(\sim 1 \%\)  [3]}, [4]}, [5]} and only needing nearest-neighbor connectivity of qubits in two spatial dimensions. In addition, it is highly resistant to erasure errors, even up to \(50\%\)  qubit loss [6]}. However, optical quantum computing architectures are better suited to measurement-based implementations of quantum error-correcting codes. In the case of the so-called Calderbank-Shor-Steane (CSS) codes [7]}, [8]}, this can be implemented using cluster states corresponding to foliated (i.e., layered) lattice sheets that implement CSS code stabilizer measurement gadgets [9]}.
