Staudacher, K. (2021):Optimization Approaches for Quantum Circuits using ZX-calculusQuantum computing is a promising research field in modern computer science as quantum computers have the potential to solve some computationally hard problems much faster than classical computers. Instead of bits, quantum computers use two-state quantum mechanical systems called qubits which have some useful properties such as entanglement and superposition that have no bit equivalent. Similar to classical computers where bits are modified by Boolean gates on circuits, qubits can be modified by quantum-logical gates on quantum circuits. While in theory there are many applications for quantum computers from a variety of different research areas, in practice most them cannot yet be realized on up to date quantum computers as the size of quantum circuits is strongly limited by hardware and physical constraints. Therefore, it is crucial to optimize quantum circuits as far as possible in terms of size and complexity. This work focuses on quantum circuit optimization using the ZX-calculus, a recently developed graphical language designed to simplify reasoning about quantum systems. Quantum circuits can be optimized in an intuitive and efficient way by transforming them to equivalent ZX-diagrams and using rules of the ZX-calculus for diagram simplification. However, some rules can modify ZX-diagrams in such a way that the re-extraction of a quantum circuit is no longer possible. Moreover, rules that simplify ZX-diagrams can still increase the size of the underlying circuits. Due to these problems, most of the existing ZXcalculus based optimization approaches become inefficient with increasing quantum circuit complexity. In our work we develop different strategies to improve those approaches. In particular, we introduce heuristics to estimate the optimization benefit gained by certain ZX-rules. This allows treating ZX-diagram simplification as a classical search problem where heuristics can be applied to guide the sequence of rule applications towards minimal circuits. We implement different heuristic-based algorithms like greedy search, random search and simulated annealing in the open-source library PyZX where we test them against existing strategies on circuits of variant size. The results show that using heuristics in diagram simplification often leads to better overall optimization results, especially when optimizing large and complex quantum circuits. Our algorithms can be further improved in several aspects like runtime or consideration of hardware topology.
|