IEEE International Conference on Quantum Computing and Engineering (QCE)
QIRopt: An Optimization Method for Quantum Intermediate Representation
Junjie Luo, Haoyu Zhang, Jianjun Zhao
Abstract
This paper proposes a dataflow-based optimization method called Quantum Intermediate Representation Optimization (QIRopt) within the LLVM infrastructure. QIRopt has two main functions: preprocessing QIR code to expose more optimization opportunities to the LLVM optimizer and optimizing QIR code to avoid redundant loading and construction of qubits and qubit arrays. We evaluated QIRopt on the IBM Challenge Dataset, and the results demonstrate its effectiveness in reducing redundant operations in QIR code. A preliminary implementation of QIRopt and a case study on real-world code further confirm that our approach enhances the LLVM optimizer's ability to optimize preprocessed QIR code.