Fast Template Matching for Quantum Circuits Using Hypergraph
Xin Hong, Jintao Yu, Runhong He, Shenggang Ying, Sanjiang Li, Mingsheng Ying
Key points
From the paper's conclusion- Template matching has emerged as one of the dominant approaches for simplifying quantum circuits, yet it confronts the intrinsic challenge of accommodating gate commutativity.
Abstract
Quantum circuit optimization is a key step toward the efficient execution of quantum algorithms. Template matching has emerged as one of the dominant approaches for simplifying quantum circuits, yet it confronts the intrinsic challenge of accommodating gate commutativity. The state-of-the-art template-matching algorithm relies on a directed acyclic graph (DAG) representation. While this DAG-based technique handles gate commutativity satisfactorily, it fails to preserve the local connectivity inherent to quantum circuits, thereby leading to relatively high matching complexity. In this paper, we introduce a hypergraph representation (HG), a commutativity-aware representation that collapses commuting gates into a single super-node while retaining all local connectivity. This enables matches to be extended locally without revisiting the rest of the circuit, with incremental updates limited to the immediate neighborhood. Experimental results demonstrate that our HG matcher achieves 11--606x speed-up over the DAG-based implementation in Qiskit (Iten et al., 2022) on both random and arithmetic benchmarks, while maintaining the same optimization quality. The acceleration increases with circuit size, confirming that preserving locality and connectivity is the key to scalable quantum circuit optimisation.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Dynamic Quantum Circuit CompilationIEEE Transactions on Computers · 2025
- A Multilevel Framework for Partitioning Quantum CircuitsQuantum · 2026
- Evaluating Quantum Circuit Protection Methods After Compilation: An Empirical ComparisonarXiv · 2026
- Circuit compilation in the quspect quantum SDK: selecting routings after coupling-constrained resynthesisarXiv · 2026
- Discovery of connectivity-trainability trade-off of IQP circuits for Hamiltonian optimizationPhysica Scripta · 2026
- Cqlib: A High-Performance Software Stack for Quantum ComputingarXiv · 2026