Practical Design by Contract Framework for Quantum Applications
Quantum application development typically involves verifying the construction procedures of quantum applications with a few qubits and running them on actual quantum computers based on the verified procedures. However, existing verification techniques face practical issues, such as the need for human intervention, long verification times, and insufficient descriptions. This study introduces a practical Design by Contract framework for quantum applications, designed for testing and debugging quantum applications on simulators. It allows for writing assertions about the input and output states of quantum circuits constructed by certain procedures and the post-processing of measurement results. The quantum application can be verified quickly by checking these assertions in test cases on simulators. Our framework introduces practical mechanisms for quantum application development. It separates the construction procedure of a quantum application and its assertions through parameter distinction, introduces an evaluation rule for early precondition checking, and reduces assertion-writing effort through assertion reuse mechanisms for inverting quantum circuits and using quantum circuits for qubits in a superposition state. We validated our framework through experiments and surveyed industry quantum computer researchers to assess its effectiveness.
Authors
- Masaomi Yamaguchi (ORCID: https://orcid.org/0000-0002-7347-6021)
- Nobukazu Yoshioka (ORCID: https://orcid.org/0000-0002-1986-5675)
- Fuyuki Ishikawa (ORCID: https://orcid.org/0000-0001-7725-2618)
Institutions
- Waseda University (JP)
- National Institute of Informatics (JP)
- Fujitsu (Japan) (JP)
- Chuo University (JP)
Publication Details
- Published
- 2025-06-23
- DOI
- https://doi.org/10.1145/3696630.3731621
- Primary Topic
- Quantum Computing Algorithms and Architecture
- Type
- article
- Field-Weighted Citation Impact
- 0.00