Abstract We take initial steps towards a general framework for constructing logical gates in general quantum CSS codes. Viewing CSS codes as cochain complexes, we observe that cohomology invariants naturally give rise to diagonal logical gates. We show that such invariants exist if the quantum code has a structure that relaxes certain properties of a differential graded algebra. We show how to equip quantum codes with such a structure by defining cup products on CSS codes. The logical gates obtained from this approach can be implemented by a constant-depth unitary circuit. In particular, we construct a $$\Lambda $$ Λ -fold cup product that can produce a logical operator in the $$\Lambda $$ Λ -th level of the Clifford hierarchy on $$\Lambda $$ Λ copies of the same quantum code, which we call the copy-cup gate . For any desired $$\Lambda $$ Λ , we can construct several families of quantum codes that support gates in the $$\Lambda $$ Λ -th level with various asymptotic code parameters.
Abstract We take initial steps towards a general framework for constructing logical gates in general quantum CSS codes. Viewing CSS codes as cochain complexes, we observe that cohomology invariants naturally give rise to diagonal logical gates. We show that such invariants exist if the quantum code has a structure that relaxes certain properties of a differential graded algebra. We show how to equip quantum codes with such a structure by defining cup products on CSS codes. The logical gates obtained from this approach can be implemented by a constant-depth unitary circuit. In particular, we construct a Λ Λ -fold cup product that can produce a logical operator in the Λ Λ -th level of the Clifford hierarchy on Λ Λ copies of the same quantum code, which we call the copy-cup gate . For any desired Λ Λ , we can construct several families of quantum codes that support gates in the Λ Λ -th level with various asymptotic code parameters.
In Part I, we introduced a general framework for constructing logical gates in quantum CSS codes from cohomology invariants, focusing on cup products and their generalizations from topological to qLDPC codes. In particular, we produced a family of Ck−1Z logical gates that we called copy-cup on k copies of the same quantum code implemented by finite-depth circuits. Here, we vastly extend this framework by introducing twists incorporating code automorphisms, higher twisted cohomology operations, and folding operations in relative cohomology. The framework includes operations lifting coefficients from Z/2 to Z/2k, enabling all diagonal logical gates such as single-qubit rotations R(2π/2k). Composing these operations with maps that select cohomology classes yields addressable logical gates. Examples include addressable T gates on three- and four-tori and gates in qLDPC codes beyond topological ones. We introduce cohomology operations, such as the higher twisted Pontryagin powers, that to our knowledge have not previously appeared in the mathematics literature. These operations arise from E∞-structures on cochains, with explicit constructions using cyclic resolutions and the surjection operad. We expect these results to be of independent interest in homotopy theory. Our formalism applies much more broadly to chain complexes carrying suitable operadic structures, and we expect this operadic perspective to uncover further connections between homotopy theory and fault-tolerant quantum gates.
We establish a systematic mathematical framework for constructing and computing (co)homological invariants that induce logical gates on quantum low-density parity-check (qLDPC) codes. By synthesizing tools from graph theory, algebraic topology, and number theory, we study constructions ranging from hypergraph product (HGP) codes to sheaf codes. Using commutative algebra, we generalize the notion of canonical logical representatives from HGP codes to the sheaf code setting, resolving a longstanding challenge in explicitly characterizing sheaf codewords. Building on this foundation, we present the first comprehensive computation of cup products within the intricate framework of sheaf codes. Given Artin's primitive root conjecture which holds under the generalized Riemann hypothesis, {we establish a nearly linear family of independent cup product cochains on almost-good qLDPC codes. Under a separate nonvanishing pairing condition, they are expected to yield parallel logical multi-controlled-Z gates. Moreover, by interpreting sheaf codes as covering spaces of HGP codes, we construct interlaced families through odd-degree lifts that preserve compatible invariant pairings, allowing nontrivial, constant-depth logical gates throughout an infinite family to be certified on a constant-size HGP seed. Treating local code constructions and expansion bounds as external inputs, our framework identifies the compatibility conditions for combining large dimension and distance, local testability, and constant-depth non-Clifford gates, thereby provides a mathematical foundation for separate constructions that realize these properties simultaneously.
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.
It is a major challenge in quantum fault-tolerance to obtain low-overhead protocols for performing non-Clifford gates. In this vein, we construct quantum codes with low-weight stabilizers that support transversal (i.e. low-depth) implementations of the non-Clifford Cr−1Z gate, for every constant r≥3. In particular, we obtain length-n quantum LDPC codes (with constant-weight stabilizers) of polynomial distance d≥n(1−ε)/r supporting transversal Cr−1Z gates on a close-to-linear number k≥n1−ε of disjoint tuples of logical qubits, for arbitrarily small ε>0. Our construction is the first with constant-weight stabilizers that obtains dk≫n, and as a consequence achieves arbitrarily small magic state overhead exponent γ=log(n/k)/log(d)>0. Comparable prior constructions instead required at least polylogarithmic stabilizer weight. We also show how to obtain linearly many k=Ω(n) logical Cr−1Z gates, though with stabilizer weight and physical circuit depth nε. We show that our transversal gates also support addressing (i.e. targeting) of specific logical qubits.
To obtain our codes, we develop a general transformation based on cup products that maps classical codes satisfying a multiplication property to quantum codes with transversal Cr−1Z. We apply this transformation to a new family of classical Tanner codes that we construct from punctured tensor products of algebraic codes.
We systematically construct and classify fault-tolerant logical gates implemented by constant-depth circuits for quantum codes using cohomology operations and symmetry. These logical gates are obtained from unitary operators given by symmetry-protected topological responses, which correspond to generators of group cohomology and can be expressed explicitly on the lattice using cohomology operations including cup product, Steenrod squares and new combinations of higher cup products called higher Pontryagin powers. Our study covers most types of the cohomology operations in the literature. This hence gives rise to logical Cn−1Z gates in n copies of quantum codes via the n-fold cup product in the usual color code paradigm, as well as several new classes of diagonal and non-diagonal logical gates in increasing Clifford hierarchies beyond the color code paradigm, including the logical Rk and multi-controlled CmRk gates for codes defined in projective spaces. Implementing these gates could make it more efficient to compile specific types of quantum algorithms such as Shor's algorithm. We further extend the construction to quantum codes with boundaries, which generalizes the folding approach in color codes. We also present a formalism for addressable and parallelizable logical gates in LDPC codes via higher-form symmetries. We further construct logical Clifford gates in expander-based codes including the asymptotically good LDPC codes and hypergraph-product codes. As a byproduct, we find new topological responses of finite higher-form symmetries using higher Pontryagin powers.
Finding efficient schemes for non-Clifford logic or magic state preparation is one of the central challenges on the way to fault-tolerant quantum computation. Many of the proposed schemes rely on diagonal non-Clifford logical gates acting on CSS codes in space or decorating CSS-type syndrome-extraction circuits in spacetime. Here we propose and implement efficient algorithms to find all (spacetime) logical gates of a given CSS code (circuit) composed from a prescribed set of ansatz gates. Depending on the choice of ansatz gates, this means finding transversal gates, more general locality-preserving logical circuits, folding gates, or similar. While we focus on qubit diagonal gates in the Clifford hierarchy, we also discuss the generalization to arbitrary diagonal non-hierarchy gates, certain non-diagonal gates, as well as prime and composite-dimensional qudits. Our method works by rephrasing code-space preserving gates as the kernel of the ``pullback'' of the X check matrix onto phase functions, which maps between finite abelian 2-groups. We implement a fast ``filtration'' method to find this kernel. The runtime for finding fault-tolerant logical gates in a qLDPC code with O(n) qubits or a circuit with O(n) gates in a naive dense implementation is O(n3), with potential for improvement making use of sparsity.