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...
Gespeichert in:
| Veröffentlicht in: | The Journal of systems and software Jg. 219; S. 112236 |
|---|---|
| Hauptverfasser: | , |
| Format: | Journal Article |
| Sprache: | Englisch |
| Veröffentlicht: |
Elsevier Inc
01.01.2025
|
| Schlagworte: | |
| ISSN: | 0164-1212 |
| Online-Zugang: | Volltext |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| Zusammenfassung: | 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 |