Formalization of Quantum Intermediate Representations for code safety

Quantum Intermediate Representation (QIR) is an LLVM-based intermediary representation developed by Microsoft for quantum program compilers. QIR’s objective is to serve as a versatile solution for quantum program compilers, irrespective of the programming languages used at the front end and the hard...

Celý popis

Uložené v:
Podrobná bibliografia
Vydané v:The Journal of systems and software Ročník 219; s. 112236
Hlavní autori: Luo, Junjie, Zhao, Jianjun
Médium: Journal Article
Jazyk:English
Vydavateľské údaje: Elsevier Inc 01.01.2025
Predmet:
ISSN:0164-1212
On-line prístup:Získať plný text
Tagy: Pridať tag
Žiadne tagy, Buďte prvý, kto otaguje tento záznam!
Popis
Shrnutí:Quantum Intermediate Representation (QIR) is an LLVM-based intermediary representation developed by Microsoft for quantum program compilers. QIR’s objective is to serve as a versatile solution for quantum program compilers, irrespective of the programming languages used at the front end and the hardware utilized at the back end. This approach minimizes redundant development efforts involving intermediary representations and compilers. Currently, QIR remains in the development phase and is described informally in natural language, lacking a formal definition. This informal description leads to interpretational ambiguity and a shortage of precision when implementing quantum functions. Our work aims to address this gap by providing formal definitions for QIR’s data types and instruction sets. We strive to establish correctness and safety assurances for operations and intermediate code conversions within the QIR framework. To substantiate our design, we present potentially unsafe QIR code instances that our formal approach can detect and rectify. This contribution enhances the reliability and robustness of quantum program development within the QIR context. •A formalized syntax for QIR, refining existing structures and introducing QIR-specific data types.•Developed semantics for key QIR instructions, ensuring safe execution of quantum programs.•A qubit management model for unsafe practices detecting.•Validation on real QIR code to demonstrate the effectiveness of the formal methods in practice.
ISSN:0164-1212
DOI:10.1016/j.jss.2024.112236