Hybrid quantum-classical circuit simplification with the ZX-calculus

Agustín Borgna, Simon Perdrix, Benoît Valiron
9/13/2021
quant-ph

Official code: ABorgna/pyzx (2 stars, OpenQASM, Apache-2.0, last commit 2023-11-04).

Abstract

We present a complete optimization procedure for hybrid quantum-classical circuits with classical parity logic. While common optimization techniques for quantum algorithms focus on rewriting solely the pure quantum segments, there is interest in applying a global optimization process for applications such as quantum error correction and quantum assertions.

Show full abstract

This work, based on the pure-quantum circuit optimization procedure by Duncan et al., uses an extension of the formal graphical ZX-calculus called ZX-ground as an intermediary representation of the hybrid circuits to allow for granular optimizations below the quantum-gate level. We define a translation from hybrid circuits into diagrams that admit the graph-theoretical focused-gFlow property, needed for the final extraction back into a circuit. We then derive a number of gFlow-preserving optimization rules for ZX-ground diagrams that reduce the size of the graph, and devise an strategy to find optimization opportunities by rewriting the diagram guided by a Gauss elimination process. Then, after extracting the circuit, we present a general procedure for detecting segments of circuit-like ZX-ground diagrams which can be implemented with classical gates in the extracted circuit. We have implemented our optimization procedure as an extension to the open-source python library PyZX.

View on arXivView PDF

Code Implementations(1)

ABorgna/pyzxOfficial100%
Apache-2.0

Python library for quantum circuit rewriting and optimisation using the ZX-calculus

21OpenQASM, Jupyter NotebookApr 29, 20203 years agoApache-2.0

Similar Papers

Cite this paper

@article{borgna2021hybrid,
  title  = {Hybrid quantum-classical circuit simplification with the ZX-calculus},
  author = {Agustín Borgna and Simon Perdrix and Benoît Valiron},
  year   = {2021},
  eprint = {2109.06071},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.06071}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2109.06071.svg)](https://codeofpaper.com/paper/2109.06071)

Discussion