Staudacher, K. (2021):Optimization Approaches for Quantum Circuits using ZXcalculusQuantum 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 twostate 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 quantumlogical 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 ZXcalculus, 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 ZXdiagrams and using rules of the ZXcalculus for diagram simplification. However, some rules can modify ZXdiagrams in such a way that the reextraction of a quantum circuit is no longer possible. Moreover, rules that simplify ZXdiagrams 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 ZXrules. This allows treating ZXdiagram simplification as a classical search problem where heuristics can be applied to guide the sequence of rule applications towards minimal circuits. We implement different heuristicbased algorithms like greedy search, random search and simulated annealing in the opensource 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.
