A Formally Certified End-to-End Implementation of Shor's Factorization Algorithm

Yuxiang Peng, Kesha Hietala, Runzhou Tao, Liyi Li, Robert Rand +2 more
4/14/2022
34 citations
cs.PLquant-ph

Official code: inQWIRE/SQIR (106 stars, Rocq Prover, MIT, last commit 2026-04-02).

Abstract

Quantum computing technology may soon deliver revolutionary improvements in algorithmic performance, but these are only useful if computed answers are correct. While hardware-level decoherence errors have garnered significant attention, a less recognized obstacle to correctness is that of human programming errors -- "bugs".

Show full abstract

Techniques familiar to most programmers from the classical domain for avoiding, discovering, and diagnosing bugs do not easily transfer, at scale, to the quantum domain because of its unique characteristics. To address this problem, we have been working to adapt formal methods to quantum programming. With such methods, a programmer writes a mathematical specification alongside their program, and semi-automatically proves the program correct with respect to it. The proof's validity is automatically confirmed -- certified -- by a "proof assistant". Formal methods have successfully yielded high-assurance classical software artifacts, and the underlying technology has produced certified proofs of major mathematical theorems. As a demonstration of the feasibility of applying formal methods to quantum programming, we present the first formally certified end-to-end implementation of Shor's prime factorization algorithm, developed as part of a novel framework for applying the certified approach to general applications. By leveraging our framework, one can significantly reduce the effects of human errors and obtain a high-assurance implementation of large-scale quantum applications in a principled way.

View on arXivView PDF

Code Implementations(1)

inQWIRE/SQIROfficial100%
MIT

A Small Quantum Intermediate Representation

10626Rocq Prover, DuneDec 20, 20188 months agoMIT
compiler-constructioncoqquantum-computing

Similar Papers

Cite this paper

@article{peng2022formally,
  title  = {A Formally Certified End-to-End Implementation of Shor's Factorization Algorithm},
  author = {Yuxiang Peng and Kesha Hietala and Runzhou Tao and Liyi Li and Robert Rand and Michael Hicks and Xiaodi Wu},
  year   = {2022},
  eprint = {2204.07112},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.07112}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.07112.svg)](https://codeofpaper.com/paper/2204.07112)

Discussion