Table of Contents
Fetching ...

Optimizing Quantum Circuits, Fast and Slow

Amanda Xu, Abtin Molavi, Swamit Tannu, Aws Albarghouthi

TL;DR

This paper presents a clean, unifying framework for thinking of rewriting and resynthesis as abstract circuit transformations, and presents a radically simple algorithm, guoq, for optimizing quantum circuits that exploits the synergies of rewriting and resynthesis.

Abstract

Optimizing quantum circuits is critical: the number of quantum operations needs to be minimized for a successful evaluation of a circuit on a quantum processor. In this paper we unify two disparate ideas for optimizing quantum circuits, rewrite rules, which are fast standard optimizer passes, and unitary synthesis, which is slow, requiring a search through the space of circuits. We present a clean, unifying framework for thinking of rewriting and resynthesis as abstract circuit transformations. We then present a radically simple algorithm, GUOQ, for optimizing quantum circuits that exploits the synergies of rewriting and resynthesis. Our extensive evaluation demonstrates the ability of GUOQ to strongly outperform existing optimizers on a wide range of benchmarks.

Optimizing Quantum Circuits, Fast and Slow

TL;DR

This paper presents a clean, unifying framework for thinking of rewriting and resynthesis as abstract circuit transformations, and presents a radically simple algorithm, guoq, for optimizing quantum circuits that exploits the synergies of rewriting and resynthesis.

Abstract

Optimizing quantum circuits is critical: the number of quantum operations needs to be minimized for a successful evaluation of a circuit on a quantum processor. In this paper we unify two disparate ideas for optimizing quantum circuits, rewrite rules, which are fast standard optimizer passes, and unitary synthesis, which is slow, requiring a search through the space of circuits. We present a clean, unifying framework for thinking of rewriting and resynthesis as abstract circuit transformations. We then present a radically simple algorithm, GUOQ, for optimizing quantum circuits that exploits the synergies of rewriting and resynthesis. Our extensive evaluation demonstrates the ability of GUOQ to strongly outperform existing optimizers on a wide range of benchmarks.

Paper Structure

This paper contains 54 sections, 2 theorems, 4 equations, 15 figures, 3 tables, 1 algorithm.

Key Result

theorem 1

Suppose we are given a set of transformations $\tau_{\epsilon_{}}^1, \ldots, \tau_{\epsilon_{}}^n$. Let $C_0,\ldots,C_n$ be a sequence of circuits such that $C_i$ is the result of applying transformation $\tau_{\epsilon_{}}^i$ to a subcircuit of $C_{i-1}$ for all $1 \leq i \leq n$. Then, $C_0 \equiv

Figures (15)

  • Figure 1: Summary of guoq compared to state-of-the-art on 2-qubit-gate reduction for the ibmq20 gate set. guoq and BQSKit are allowed to approximate the circuit up to $\epsilon = 10^{-8}$. *Quarl requires an NVIDIA A100 (40GB) GPU to run.
  • Figure 2: Overview of our approach
  • Figure 3: Examples of rewrite rules. Observe how the rules with $R_z^{\theta_{}}\xspace$ use symbolic$\theta$ angles.
  • Figure 4: Example of applying the rule from \ref{['fig:rz-commute-cx']} followed by the rule from \ref{['fig:rz-merge']}.
  • Figure 5: Example of resynthesizing the initial \ref{['fig:rewrite-rule-ex']} circuit.
  • ...and 10 more figures

Theorems & Definitions (6)

  • definition 1: Hilbert--Schmidt distance
  • definition 2: Approximate circuit equivalence
  • definition 3: Transformation
  • theorem 1
  • definition 4: Quantum-Circuit Optimization Problem
  • theorem 2: Correctness of guoq