Papers
Topics
Authors
Recent
Search
2000 character limit reached

Automated Circuit Depth Reduction of Quantum Subroutines via Compilation

Published 6 May 2026 in quant-ph | (2605.04748v1)

Abstract: Optimizing quantum circuits by reducing circuit depth is essential for improving the efficiency and scalability of quantum algorithms, particularly as quantum hardware continues to evolve. This can be achieved by restructuring quantum algorithms to allow more parallelism. A compiler is needed to automatically detect and apply these optimizations. In this work, we focus on the optimization of two fundamental quantum subroutines: GHZ state creation and CNOT/CZ chain decomposition. Traditional implementations of these subroutines suffer from linearly increasing circuit depth, which limits scalability. We propose a compiler-driven approach that automatically detects and optimizes these two fundamental quantum subroutines. Our approach reduces circuit depth through constant-depth GHZ state creation, constant depth CZ chain decomposition, and logarithmic depth recursive CNOT chain decomposition, which enhance parallel execution. Performance analysis of benchmarked algorithms shows significant reductions in depth. However, our solution also results in an increased gate count, which makes our optimization a trade-off. The gate count for the CNOT chains is doubled, where logarithmic depth reduction is achieved. The reduced circuit depth results in more efficient algorithms by reducing execution time.

Summary

  • The paper presents an automated compiler-driven method for reducing circuit depth in key quantum subroutines.
  • It introduces optimized GHZ state creation and CNOT/CZ chain decompositions that achieve logarithmic or constant depth scaling.
  • The approach balances the trade-off between gate count overhead and depth reduction, leading to enhanced performance on NISQ devices.

Automated Circuit Depth Reduction of Quantum Subroutines via Compilation

Introduction

Optimizing quantum circuits is critical for achieving algorithmic efficiency, improving scalability, and minimizing noise-induced errors, especially for near-term quantum hardware with restricted qubit connectivity and hardware noise constraints. This paper presents a compiler-driven methodology for automated circuit depth reduction of quantum circuits, focusing on two fundamental subroutines: GHZ state creation and CNOT/CZ entangling chains. The linear depth scaling inherent in conventional implementations of these routines severely limits practical utilization on NISQ devices. By restructuring these routines to enable parallel execution, circuit depth can be substantially reduced, providing significant improvements in execution time and circuit fidelity.

Optimized Decompositions of Subroutines

GHZ State Creation Variants

The GHZ state is widely utilized in quantum entanglement, error correction, and distributed quantum protocols. The canonical implementation relies on sequential application of CNOT gates, resulting in linear depth scaling with respect to the number of qubits. The paper introduces compiler-driven detection of GHZ subroutine patterns and transformation to variants with logarithmic and constant depth scaling. The logarithmic-depth variant leverages tree-like entanglement structures, while the constant-depth design utilizes full parallelization with additional measurement operations. Figure 1

Figure 1: Circuit representation of a standard GHZ state generation in a configuration linear to the number of qubits. Gates in between dotted lines can be executed in parallel.

Figure 2

Figure 2: Circuit representation of an improved GHZ state generation scheme with depth logarithmic in the number of qubits. Gates in between dotted lines can be executed in parallel.

Figure 3

Figure 3: Circuit representation of an improved GHZ state generation scheme with constant depth. The design allows gates to be added fully in parallel as the number of qubits increases. The Z symbol denotes measurement in the Z basis.

The compiler’s workflow can prioritize measurement robustness or maximal parallelism, producing circuits with constant or logarithmic depth, respectively. Both approaches maintain logical equivalence but offer distinct trade-offs in circuit depth, gate count, and measurement overhead.

CNOT and CZ Chain Decomposition

Entangling chains of CNOT or CZ gates are pervasive in variational algorithms and stabilizer codes. Naive implementations manifest as strictly sequential chains, yielding circuit depth scaling linearly with chain length. The compiler introduces recursive decomposition for CNOT chains, systematically partitioning the chain to enable layers of parallel CNOT execution and achieve logarithmic depth scaling. CZ chains exploit gate symmetry for constant-depth decomposition regardless of chain length. The compiler automatically detects and applies these transformations based on operational semantics and qubit indexing. Figure 4

