# Can Logical CNOTs Cross Between Different QEC Codes Automatically?
A new automated framework from Asmae Benhemou and Noah Berthusen answers one of fault-tolerant quantum computing's most stubborn interface problems: how to perform logical [CNOT gate](https://quantumintel.tech/glossary/cnot-gate) operations between [logical qubits](https://quantumintel.tech/glossary/logical-qubit) encoded in *different* CSS codes without discarding the distance guarantees of either code.
The core problem is well-known inside the QEC community but underappreciated outside it. Transversal CNOTs — the standard, naturally fault-tolerant method for entangling logical qubits — work cleanly when both codes are identical. When the codes differ, the transversal trick breaks down, and previously the only known inter-code logical CNOT constructions were either hand-crafted or restricted to structurally related code families. Any architecture that mixes code types — a practical inevitability in heterogeneous modular systems, concatenated hierarchies, or platforms that combine memory codes with compute codes — has been forced to use expensive, resource-intensive workarounds.
Benhemou and Berthusen's paper, posted to arXiv on 2 July 2026, replaces that manual effort with a systematic, algorithmic approach: given any two CSS codes and a target bipartite logical CNOT network between them, their framework constructs the full affine space of chain maps realising that logical action, then searches that space for shallow, sparse physical circuit candidates. The method recovers known transversal constructions as special cases and finds new low-depth solutions, including distance-preserving and partially distance-preserving examples.
---
## Why Inter-Code Logical Gates Have Been a Persistent Bottleneck
[Fault-tolerant quantum computing](https://quantumintel.tech/glossary/fault-tolerant-quantum-computing) architectures are increasingly heterogeneous. A modular superconducting processor might use high-rate LDPC codes for qubit memory and smaller surface codes for ancilla-heavy syndrome extraction. A photonic architecture might interface with a trapped-ion module running a completely different stabiliser code. Any time a logical qubit moves — functionally or physically — across a code boundary, the interface operation needs to be fault-tolerant, or the entire error-correction hierarchy is compromised at that joint.
Until now, that interface has been a weak point. Known constructions for inter-code logical CNOTs existed primarily for structurally related families: codes sharing a common sub-structure that allowed researchers to identify, by inspection or algebraic insight, a valid physical gate sequence. For arbitrary CSS code pairs, no systematic method existed. This forced hardware architects either to restrict themselves to homogeneous code deployments — limiting flexibility — or to accept expensive code conversion steps between operations.
The depth and sparsity of inter-code circuits matters enormously. Every additional physical layer of gates between a logical control and logical target is an opportunity for errors to accumulate. On any real hardware, whether superconducting transmons, trapped ions, or neutral atoms, minimising [circuit depth](https://quantumintel.tech/glossary/circuit-depth) at the logical layer is essential to maintaining operations [below threshold](https://quantumintel.tech/glossary/below-threshold).
---
## The Chain Map Framework: What It Actually Does
The algebraic engine underlying the method is the chain map — a structure-preserving linear map between the chain complexes that encode the CSS codes. CSS codes are naturally described by chain complexes: the X and Z stabiliser generators form boundary operators, and logical operators correspond to homological equivalence classes. A chain map between two such complexes is precisely the mathematical object that can implement a logical operation on one code by acting physically on the other.
Benhemou and Berthusen's key insight is that the set of chain maps realising a given logical CNOT network between two CSS codes forms an *affine space* — it has a structured geometry that can be searched algorithmically. Their framework:
1. **Constructs the affine space** of valid chain maps for the desired logical action between two specified CSS codes.
2. **Searches that space** for solutions that minimise physical circuit depth and weight (sparsity), using the structure of the space to make the search tractable.
3. **Identifies distance properties** of the resulting circuits — crucially, it can find distance-preserving solutions, meaning the inter-code operation does not degrade the code distance of either participating code.
4. **Promotes partially distance-preserving solutions** to the full code distance using additional flag measurements.
The paper benchmarks the method across a range of heterogeneous CSS code pairs. Beyond recovering known constructions as a consistency check, the framework finds new low-depth solutions that were previously unknown. Critically, the authors demonstrate that the approach is not limited to toy cases: the solutions include distance-preserving examples, which are the ones that matter for genuine fault-tolerant operation.
---
## Applications: Where This Changes the Cost Calculus
The authors explicitly discuss four application domains where chain-map-synthesised inter-code gadgets improve on current approaches:
### Code Switching
Code switching — transitioning a logical qubit from one encoding to another — is a standard strategy for accessing gates that are transversal in one code but not another. The usual overhead involves decoding and re-encoding, which is costly. Bespoke chain maps can implement the switch more efficiently, with the inter-code circuit doing useful logical work rather than just transferring state.
### Magic-State Injection
[Magic state](https://quantumintel.tech/glossary/magic-state) injection, the standard route to universal fault-tolerant computation beyond the Clifford group, requires moving a resource state from a distillation factory (often operating under a different code than the compute register) into the computational code. The interface circuit for this injection is exactly the kind of inter-code logical operation the framework targets. A shallower, distance-preserving injection circuit reduces the overhead of the distillation-to-computation pipeline.
### Pauli Product Measurements
Many fault-tolerant protocols, including lattice surgery and measurement-based approaches, decompose non-Clifford gates into Pauli product measurements across code blocks. When those blocks carry different codes, synthesising the measurement gadget is non-trivial. Chain maps provide a systematic construction.
### Concatenated Codes
Concatenated code architectures, where a logical qubit of an outer code is itself encoded in an inner code, produce exactly the kind of heterogeneous code interface the framework addresses. Operations at the boundary between concatenation levels now have a systematic construction path.
The paper notes that chain maps offer favourable spacetime tradeoffs for logical interfaces in heterogeneous architectures — a direct statement about resource efficiency that hardware teams and systems architects will find relevant.
---
## Extension to Logical CZ Gates
The authors also show that the framework extends straightforwardly to targeted logical CZ gates, the other fundamental two-qubit [Clifford gate](https://quantumintel.tech/glossary/clifford-gates). This is significant because it means the method is not narrowly scoped to CNOTs but covers the full two-qubit Clifford generator set, making it applicable to a wider range of circuit compilation problems in heterogeneous architectures.
---
## Industry Implications
The practical import of this work is in reducing the manual, bespoke engineering currently required every time a quantum architecture mixes code types. Today, that engineering is done by specialists with deep algebraic topology knowledge — a scarce resource. An automated synthesis framework lowers the barrier: compiler toolchains for fault-tolerant systems can, in principle, call the chain map search as a subroutine whenever they need to cross a code boundary.
For hardware companies building modular systems — particularly those combining different qubit modalities or code structures in a single architecture — this kind of automated inter-code gadget synthesis is exactly the layer that sits between physical hardware characterisation and logical circuit execution. The work does not specify hardware targets, which is appropriate: the CSS code framework is hardware-agnostic, applicable to superconducting, trapped-ion, neutral-atom, and photonic platforms alike.
The skeptical question is whether the affine space search scales. The paper benchmarks on "a range of heterogeneous CSS code pairs" but does not specify the code sizes or search times involved in those benchmarks. For large, high-rate LDPC codes — the codes most relevant to utility-scale fault-tolerant computation — the dimensionality of the affine space could become expensive to search. That scalability question will determine whether this framework remains a theoretical tool for small codes or becomes practically relevant for the code parameters hardware will actually require.
---
## Key Takeaways
- Benhemou and Berthusen introduce an automated method for synthesising inter-code logical CNOT circuits between *arbitrary* CSS codes using chain maps, removing the need for hand-crafted constructions.
- The framework constructs the affine space of valid chain maps for a given logical CNOT network, then searches for shallow, sparse physical circuit solutions.
- It recovers known transversal constructions and finds new low-depth, distance-preserving solutions, with partially distance-preserving results upgradeable using flag measurements.
- Applications span code switching, magic-state injection, Pauli product measurements, and concatenated code operations — all critical components of fault-tolerant architectures.
- The method extends to logical CZ gates, covering the full two-qubit Clifford generator set.
- The key open question for industry relevance is scalability of the affine space search to the large, high-rate LDPC codes required at utility scale.
---
## Frequently Asked Questions
**What is a chain map in the context of quantum error correction?**
In QEC, CSS codes are naturally described using chain complexes from algebraic topology, where stabiliser generators act as boundary operators and logical operators correspond to homological classes. A chain map is a structure-preserving linear map between two such complexes. Benhemou and Berthusen show that chain maps between two CSS code complexes precisely capture the physical gate sequences that implement inter-code logical operations while preserving the error-correction structure.
**Why can't you just use transversal CNOTs between different CSS codes?**
Transversal CNOTs — applying a physical CNOT between each corresponding pair of physical qubits across two code blocks — are fault-tolerant because errors cannot spread between physical qubits. However, transversal gates produce the correct *logical* action only when both code blocks share the same CSS structure. For distinct codes, the transversal gate either implements the wrong logical operation or no well-defined logical operation at all.
**What does "distance-preserving" mean for an inter-code circuit?**
A distance-preserving inter-code circuit is one where the minimum weight of an undetectable logical error on either code block is not reduced by the inter-code operation. Preserving code distance means the fault-tolerance guarantees of both codes remain intact after the inter-code gate. Non-distance-preserving circuits create weakened points where errors can propagate undetected.
**How does this relate to magic-state distillation overhead?**
Magic-state injection requires moving a resource state from a distillation factory into the computational code. The distillation factory typically operates under a different code optimised for low overhead distillation, while the compute register uses a different code optimised for logical operations. The interface between them — the injection circuit — is exactly an inter-code logical operation. Shallower, distance-preserving injection circuits directly reduce the spacetime cost of the distillation-to-computation pipeline, which is one of the dominant overhead costs in fault-tolerant quantum computing.
**Does this framework apply to non-CSS codes?**
The paper focuses specifically on CSS codes, which are the class described by chain complexes over GF(2). The chain map formalism is inherently tied to the CSS structure. Extension to general stabiliser codes (which include non-CSS codes) would require a different algebraic framework and is not addressed in this work.
RESEARCH
Chain Maps Automate Inter-Code Logical CNOTs for Mixed QEC
Published: July 2, 2026 at 13:49 EDTLast updated: July 4, 2026 at 05:32 EDTBy Jonas Vogel, Senior EditorLast reviewed by Jonas Vogel on July 4, 20269 min read
Benhemou & Berthusen automate inter-code logical CNOT synthesis between arbitrary CSS codes using chain maps.
qeccss-codeslogical-qubitclifford-gatesfault-tolerantcode-switchingmagic-state-injectionchain-maps