一句话:提出量子程序的学习式嵌入,将电路分解为量子感知路径并用注意力聚合,支持语义克隆检测与代码检索。
量子软件工程目前主要依赖语法与规则技术,如 QChecker、NiCad 和 LintQ,它们采用模式匹配与静态分析,无法捕捉跨电路的程序级语义,也不适配 AI 与大型语言模型流程。受 code2vec 启发,本文提出 QuantumCode2Vec:将量子电路分解为量子感知路径,以反映量子比特演化、纠缠结构和电路性质,再通过注意力机制聚合为定长表示与嵌入。在典型量子算法上,学习到的表示能按算法聚类,对表面变化保持稳定,并可跨电路规模泛化;在检索场景中,相似电路一致地对应同一算法,从而支持语义克隆检测与代码搜索。论文将 QuantumCode2Vec 定位为量子软件工程的基础学习式表示与嵌入。
Classical software engineering has been shaped by learned code representations, where approaches such as code2vec, CodeBERT, and recent large-scale code models support tasks including clone detection, structural anomaly detection, and code search. Quantum software engineering, however continues to build primarily on syntactic and rule-based techniques. Existing representations and tools such as QChecker, NiCad for quantum programs, and LintQ apply pattern matching and static analysis but they do not capture program-level semantics across circuits. Essentially, these representations are not designed for Aritificial Intelligence and Large Language Model pipelines for quantum software engineering. We present QuantumCode2Vec, a learned representation of quantum programs that captures structural patterns at the level of algorithmic behavior. Driven by the impact of code2vec, the approach decomposes quantum circuits into quantum-aware paths that reflect qubit evolution, entanglement structure, and circuit properties, and aggregates them through attention into fixed length representations and embeddings. Across canonical quantum algorithms, the learned representations group circuits by algorithm, remain stable under superficial changes, and generalize across circuit sizes. In a retrieval setting, similar circuits consistently correspond to the same algorithm, supporting semantic clone detection and code search. In this paper, our goal is to position QuantumCode2Vec as a fundamental learned representation and emedding for quantum software engineering.
@inproceedings{ThippisettyC26,
title = {QuantumCode2Vec: Towards Learned Representations for Quantum Software Engineering Tasks},
author = {Venkat Kaushal Thippisetty and Sridhar Chimalakonda},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3805593}
}