paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Enhancing Code Safety in Quantum Intermediate Representation

增强量子中间表示(QIR)中的代码安全性
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 3/10 · 论文为量子中间表示 QIR 提供形式语义与安全性定义,属于程序语言/编译器形式化方向,与用户关注的 PL↔AI、LLM/Agentic 程序分析、浮点程序分析、贝叶斯程序分析等核心问题没有直接交叉。虽然形式语义和中间表示安全性在广义 PL 中有一定相关性,但量子 IR 并非用户当前研究画像的主要对象。引用 1 inbox
Junjie Luo, Jianjun Zhao
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:为 QIR 的数据类型与指令集给出形式化定义,以保障量子中间代码操作与转换的正确性与安全性。

QIR 是微软基于 LLVM 为量子程序编译器提出的中间表示,旨在解耦前端语言与后端硬件。然而,当前 QIR 缺乏形式化定义,主要依赖自然语言描述,导致解释歧义,量子函数的实现也不够严谨。本文为 QIR 的数据类型和指令集建立形式化定义,从而为 QIR 内的操作以及中间代码转换提供正确性与安全性保证。作者通过构造不安全的 QIR 代码示例,展示该方法能够识别其中的错误,验证了形式化定义在提升 QIR 代码安全性方面的有效性。

问题
当前 QIR 缺乏形式化定义、依赖自然语言描述,导致语义歧义,量子函数实现缺乏严谨性,难以保证中间代码操作与转换的安全。
方法
为 QIR 的数据类型和指令集给出形式化定义,并据此建立操作与中间代码转换的正确性和安全性保证。
评估
通过不安全 QIR 代码示例,说明所提方法能够识别其中的错误。
原文摘要(Abstract)

Quantum Intermediate Representation (QIR) is an LLVM-based intermediate representation developed by Microsoft for quantum program compilers. QIR is designed to offer a universal solution for quantum program compilers, decoupled from both front-end languages and back-end hardware, thereby eliminating the need for redundant development of intermediate representations and compilers. However, the lack of a formal definition and reliance on natural language descriptions in the current state of QIR result in interpretational ambiguity and a dearth of rigor in implementing quantum functions. In this paper, we present formal definitions for QIR's data types and instruction sets to establish correctness and safety assurances for operations and intermediate code conversions within QIR. To demonstrate the effectiveness of our approach, we provide examples of unsafe QIR codes where errors can be identified with our method.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LuoZ23,
  title = {Enhancing Code Safety in Quantum Intermediate Representation},
  author = {Junjie Luo and Jianjun Zhao},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00195}
}