For n≥3, we demonstrate the existence of quantum codes which are local in dimension n with V qubits, distance Vnn−1, and dimension Vnn−2, up to a polylog(V) factor. The distance is optimal up to the polylog factor. The dimension is also optimal for this distance up to the polylog factor. The proof combines the existence of asymptotically good quantum codes, a procedure to build a manifold from a code by Freedman-Hastings, and a quantitative embedding theorem by Gromov-Guth.
Quantum LDPC codes have attracted intense interest due to their advantageous properties for realizing efficient fault-tolerant quantum computing. In particular, sheaf codes represent a novel framework that encompasses all well-known good qLDPC codes with profound underlying mathematics. In this work, we generalize Poincaré duality from manifolds to both classical and quantum codes defined via sheaf theory on t-dimensional cell complexes. Viewing important code properties including the encoding rate, code distance, local testability soundness, and efficient decoders as parameters of the underlying (co)chain complexes, we rigorously prove a duality relationship between the i-th chain and the (t−i)-th cochain of sheaf codes.
We further build multiplicative structures such as cup and cap products on sheaved chain complexes, inspired by the standard notions of multiplicative structures and Poincaré duality on manifolds. This immediately leads to an explicit isomorphism between (co)homology groups of sheaf codes via a cap product. As an application, we obtain transversal disjoint logical CZ gates with kCZ=Θ(n) on families of good qLDPC and almost-good quantum locally testable codes. Moreover, we provide multiple new methods to construct transversal circuits composed of CCZ gates as well as for higher order controlled-Z that are provably logical operations on the code space. We conjecture that they generate nontrivial logical actions, pointing towards fault-tolerant non-Clifford gates on nearly optimal qLDPC sheaf codes. Mathematically, our results are built on establishing the equivalence between sheaf cohomology in the derived-functor sense, Čech cohomology, and the cohomology of sheaf codes, thereby introducing new mathematical tools into quantum coding theory.
Quantum error correction (QEC) is crucial for realizing scalable quantum technologies, and topological quantum error correction (TQEC) has emerged as the most experimentally advanced paradigm of QEC. Existing homological and topological code constructions, however, are largely confined to orientable two-manifolds with simple boundary conditions. In this work, we develop a unified algebraic-topological framework for TQEC based on homology, cohomology, and intersection theory, which characterizes exactly when an arbitrary-dimensional manifold (with or without boundary) can serve as a quantum memory, thereby extending the standard 2D homological-code picture to arbitrary dimension and to manifolds with boundary via Poincaré-Lefschetz duality. Building on this classification, we introduce concrete code families that exploit nontrivial topology beyond the planar and toric settings. These include ``3-torus code'' and higher-dimensional ``volume codes'' on compact manifolds with mixed X- and Z-type boundaries. We further give a topological construction of qudit TQEC codes on general two-dimensional cell complexes using group presentation complexes, which unifies and extends several known quantum LDPC and homological-product-like constructions within a single geometric language. Finally, we combine the theoretical framework with numerical simulations to demonstrate that changing only the global topology can yield improved logical performance at fixed entanglement resources. Taken together, our results provide a systematic set of topological design principles for constructing and analyzing TQEC codes across dimensions and boundaries, and they open new avenues for topology-aware fault-tolerant quantum architectures.
A fundamental problem of fault-tolerant quantum computation with quantum low-density parity-check (qLDPC) codes is the tradeoff between connectivity and universality. It is widely believed that in order to perform native logical non-Clifford gates, one needs to resort to 3D product-code constructions. In this work, we extend Kitaev's framework of non-Abelian topological codes on manifolds to non-Abelian qLDPC codes (realized as Clifford-stabilizer codes) and the corresponding combinatorial topological quantum field theories (TQFT) defined on Poincaré CW complexes and certain types of general chain complexes. We also construct the spacetime path integrals as topological invariants on these complexes. Remarkably, we show that native non-Clifford logical gates can be realized using constant-rate 2D hypergraph-product codes and their Clifford-stabilizer variants. This is achieved by a spacetime path integral effectively implementing the addressable gauging measurement of a new type of 0-form subcomplex symmetries, which correspond to addressable transversal Clifford gates and become higher-form symmetries when lifted to higher-dimensional CW complexes or manifolds. Building on this structure, we apply the gauging protocol to the magic state fountain scheme for parallel preparation of O(n) disjoint CZ magic states with code distance of O(n), using a total number of n qubits.