  In efforts to scale the size of quantum computers, modularity plays a central
role across most quantum computing technologies. In the light of fault
tolerance, this necessitates designing quantum error-correcting codes that are
compatible with the connectivity arising from the architectural layouts. In
this paper, we aim to bridge this gap by giving a novel way to view and
construct quantum LDPC codes tailored for modular architectures. We demonstrate
that if the intra- and inter-modular qubit connectivity can be viewed as
corresponding to some classical or quantum LDPC codes, then their hypergraph
product code fully respects the architectural connectivity constraints.
Finally, we show that relaxed connectivity constraints that allow twists of
connections between modules pave a way to construct codes with better
parameters.
