LCOC: A Low-cost Optimizing Compiler for Large Scale Quantum Programs Towards Realistic Hardware
Yu Zhu, Jinchen Xu, Qing Mu +4 more
Quantum compilers play an essential role in the translation of quantum algorithms on quantum hardware. As the size of quantum programs increases, the problem of extreme compilation overhead becomes apparent. To address this problem, compilation frameworks with high-level intermediate representations such as QCOR have been introduced. However, these frameworks still face significant overhead from qubit mapping and optimizing sequence redundancy, resulting in challenges when compiling circuits to realistic hardware. In our paper, a low-cost optimizing compiler (LCOC) is proposed, which addresses the overhead in qubit mapping and enhanced the optimization capabilities. A qubit mapping optimizer based on the LLVM Polly is introduced in LCOC, which implements an efficient mapping of quantum programs containing specific loop types. While achieving low-cost mapping, it considerably reduces the depth of the circuit. We also implement an optimization sequence generator that leverages the modularity of LLVM and iterative compilation to provide LCOC with a more flexible and efficient optimization sequence. We conduct experiments with 100+ qubit circuits. Experiments show that LCOC is up to 1540× faster compared to Qiskit and 74× faster compared to QCOR in compile time. The average speedup relative to Qiskit and QCOR are 194× and 8.64×, respectively. In addition, it can effectively reduce the circuit depth by 50.32% compared to Qiskit and 83.5% compared to QCOR on average.
IEEE International Symposium on Parallel and Distributed Processing with Applications (ISPA)•Oct 30, 2024•1 citation