Calderbank-Shor-Steane (CSS) codes, constructed from nested classical codes
C2⊆C1, are typically optimized for good code parameters. However, practical quantum computing equally demands fault-tolerant logical gates. In this work, we characterize nested pairs
(C1,C2) whose resulting CSS codes realize a target logical diagonal gate via transversal physical
Z-rotations. In doing so, we recover a result of Camps-Moreno et al. that CSS codes can realize only logical single-qubit
Z-rotations and multi-qubit controlled
Z-rotations via transversal physical
Z-rotations. Building on our characterization, we develop the ''appending construction'', that takes as input an
[[n′,k′]] CSS code
Q′ and a target logical
Z-rotation (single-qubit or multi-controlled)
UL, and extends
Q′ by systematically appending
n′′ physical qubits to obtain an
[[n,k]] CSS code
Q with
n=n′+n′′ and
k=k′. The target logical gate
UL is realized in
Q by applying a well-chosen physical transversal
Z-rotation to the
n′′ appended physical qubits. Moreover, any logical gate realized via transversal physical
Z-rotations in the input code
Q′ remains transversally realizable in the extended code
Q. The CSS code
Q may incur a loss in minimum distance, but the loss can be controlled through the parameter choices made in the construction. By repeatedly applying the appending construction, we can extend any CSS code
Q′ to obtain a CSS code
Q that supports fault-tolerant implementations of multiple desired logical
Z-rotations. The cost to be paid for this is the increased physical qubit overhead as the number of target logical gates grows. To illustrate our methodology, we construct CSS code families that transversally realize addressable logical single-qubit and multi-controlled
Z-rotations.
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.
The challenge of quantum computing is to combine error resilience with universal computation. Diagonal gates such as the transversal T gate play an important role in implementing a universal set of quantum operations. This paper introduces a framework that describes the process of preparing a code state, applying a diagonal physical gate, measuring a code syndrome, and applying a Pauli correction that may depend on the measured syndrome (the average logical channel induced by an arbitrary diagonal gate). It focuses on CSS codes, and describes the interaction of code states and physical gates in terms of generator coefficients determined by the induced logical operator. The interaction of code states and diagonal gates depends very strongly on the signs of Z -stabilizers in the CSS code, and the proposed generator coefficient framework explicitly includes this degree of freedom. The paper derives necessary and sufficient conditions for an arbitrary diagonal gate to preserve the code space of a stabilizer code, and provides an explicit expression of the induced logical operator. When the diagonal gate is a quadratic form diagonal gate (introduced by Rengaswamy et al.), the conditions can be expressed in terms of divisibility of weights in the two classical codes that determine the CSS code. These codes find application in magic state distillation and elsewhere. When all the signs are positive, the paper characterizes all possible CSS codes, invariant under transversal Z -rotation through π/2l , that are constructed from classical Reed-Muller codes by deriving the necessary and sufficient constraints on l . The generator coefficient framework extends to arbitrary stabilizer codes but there is nothing to be gained by considering the more general class of non-degenerate stabilizer codes.
Divisible codes are defined by the property that codeword weights share a common divisor greater than one. They are used to design signals for communications and sensing, and this paper explores how they can be used to protect quantum information as it is transformed by logical gates. Given a CSS code
C, we derive conditions that are both necessary and sufficient for a transversal diagonal physical operator
UZ to preserve
C and induce
UL. The group of
Z-stabilizers in a CSS code
C is determined by the dual of a classical
[n,k1] binary code
C1, and the group of
X-stabilizers is determined by a classical
[n,k2] binary code
C2 that is contained in
C1. The requirement that a diagonal physical operator
UZ fixes a CSS code
C leads to constraints on the congruence of weights in cosets of
C2. These constraints are a perfect fit to divisible codes, and represent an opportunity to take advantage of the extensive literature on classical codes with two or three weights. We construct new families of CSS codes using cosets of the first order Reed Muller code defined by quadratic forms. We provide a simple alternative to the standard method of deriving the coset weight distributions (based on Dickson normal form) that may be of independent interest. Finally, we develop an approach to circumventing the Eastin-Knill Theorem which states that no QECC can implement a universal set of logical gates through transversal gates alone. The essential idea is to design stabilizer codes in layers, with
N1 inner qubits and
N2 outer qubits, and to assemble a universal set of fault tolerant gates on the inner qubits.
Universal fault-tolerant quantum computing combines versatile but expensive operations with specialized but cheap ones. Its efficiency depends on how much computation can be pushed onto the cheap operations and on the size of the code needed to do so. Automorphism gates provide such cheap operations using only physical single-qubit Clifford gates and qubit permutations. Yet no general theory characterizes their maximum logical power or the minimum code size needed to attain it. We develop such a theory. For stabilizer codes encoding
k≥3 logical qubits, we show that the largest logical group attainable by automorphisms is generated by all addressable
S and
CX gates, and we construct codes attaining it. While this group contains exponentially fewer gates than the full Clifford group, adding one suitable non-Clifford gate yields universality. We further classify the largest logical groups attainable using qubit permutations, physical single-qubit Cliffords, or both across general stabilizer and CSS codes, and derive refined bounds for self-dual CSS subclasses. Achieving the maximum-size logical group through automorphisms requires
n=Θ(2k) physical qubits. By contrast, all addressable diagonal Clifford gates, generated by
S and
CZ, require only
n=Θ(k2) physical qubits when implemented using physical single-qubit Cliffords alone. Both bounds are tight. This polynomial qubit cost extends beyond Cliffords to all addressable diagonal gates at any fixed level of the Clifford hierarchy, using physical single-qubit diagonal gates. Thus, for full addressability, the sharpest physical-qubit cost divide lies between diagonal and
CX-type gates, not between Clifford and non-Clifford gates.
Fault-tolerant quantum computation requires error-correcting codes that not only protect quantum information but also support useful logical operations with practical physical realizations. Here we develop a general framework in which the stabilizer syndromes of commuting Pauli rotations directly organize logical-gate design. We derive an exact codespace-preservation condition valid at arbitrary rotation angles, providing a common stabilizer-level description for CSS and non-CSS codes and for both Clifford and non-Clifford operations. A particularly useful equal-syndrome specialization reduces Clifford gate design to stabilizer factorization, yields a general generator weight bound of
⌈d/2⌉ for distance-
d codes, and systematically extends to logical rotations higher in the Clifford hierarchy. Applied to bivariate-bicycle (BB) and non-CSS Mirror qLDPC codes, the framework gives explicit low-weight Clifford and controlled-phase gates. Our implementations yield new low-weight gates, including an addressed
T gate on the
[[16,4,4]] BB code,
T-type rotations on the
[[64,8,8]] BB code, and CCZ-, CS-, and
T-type operations on the
[[36,6,6]] Mirror code. We also develop analytic constructions using Clifford algebra bases, which turn the syndrome constraints into explicit algebraic relations and provide a systematic route to logical addressability. We use this approach to analytically construct addressed CNOT, SWAP, controlled, and CCZ-type gates on recursive hypercube codes. An independent construction on middle quantum Reed--Muller codes yields C
rZ gates that saturate the equal-syndrome weight bound. These results establish stabilizer syndromes as a constructive link between the stabilizer structure of a quantum code, the logical computations it can directly support, and the fault-tolerance properties of their physical realizations.