QCIR: Pattern Matching Based Universal Quantum Circuit Rewriting Framework
Published in International Conference on Computer-Aided Design (ICCAD), 2022
Due to multiple limitations of quantum computers in the NISQ era, quantum compilation efforts are required to efficiently execute quantum algorithms on NISQ devices. Program rewriting based on pattern matching can improve the generalization ability of compiler optimization. However, it has rarely been explored for quantum circuit optimization, further considering physical features of target devices.
In this paper, we propose a pattern-matching based quantum circuit optimization framework QCIR with a novel pattern description format, enabling the user-configured cost model and two categories of patterns, i.e., generic patterns and folding patterns. To get better compilation latency, we propose a DAG representation of quantum circuit called QCIR-DAG, and QVF algorithm for subcircuit matching. We implement continuous single-qubit optimization pass constructed by QCIR, achieving 10\% and 20\% optimization rate for benchmarks from Qiskit and ScaffCC, respectively.The practicality of QCIR is demonstrated by execution time and experimental results on the quantum simulator and quantum devices.
Recommended citation: Mingyu Chen, Yu Zhang, Yongshang Li, Zhen Wang, Jun Li, and Xiangyang Li, QCIR: Pattern Matching Based Universal Quantum Circuit Rewriting Framework, in Proceedings of the 41st IEEE/ACM International Conference on Computer-Aided Design, San Diego California: ACM, Oct. 2022.
Download Paper