DeepAI AI Chat
Log In Sign Up

Quantum Expectation Transformers for Cost Analysis

by   Martin Avanzini, et al.

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.


page 1

page 2

page 3

page 4


Semantics for Variational Quantum Programming

We consider a programming language that can manipulate both classical an...

Quantum Vision Transformers

We design and analyse quantum transformers, extending the state-of-the-a...

From Symmetric Pattern-Matching to Quantum Control (Extended Version)

One perspective on quantum algorithms is that they are classical algorit...

Expected Runtime of Quantum Programs

Building upon recent work on probabilistic programs, we formally define ...

Statistical Assertions for Validating Patterns and Finding Bugs in Quantum Programs

In support of the growing interest in quantum computing experimentation,...

Proto-Quipper with dynamic lifting

Quipper is a functional programming language for quantum computing. Prot...

Estimating expectation values using approximate quantum states

We introduce an approximate description of an N-qubit state, which conta...