Share

Quantum software

Crédit : CEA
New computing paradigms will require appropriate programming, verification, and code analysis tools. Quantum is a case in point. Amid advances in quantum hardware and algorithms, the entire software development chain will need to be overhauled to adapt to a totally new kind of computing.

Recent developments in quantum hardware are raising hope that efficient quantum machines will be available in the near future. Software engineering approaches specific to quantum are thus needed.

Debugging and code verification are two major challenges. Classical approaches based on assertion testing and verification are simply incompatible with the laws of quantum physics (indeterminacy, the fact that measurement destroys quantum information, etc.) that underpin quantum computing. The CEA has built on its historic experience with classical code analysis and formal verification to create a new approach for quantum software.

Specifically, a quantum programming language and formal semantics are combined to:

  • Explicitly annotate object code with specifications on behavior,
    formation, and required runtime resources.
  • Provide mathematical proof of the specifications (Figure 1).

This approach leverages the same deductive verification techniques proven on classical code. Quantum calculations are represented symbolically as sums of paths, a discrete version of Feynman’s path integral formulation (Figure 2).

Qbricks has been proven on the fully verified development of non-trivial quantum algorithms, including the first proven implementation of Shor’s algorithm, placing it at the international state of the art (Figure 3). A paper on the approach was presented at the European Symposium on Programming (ESOP) in 2021 and a book chapter was published in 2023.

1. Compilation of annotated code in Qbricks: The object code is translated into a standard intermediate (symbolic) representation (IR) that can be fed directly into a quantum simulator and/or computer. The specifications are translated into proof obligations (POs), proven correct via an interaction between automatic solvers and the user.

 

Figure 2 : Symbolic representation of sums of paths.

 

Figure 3 : Comparative measurement of the human effort required to prove implementations of various standard algorithms from the literature (Deutsch-Jozsa – DJ, Quantum Fourier Transform – QFT, Quantum Phase Estimation – QPE, Grover) with Qbricks and competing solutions.

The focus is now on integrating Qbricks into a complete and operational quantum software development chain and, specifically:

  • A high-level programming and user specification language, based on the best features of programming languages used in academic and industrial settings, is being developed.
  • Analysis tools are being extended to hybrid classical-quantum computing.
  • Additional development work on the analysis and verification tools in Qbricks will ultimately cover the entire compilation chain.

 

Qbricks solves the problem of how to safely and efficiently develop quantum software by adapting the best practices in classical software development (languages, code analysis, and compilation) to the specificities of quantum.

“We are developing formal verification tools for reliable development and compilation.

Rebecca Cabean

Christophe Chareton

Research engineer — CEA-List