- The paper introduces code-compiled quantum circuits that, despite generating high entanglement, magic, and non-Gaussianity at the logical level, remain efficiently simulable after physical compilation.
- It leverages CSS error-correcting codes and transversal gate decompositions to map complex logical operations to simple onsite diagonal gates, ensuring a fixed simulation cost.
- Extensive numerical benchmarks reveal that traditional resource indicators alone do not guarantee simulation hardness, challenging standard criteria for quantum advantage.
Efficient Simulation of Quantum Circuits with Large Entanglement, Magic, and Non-Gaussianity via Code-Compiled Tensor Networks
Introduction and Problem Context
The enduring challenge in quantum computation is to delineate the boundary between classically simulable quantum circuits and those which are hard even for the best-known classical algorithms. Standard criteria to certify “quantum advantage” typically hinge upon the circuit generating high entanglement entropy, producing states with significant magic (nonstabilizerness), and exhibiting strong non-Gaussianity. In almost all established frameworks—Clifford circuits, matchgate circuits, or shallow circuits with strictly limited entanglement—breaching these criteria rapidly escalates the cost of classical simulation to exponential scaling.
This work introduces a construction, code-compiled quantum circuits (CCQCs), which explicitly violates this standard intuition by exhibiting highly entangling, magic-rich, and non-Gaussian behavior in the logical description but remains efficiently simulable in the compiled physical representation. The key insight is to leverage CSS error-correcting codes and their symmetries to implement complex logical dynamics through structurally simple, onsite physical circuits. Crucially, the construction exposes the inadequacy of any single resource indicator such as volume-law entanglement or magic to guarantee simulation hardness.
Code-Compiled Quantum Circuit Construction
The CCQC framework is rooted in Calderbank-Shor-Steane (CSS) codes with high rate and rich automorphism groups. The construction proceeds as follows:
- Encoding: An input logical state of k qubits is encoded into N physical qubits via an efficient Clifford encoder.
- Gate library: Circuits are composed from cataloged ‘matched pairs’—collections of code automorphisms (mapped to logical Clifford gates) and code-preserving transversal diagonal gates from high Clifford hierarchy levels, which induce logical non-Clifford operations.
- Logical evolution: Logical circuits can be comprised of nonlocal Clifford and complex diagonal gates, including T, CS, CCZ, CT, CCS, and CCCZ.
- Physical compilation: Every logical gate is compiled as a physical circuit comprised of solely single-qubit diagonal gates and permutations (tracked classically, not as SWAP networks). No circuit optimization is required.
A salient feature is that the only simulation bottleneck is the encoder, which sets a fixed upper bound χE on the bond dimension of subsequent matrix product state (MPS) simulation.
Separation of Logical and Physical Complexity
The essence of the result is the stark contrast between the logical and physical representations:
- Logical circuit: Can generate volume-law entanglement entropy, high magic density, and large interaction distance from the Gaussian manifold (a measure of non-Gaussianity), exceeding thresholds conventionally signaling hard-to-simulate dynamics.
- Compiled physical circuit: Consists exclusively of onsite phase operations and passive relabelings. Neither induces entanglement nor increases MPS bond dimension after encoding. The simulation cost per circuit layer is only O(NχE2), and the total cost is determined by the cost of the encoder and the number of block layers.
This separation is immediate in polar CSS codes, where the logical bond dimension across a balanced cut can be exponential in N0, but the physical bond dimension is linear in N1 (the code block size). For the N2 polar code, the logical state could reach N3, while the physical MPS remains pinned at N4.
Results: Resource Content and Simulation Diagnostics
The authors perform extensive numerical benchmarks using infinite families of polar CSS codes, focusing on instances such as N5, N6, and N7. Randomly sampled circuits from the gate library are shown to possess the following resource properties:
- Entanglement entropy: Maximal cut entropy grows rapidly with circuit depth, far exceeding the regime of efficient generic MPS simulation.
- Magic: Stabilizer Rényi entropy density, estimated via perfect Pauli sampling, is substantial, well above the stabilizer-state baseline.
- Non-Gaussianity: The interaction distance diagnostic indicates clear departure from the free-fermion manifold, with values approaching the theoretical maximum.
Despite these hallmarks of quantum complexity, the simulation of the compiled physical circuit incurs no significant increase in bond dimension after encoding.


Figure 2: A 90-gate non-Clifford logical circuit from the level-N8 N9 polar code, containing T0 and controlled-T1 gates, is compiled to a physical circuit of single-qubit diagonal operations acting onsite.


Figure 4: A highly complex 1,361-gate logical circuit (upper panel) from the level-T2 catalog compiles to a physical circuit that still involves only onsite phases and permutations (lower panel), with no circuit optimization applied.
These figures exemplify CCQC’s central claim: circuits of extreme logical complexity are mapped, via code compilation, to physically simple dynamics.
Alternative Backends and Monomial Circuit Simulation
The framework provides, beyond the tensor network (MPS) backend, an exact phase-polynomial simulation route (PhasePoly.jl) applicable to monomial circuits—those representable as bitstring mappings plus phase polynomials. For CliffordT3 circuits or those with only low-degree phase terms (up to cubic), expectation values can be reduced to Gauss sums or finite differences of the phase polynomials, allowing polynomial-time evaluation. However, generic higher-level Clifford hierarchy gates can break this efficiency unless the physical compilation reduces all such high-degree terms to onsite diagonal actions, preserving simulability.
Applications to Quantum Device Benchmarking
A direct application is in benchmarking near-term quantum devices executing complex logical circuits. The compiled MPS not only serves as a classical reference for direct fidelity estimation of logical circuit outputs, but also enables Pauli sampling and Clifford “pushback” schemes: the device runs the logical circuit, while the compiled reference provides ideal measurement outcomes, obviating the need for full state tomography.
Implications and Outlook
An immediate theoretical implication is the demonstration that standard proxies for classical simulation hardness—entanglement entropy, magic, interaction distance—are individually insufficient: efficient classical simulation is possible through structural properties unique to code-compiled representations. This undermines the idea that resource content alone demarcates the classical-quantum divide, suggesting that hidden structures enforced by code symmetries must be considered.
Practically, the CCQC approach enables new classes of circuits for benchmarking quantum hardware, filling a critical gap for intermediate-to-large scale devices where direct classical simulation is, in principle, infeasible but reference circuits of similar logical depth and complexity are needed.
The construction is not universal, as dictated by the Eastin-Knill theorem—transversal and symmetric gates can never generate a universal gate set. However, the gate families accessible from high-rate, symmetric codes like polar CSS are already rich enough to generate highly nontrivial dynamics.
Future theoretical directions include the systematic exploration of codes that provide richer automorphism or transversal gate groups while keeping encoder complexity tractable. Additionally, hybrid or approximate simulation techniques—combining MPS, phase-polynomial, and stabilizer-rank methods—may further expand the efficiently simulable landscape exposed by code compilation.
Conclusion
Code-compiled quantum circuits represent a significant expansion of the boundaries of efficient classical simulation, demonstrating that neither large entanglement nor abundant magic nor strong non-Gaussianity guarantees hardness in the presence of hidden code symmetry. The proposed framework is immediately relevant for both classical simulation practice and quantum hardware validation, and its structural insights challenge the foundations of quantum complexity theory. This work suggests a reevaluation of resource-based criteria for simulation in favor of deeper, code-structural analysis in both theoretical and applied quantum information science.