Qurts: Automatic Quantum Uncomputation by Affine Types with Lifetime
arXiv:2411.10835 · doi:10.1145/3704842
Abstract
Uncomputation is a feature in quantum programming that allows the programmer to discard a value without losing quantum information, and that allows the compiler to reuse resources. Whereas quantum information has to be treated linearly by the type system, automatic uncomputation enables the programmer to treat it affinely to some extent. Automatic uncomputation requires a substructural type system between linear and affine, a subtlety that has only been captured by existing languages in an ad hoc way. We extend the Rust type system to the quantum setting to give a uniform framework for automatic uncomputation called Qurts (pronounced quartz). Specifically, we parameterise types by lifetimes, permitting them to be affine during their lifetime, while being restricted to linear use outside their lifetime. We also provide two operational semantics: one based on classical simulation, and one that does not depend on any specific uncomputation strategy.
59 pages
References in corpus (10)
- ScaffCC: Scalable Compilation and Analysis of Quantum Programs
- A functional quantum programming language
- Verified compilation of space-efficient reversible circuits
- ReQWIRE: Reasoning about Reversible Quantum Circuits
- SQUARE: Strategic Quantum Ancilla Reuse for Modular Quantum Programs via Cost-Effective Uncomputation
- Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs
- RustHorn: CHC-based Verification for Rust Programs (full version)
- A tutorial introduction to quantum circuit programming in dependently typed Proto-Quipper
- Uncomputation in the Qrisp high-level Quantum Programming Framework
- Reqomp: Space-constrained Uncomputation for Quantum Circuits