The topology of topological QEC I — Manifolds and complexes

To continue our journey into quantum error correction, it is time to dive deeper into the theoretical foundations of the field. When learning about the surface code, you might have wondered: what exactly makes it work? Would it work as well on lattices other than the square lattice? On manifolds other than the torus? In higher dimensions?