TUM Logo

A Uniform Representation of Classical and Quantum Source Code for Static Code Analysis

The emergence of quantum computing raises the question of how to identify (security-relevant) programming errors during development. However, current static code analysis tools fail to model information specific to quantum computing. In this paper, we identify this information and propose to extend classical code analysis tools accordingly. Among such tools, we identify the Code Property Graph to be very well suited for this task as it can be easily extended with quantum computing specific information. For our proof of concept, we implemented a tool which includes information from the quantum world in the graph and demonstrate its ability to analyze source code written in Qiskit and OpenQASM. Our tool brings together the information from the classical and quantum world, enabling analysis across both domains. By combining all relevant information into a single detailed analysis, this powerful tool can facilitate tackling future quantum source code analysis challenges.

A Uniform Representation of Classical and Quantum Source Code for Static Code Analysis

2023 IEEE International Conference on Quantum Computing and Engineering (QCE)

Authors: Maximilian Kaul, Alexander Kuechler, and Christian Banse
Year/month: 2023/8
Booktitle: 2023 IEEE International Conference on Quantum Computing and Engineering (QCE)
Fulltext: click here

Abstract

The emergence of quantum computing raises the question of how to identify (security-relevant) programming errors during development. However, current static code analysis tools fail to model information specific to quantum computing. In this paper, we identify this information and propose to extend classical code analysis tools accordingly. Among such tools, we identify the Code Property Graph to be very well suited for this task as it can be easily extended with quantum computing specific information. For our proof of concept, we implemented a tool which includes information from the quantum world in the graph and demonstrate its ability to analyze source code written in Qiskit and OpenQASM. Our tool brings together the information from the classical and quantum world, enabling analysis across both domains. By combining all relevant information into a single detailed analysis, this powerful tool can facilitate tackling future quantum source code analysis challenges.

Bibtex:

@inproceedings {
author = { Maximilian Kaul and Alexander Kuechler and Christian Banse},
title = { A Uniform Representation of Classical and Quantum Source Code for Static Code Analysis },
year = { 2023 },
month = { August },
booktitle = { 2023 IEEE International Conference on Quantum Computing and Engineering (QCE) },
url = { https://doi.org/10.48550/arXiv.2308.06113 },

}