Quantum Expectation Transformers for Cost Analysis
arXiv:2201.09361 · doi:10.1145/3531130.3533332
Abstract
We introduce a new kind of expectation transformer for a mixed classical-quantum programming language. Our semantic approach relies on a new notion of a cost structure, which we introduce and which can be seen as a specialisation of the Kegelspitzen of Keimel and Plotkin. We show that our weakest precondition analysis is both sound and adequate with respect to the operational semantics of the language. Using the induced expectation transformer, we provide formal analysis methods for the expected cost analysis and expected value analysis of classical-quantum programs. We illustrate the usefulness of our techniques by computing the expected cost of several well-known quantum algorithms and protocols, such as coin tossing, repeat until success, entangled state preparation, and quantum walks.
References in corpus (7)
- Quantum algorithm for solving linear systems of equations
- Universal Quantum Computation with ideal Clifford gates and noisy ancillas
- Optical quantum computation using cluster states
- Mixed powerdomains for probability and nondeterminism
- Commutative Monads for Probabilistic Programming Languages
- Quantum Programming with Inductive Datatypes: Causality and Affine Type Theory
- Semantics for Variational Quantum Programming