Table of Contents
Fetching ...

Traq: Estimating the Quantum Cost of Classical Programs

Anurudh Peduri, Jam Kabeer Ali Khan, Gilles Barthe, Michael Walter

Abstract

Predicting practical speedups offered by future quantum computers has become a major focus of the quantum community. Typically, such predictions involve numerical simulations supported by lengthy manual analyses and are carried out for one specific algorithm at a time. In this work, we present Traq, a principled approach towards estimating the quantum speedup of classical programs fully automatically. It consists of a classical language that includes high-level primitives amenable to quantum speedups, a compilation to low-level quantum programs, and a source-level cost analysis with provable guarantees. Our cost analysis upper bounds the complexity of the resulting quantum program and is sensitive to the input data of the program (in addition to providing worst-case costs). Traq is implemented as a Haskell package with an extensive evaluation.

Traq: Estimating the Quantum Cost of Classical Programs

Abstract

Predicting practical speedups offered by future quantum computers has become a major focus of the quantum community. Typically, such predictions involve numerical simulations supported by lengthy manual analyses and are carried out for one specific algorithm at a time. In this work, we present Traq, a principled approach towards estimating the quantum speedup of classical programs fully automatically. It consists of a classical language that includes high-level primitives amenable to quantum speedups, a compilation to low-level quantum programs, and a source-level cost analysis with provable guarantees. Our cost analysis upper bounds the complexity of the resulting quantum program and is sensitive to the input data of the program (in addition to providing worst-case costs). Traq is implemented as a Haskell package with an extensive evaluation.

Paper Structure

This paper contains 123 sections, 32 theorems, 116 equations, 31 figures, 3 tables.

Key Result

Theorem 1

For every well-formed $\varepsilon$-annotated Cpl statement $s$, and well-formed input $\sigma$: $\blacktriangleleft$$\blacktriangleleft$

Figures (31)

  • Figure 1: Syntax of Cpl. The types for variables are omitted for brevity.
  • Figure 2: Syntax of Qpl. The type and (classical) expression syntax are common with Cpl and omitted, see \ref{['def:proto:syntax']}.
  • Figure 3: Unitary compiler $\mathcal{U}$. The symbols ${\vec{z}}$, ${\vec{a}}'$, $x'$, $x"$, etc. are defined in the text. In the compilation of primitive invocations in the last line, we abbreviate the partially-applied function arguments by $\lambda_i = f_i({\vec{x}}^{(i)}, \_{}^{*})$.
  • Figure 4: Illustration of a Cpl function $f$ and its unitary Qpl compilation $f^U$. In the unitary compilation, both branches of the conditional statement are run on fresh auxiliary quantum variables. Before the final step, the variable $r$ has the result of the else branch, and the variable $r_t$ has the result of the then branch. The final line swaps $r$ with $r_t$, controlled on $b$, to store the correct result in $r$.
  • Figure 5: Quantum compiler $\mathcal{Q}$. In the compilation of primitive invocations in the last line, we abbreviate the partially-applied function arguments by $\lambda_i = f_i({\vec{x}}^{(i)}, \_{}^{*})$, as in \ref{['fig:compiler:unitary']}. The quantum procedure $\mathcal{Q}{\mathcal{P}}_{\varepsilon}$ implementing the primitive call gets access to the quantum compilation $f_i$as well as to the unitary compilation$f^U_i$ of the function arguments, and it can make calls to the unitary fragment of the language as desired.
  • ...and 26 more figures

Theorems & Definitions (72)

  • Theorem
  • Theorem
  • Theorem 1: Robustness of unitary quantum algorithms
  • Theorem 2: Unitary Error Analysis
  • proof : Proof Sketch
  • Theorem 3: Quantum Error Analysis
  • proof : Proof Sketch
  • Theorem 4: Unitary Cost Analysis
  • Theorem 5: Input-sensitive Quantum Cost Analysis
  • proof : Proof Sketch
  • ...and 62 more