Affiliation:
1. Massachusetts Institute of Technology, USA
Abstract
Quantum programming languages
enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of
entanglement
, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns.
In this work, we formalize
purity
as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation.
We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification.
We evaluate Twist’s type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5%.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference78 articles.
1. Héctor Abraham . 2019 . Qiskit: An Open-source Framework for Quantum Computing. Héctor Abraham. 2019. Qiskit: An Open-source Framework for Quantum Computing.
2. A Functional Quantum Programming Language
3. Matthew Amy , Martin Roetteler , and Krysta M . Svore . 2017 . Verified Compilation of Space-Efficient Reversible Circuits. In Computer Aided Verification . Matthew Amy, Martin Roetteler, and Krysta M. Svore. 2017. Verified Compilation of Space-Efficient Reversible Circuits. In Computer Aided Verification.
4. An entangling-probe attack on Shor’s algorithm for factorization
5. A probabilistic separation logic
Cited by
12 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Quantum Control Machine: The Limits of Control Flow in Quantum Programming;Proceedings of the ACM on Programming Languages;2024-04-29
2. MorphQPV: Exploiting Isomorphism in Quantum Programs to Facilitate Confident Verification;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3;2024-04-27
3. Approximate Relational Reasoning for Quantum Programs;Lecture Notes in Computer Science;2024
4. References;Foundations of Quantum Programming;2024
5. Introduction;Foundations of Quantum Programming;2024