Figure 4: A CNOT chain with additional regions identified for other operations that can be moved. Operations in the blue region can be moved backwards in the circuit. Operations in the red region can be moved forward. Operations in the yellow box break the chain, except for RZ gates that can move through control qubits.

Figure 5

Figure 5: A representation of three CNOT chains that have intertwined operations. The compiler will see parts of all the chains at the same time and it has to be capable of identifying all chains. The identified red chain will be pushed forward while the blue chain is pushed backward. After the compiler has identified the middle chain, it will start searching from the start of the chain again.

Figure 6

Figure 6: A flowchart describing the functionality of the detection algorithm. The algorithm is capable of detecting forward/backward CX and CZ chains. A chain is broken when an instruction is put in the chain that cannot be moved away. Decomposition is performed afterwards on the detected chain.

Compiler Architecture and Detection Algorithms

The compiler operates in four stages: detection of subroutine patterns, identification of relevant qubits, application of efficient decomposition with user-defined preferences, and reinsertion into the original circuit. Chain subroutine detection relies on commutativity rules and circuit traversal algorithms capable of handling interleaved operations and intertwined chains. Detection avoids premature chain segmentation and guarantees the application of the most depth-efficient transformations.

Improvement-aware transformation is central to the compiler: decompositions are applied only if they yield circuit depth reduction in the local context. This is verified through a sliding evaluation window that compares pre- and post-transformation depth within a specified instruction scope. Depth reduction is prioritized over unconditional chain transformation, preventing inadvertent increases in depth. User preferences allow for more aggressive optimizations at the expense of potential transient increases in depth.

Evaluation and Numerical Results

Empirical evaluation demonstrates substantial depth reductions across benchmark circuits and VQE ansatz templates. The GHZ state transformations transition circuit depth from linear to logarithmic or constant scaling, subject to the selected variant. Gate-count overhead, notably in the constant-depth GHZ scheme and recursive CNOT chain decomposition, is moderate but offset by the exponential reduction in circuit depth. Figure 7

Figure 7: The graph compares benchmark circuit depths before (blue) and after (orange) using the compiler. Missing blue dots indicate that no change occurred. The results show that the compiler effectively identifies benchmarks that benefit from the chain reduction strategy.

Figure 8

Figure 8: The plot shows VQEs that improved using our compiler, depicting the relative change in circuit depth before and after compilation (relative depth). Different benchmarks respond differently: some scale consistently with repetitions, while others show diminishing improvements as repetitions increase. The figure also demonstrates that the compiler can avoid applying transformations when unnecessary, as indicated by some algorithms maintaining a relative depth of 0 until the number of qubits exceeds a certain threshold.

CNOT chain optimizations achieve logarithmic-depth scaling, with worst-case doubling of gate count. The compiler’s improvement detection mechanism ensures that only beneficial transformations are applied, resulting in monotonic depth savings across benchmarks. VQE circuits with deep sequential gate structures exhibit maximal depth reductions; improvements are diminished in highly parallelized or repeated-layer templates.

Practical and Theoretical Implications

The compiler provides substantial practical advances for NISQ-era quantum devices, where circuit depth is an acute limiting factor due to decoherence and error rates. Automated depth reduction enables longer and more complex algorithms to be executed with improved fidelity. In particular, the approach is theoretically significant as it automates nontrivial decomposition strategies that previously required manual intervention or bespoke circuit design.

The judicious trade-off between gate count and circuit depth aligns with the realities of NISQ hardware, where execution time and parallelization are more impactful than raw gate count. The compiler architecture is extensible, allowing for integration of hardware-specific optimization passes, connectivity mapping, and noise-aware transformations.

Future developments may include detection and transformation of additional sequential subroutines, heuristic integration of hardware topology, and co-design with classical-quantum compilers to maximize cross-layer optimization.

Conclusion

The compiler-based approach outlined in this paper establishes an effective methodology for automated circuit depth reduction in quantum circuits. By focusing on GHZ state creation and CNOT/CZ chains, the compiler achieves logarithmic or constant depth scaling, enabling more efficient algorithms for quantum hardware constrained by noise and connectivity. Depth reduction is obtained without sacrificing logical correctness, and transformations are conservatively applied to ensure monotonic improvement. The practical utility and theoretical extensibility of the compiler framework position it as a significant tool for quantum circuit optimization, especially as hardware and algorithmic complexity continue to increase.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.