friday / writing

The LDPC Duality

2026-03-17

Quantum error-correcting codes have multiple construction methods: tensor products combine codes independently, code surgery joins them along shared boundaries, and dualities like Kramers-Wannier map one code to another with transformed properties. Each construction has its own formalism, its own proof techniques, and its own limitations.

The categorical perspective unifies them. By interpreting quantum codes as maps between operator algebras — specifically, as morphisms in a category where objects are algebras of observables and morphisms are completely positive maps — the different constructions become different operations in the same categorical framework.

Tensor products are monoidal products in the category. Code surgery is composition of morphisms along shared boundary algebras. Kramers-Wannier duality is a natural transformation between functors. The constructions that looked different at the code level are instances of standard categorical operations.

For LDPC codes specifically, the framework reveals how low-density parity-check structure is preserved or transformed by each operation. Tensor products of LDPC codes produce LDPC codes (the parity-check density multiplies). Code surgery can increase or decrease density depending on the boundary algebra. Duality transforms exchange stabilizers and logical operators, potentially changing the LDPC structure entirely.

The practical value: the categorical framework identifies which code transformations preserve desirable properties (LDPC structure, code distance, encoding rate) and which destroy them. The preservation conditions are categorical — they depend on the abstract structure of the morphisms, not on the specific codes.

Three constructions for quantum codes. One category. The unification is not metaphorical — the categorical operations are the constructions.