A Comparison of Quantum Compilers using a DAG-based or phase polynomial-based Intermediate Representation

Arianne Meijer - van de Griend
2024-09-20
Abstract:In the NISQ era, where quantum computing is dominated by hybrid quantum algorithms, it is important for quantum circuits to be well-optimized to reduce noise from unnecessary gates. We investigate different phase polynomial-based compilation strategies to determine the current best practices and compare them against the DAG-based Qiskit and TKET compilers. We find that phase polynomial-based compiling is very fast compared to DAG-based compiling. For long circuits, these compilers generate fewer CNOT gates than Qiskit or TKET, but for short circuits, they are quite inefficient. We also show that supplementary algorithms such as Reverse Traversal and simulated annealing might improve the generated CNOT count slightly, but the effect is negligable in most settings and generally not worth the additional compiler runtime. Instead, more sophisticated phase polynomial synthesis algorithms are needed.
Quantum Physics,Programming Languages
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to optimize quantum circuits to reduce noise and improve efficiency in quantum computing. Specifically, the author compares different compilation strategies based on Directed Acyclic Graph (DAG) and phase polynomial to determine the current best practices and explore the performance of these strategies in different scenarios. The main focuses are: 1. **Performance comparison of compilation strategies**: The paper experimentally evaluates the performance of DAG - based and phase polynomial - based compilers in terms of the number of CNOT gates generated and compilation time, especially the performance differences in long and short circuits. 2. **Influence of auxiliary algorithms**: The influence of auxiliary algorithms such as Reverse Traversal and simulated annealing on compilation performance, as well as the effect of using these algorithms in combination, is studied. 3. **Recommendation of best practices**: Based on the experimental results, a set of recommended best - practice schemes is proposed to select the most appropriate compilation strategy in practical applications. ### Main research questions 1. **RQ1**: Can resynthesizing the trailing CNOT gates improve performance? 2. **RQ2**: Can Reverse Traversal improve performance? 3. **RQ3**: Can simulated annealing improve performance? 4. **RQ4**: Can the combination of Reverse Traversal and simulated annealing improve performance? 5. **RQ5**: What are the performance differences between DAG - based compilation and phase polynomial - based compilation? ### Experimental methods - **Experimental setup**: Five different IBM quantum computer architectures (Johannesburg, Singapore, Melbourne, Yorktown, Valencia) are used to generate hybrid ZX phase polynomials containing 1 to 100 random - phase gadgets. - **Compiler selection**: Qiskit and TKET are used as DAG - based compilers, and several different phase polynomial - based compilation methods (naive, ParitySynth, Steiner - GraySynth) are used. - **Auxiliary algorithms**: The effects of Reverse Traversal, simulated annealing and their combinations are tested. ### Experimental results 1. **RQ1**: For large enough circuits, resynthesizing the trailing CNOT gates can improve performance, but will increase compilation time. 2. **RQ2**: Reverse Traversal has limited improvement on performance and significantly increases compilation time. 3. **RQ3**: Simulated annealing is only effective for naive decomposition and has no obvious effect on more complex compilation methods such as ParitySynth and Steiner - GraySynth. 4. **RQ4**: The combination of Reverse Traversal and simulated annealing also does not significantly improve performance. 5. **RQ5**: Overall, phase polynomial - based compilation performs better in generating fewer CNOT gates, especially in long circuits. But in short circuits, its efficiency is lower. ### Conclusion Through detailed experimental analysis, the paper draws some important conclusions about the performance of quantum compilers. Although phase polynomial - based compilation performs better in some cases, its scope of application and best practices still need further exploration. Future research can focus on developing more complex phase polynomial synthesis algorithms to further optimize the compilation performance of quantum circuits.