Quantum references
Dominique Unruh
TL;DR
The paper introduces quantum references, a semantic foundation that points to and modifies subsystems within a larger quantum state, analogous to lenses in classical programming. It develops a generic, axiomatic theory of references and then instantiates it to finite- and infinite-dimensional quantum systems as well as classical systems, enabling modular programming language semantics and formal verification. A key contribution is the formal Isabelle/HOL development, including a small quantum Hoare logic and the teleportation protocol, plus a comprehensive lifting framework that relates quantum objects (unitaries, channels, measurements, subspaces) to their memory-wide counterparts. The work bridges programming language semantics with quantum theory, offering tools for reasoning about variables, memory, and subsystems in quantum programs, and it lays groundwork for future mixed classical/quantum references and optics-related connections. Overall, it provides a rigorous semantic foundation for first-class quantum references and demonstrates practical applicability through formalization and verified results.
Abstract
We present a theory of "quantum references", similar to lenses in classical functional programming, that allow to point to a subsystem of a larger quantum system, and to mutate/measure that part. Mutable classical variables, quantum registers, and wires in quantum circuits are examples of this, but also references to parts of larger quantum datastructures. Quantum references in our setting can also refer to subparts of other references, or combinations of parts from different references, or quantum references seen in a different basis, etc. Our modeling is intended to be well suited for formalization in theorem provers and as a foundation for modeling variables in quantum programs. We study quantum references in greater detail and cover the infinite-dimensional case as well, but also provide a more general treatment not specific to the quantum case. We implemented a large part of our results (including a small quantum Hoare logic and an analysis of quantum teleportation) in the Isabelle/HOL theorem prover.
