QuantumCode2Vec: Towards Learned Representations for Quantum Software Engineering Tasks
Venkat Kaushal Thippisetty, Sridhar Chimalakonda
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.
ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE)•Jul 5, 2026•0 citations