Statistical assertions for validating patterns and finding bugs in quantum programs

Yipeng Huang, Margaret Martonosi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Scopus citations

Abstract

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.

Original languageEnglish (US)
Title of host publicationISCA 2019 - Proceedings of the 2019 46th International Symposium on Computer Architecture
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages541-553
Number of pages13
ISBN (Electronic)9781450366694
DOIs
StatePublished - Jun 22 2019
Event46th International Symposium on Computer Architecture, ISCA 2019 - Phoenix, United States
Duration: Jun 22 2019Jun 26 2019

Publication series

NameProceedings - International Symposium on Computer Architecture
ISSN (Print)1063-6897

Conference

Conference46th International Symposium on Computer Architecture, ISCA 2019
CountryUnited States
CityPhoenix
Period6/22/196/26/19

All Science Journal Classification (ASJC) codes

  • Hardware and Architecture

Keywords

  • Assertions
  • Chi-square test
  • Correctness
  • Debugging
  • Program patterns
  • Quantum computing
  • Validation

Fingerprint Dive into the research topics of 'Statistical assertions for validating patterns and finding bugs in quantum programs'. Together they form a unique fingerprint.

  • Cite this

    Huang, Y., & Martonosi, M. (2019). Statistical assertions for validating patterns and finding bugs in quantum programs. In ISCA 2019 - Proceedings of the 2019 46th International Symposium on Computer Architecture (pp. 541-553). (Proceedings - International Symposium on Computer Architecture). Institute of Electrical and Electronics Engineers Inc.. https://doi.org/10.1145/3307650.3322213