Statistical Assertions for Validating Patterns and Finding Bugs in Quantum Programs

05/20/2019
by   Yipeng Huang, et al.
0

In support of the growing interest in quantum computing experimentation, programmers need new tools to write quantum algorithms as program code. Compared to debugging classical programs, debugging quantum programs is difficult because programmers have limited ability to probe the internal states of quantum programs; those states are difficult to interpret even when observations exist; and programmers do not yet have guidelines for what to check for when building quantum programs. In this work, we present quantum program assertions based on statistical tests on classical observations. These allow programmers to decide if a quantum program state matches its expected value in one of classical, superposition, or entangled types of states. We extend an existing quantum programming language with the ability to specify quantum assertions, which our tool then checks in a quantum program simulator. We use these assertions to debug three benchmark quantum programs in factoring, search, and chemistry. We share what types of bugs are possible, and lay out a strategy for using quantum programming patterns to place assertions and prevent bugs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/13/2018

QDB: From Quantum Algorithms Towards Correct Quantum Programs

With the advent of small-scale prototype quantum computers, researchers ...
research
04/10/2023

QChecker: Detecting Bugs in Quantum Programs via Static Analysis

Static analysis is the process of analyzing software code without execut...
research
09/06/2021

Quantum Hoare Type Theory: Extended Abstract

As quantum computers become real, it is high time we come up with effect...
research
06/02/2022

MorphQ: Metamorphic Testing of Quantum Computing Platforms

As quantum computing is becoming increasingly popular, the underlying qu...
research
04/28/2023

Quantum Control Machine: The Limits of Quantum Programs as Data

Quantum algorithms for factorization, search, and simulation obtain comp...
research
08/18/2020

Just another quantum assembly language (Jaqal)

The Quantum Scientific Computing Open User Testbed (QSCOUT) is a trapped...
research
03/16/2021

Identifying Bug Patterns in Quantum Programs

Bug patterns are erroneous code idioms or bad coding practices that have...

Please sign up or login with your details

Forgot password? Click here to reset