Manuscript Offprint

arXiv:2609.01762

Synthesis of Compact and Expressive Quantum-Circuit Optimizations

Wei Qiang, Ronghui Gu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

WEI QIANG, Columbia University, USA

RONGHUI GU, Columbia University, USA and CertiK, USA

Today's quantum devices are noisy, so reducing circuit size is critical for reliable execution. Existing rule-based optimizers often rely on large rule sets that are difficult to manage and still miss long-distance transformations. We present QSYMB, a framework for synthesizing compact and expressive quantum-circuit rewrite rules with formal guarantees. We formalize symbolic rewrite rules in which a symbolic gate represents infinitely many subcircuits. We then define canonical symbolic rules of the form L;S=S;RL; S = S; R and prove that they constitute a compact generative core from which general symbolic rules can be derived. On top of this formal foundation, given a gate set, QSYMB synthesizes (1) a small, non-derivable concrete rule set that is complete up to chosen size and qubit bounds, and (2) a small but expressive canonical symbolic rule set that captures transformations beyond finite or monomial-only patterns. We further present rule anchoring to derive optimization-effective rules from canonical symbolic rules. Together, these results provide both expressiveness and guarantees: soundness of synthesized rules via validation, non-derivability, and bounded completeness. On the IBM-Eagle gate set, QSYMB strictly outperforms state-of-the-art rewrite-based optimizers (Qiskit, Guoq, Quartz, TKET, and Queso) in two-qubit-gate reduction on 90%, 67%, 82%, 85%, and 83% of standard quantum algorithm benchmarks, respectively; on Nam gate set, the corresponding rates are 88%, 74%, 81%, 86%, and 82.9%. It achieves final average two-qubit-gate reductions of 27.44% and 29.95%, respectively.

CCS Concepts: • Software and its engineering → Compilers; • Hardware → Quantum computation; • Theory of computation → Equational logic and rewriting.

Additional Key Words and Phrases: quantum circuit optimization, rewrite-rule inference, equality saturation, symbolic rewriting

ACM Reference Format:

Wei Qiang and Ronghui Gu. 2026. Synthesis of Compact and Expressive Quantum-Circuit Optimizations. Proc. ACM Program. Lang. 10, OOPSLA2, Article 318 (October 2026), 28 pages. https://doi.org/10.1145/3839450

1 Introduction

Quantum computing promises to revolutionize computation by exploiting quantum-mechanical phenomena such as superposition and entanglement to perform tasks that are intractable for classical machines [37, 39]. Yet, until recently, quantum hardware has seen limited realization in practice. Today's quantum hardware—often referred to as Noisy Intermediate-Scale Quantum (NISQ) devices [32]—remains severely impacted by short coherence times, gate errors, and restricted qubit connectivity. Recent developments have implemented error-corrected logical qubits and demonstrated the potential to reduce logical errors [3]. As a result, the efficiency of compiled quantum circuits has a direct and often dominant impact on whether an algorithm can be executed reliably on real hardware. Because each operation is noisy, reducing circuit size is essential for

Authors' Contact Information: Wei Qiang, Columbia University, New York, USA, wei.qiang@cs.columbia.edu; Ronghui Gu, Columbia University, New York, USA and CertiK, New York, USA, ronghui.gu@columbia.edu.

Figure

This work is licensed under a Creative Commons Attribution 4.0 International License.

© 2026 Copyright held by the owner/author(s).

ACM 2475-1421/2026/10-ART318

https://doi.org/10.1145/3839450

318:2

Wei Qiang and Ronghui Gu

lowering error rates. Without optimization, circuits can produce results that are indistinguishable from random noise.

One promising direction is to treat circuit optimization as a process of equational rewriting, where small, equivalent circuit fragments are expressed as rewrite rules. The most prominent approach is peephole optimization, which uses local, bounded-size rewrite rules. Some work relies on domain experts to manually write a small set of rules [13, 18, 25], while others synthesize rewrite rules automatically [42, 44]. However, existing techniques still produce a large number of rules, many of which are redundant or derivable from others, and they still fail to capture the full range of useful transformations. For example, previous works synthesize either rewrite rules with symbolic parameters [44] or symbolic rules over monomial gates [42]; the latter represent only a finite set of monomial subcircuits, do not induce superposition, and are limited in expressiveness. Both approaches generate large rule sets yet still suffer from limited expressiveness.

The goal of this paper is to answer the following question: Can we automatically synthesize quantum-circuit optimizations that are compact, expressive, and effective in practice? QSYMB formalizes symbolic rewrite rules in which symbolic variables represent infinite subcircuit spaces, and their associated constraints characterize the full solution set for which the left-hand side and right-hand side are equivalent. We also formalize canonical symbolic rules of the form L;S=S;RL; S = S; R, from which many other symbolic rules can be derived. These canonical rules provide a compact generative basis for deriving additional rules. QSYMB then introduces a novel approach to quantum optimization via rewrite-rule synthesis that addresses both limitations in compactness and expressiveness. We present a framework that, given a gate set, automatically synthesizes: (1) a much smaller set of concrete rewrite rules that are non-derivable yet complete for circuits up to a given size and qubit count, and (2) a small, expressive set of canonical symbolic rewrite rules in which symbolic variables represent infinite subcircuit spaces satisfying specific constraints, including subcircuits that induce superposition. Although the canonical symbolic rule set is complete up to the (n,q)(n, q) bounds, many of its rules are size-preserving. To address this, we introduce a novel technique for composing more useful rules from the canonical symbolic rule set, enabling more effective optimization. We demonstrate the effectiveness of our synthesized rules by applying them to optimize quantum circuits using common techniques such as equality saturation [40] and stochastic search. Our experiments show that our simple optimizer, using the generated rule set, achieves superior optimization results compared to prior approaches that rely on larger, less structured rule sets. To summarize, QSYMB contributes the following:

  • Advances the existing rule inference approach using equality saturation in the synthesis of quantum concrete rules.
  • Formalizes the notion of symbolic rule and presents a novel synthesis technique that generates symbolic rules efficiently and significantly reduces the term space without compromising completeness.
  • Introduces a novel rule-composition approach, rule anchoring, that derives more useful rules from the rule set while keeping it small.
  • Shows that the generated rule set can be integrated with simple optimization algorithms and outperforms state-of-the-art rewrite-based optimizers.

References (31)