Design by Contract Framework for Quantum Software
- URL: http://arxiv.org/abs/2303.17750v1
- Date: Fri, 31 Mar 2023 00:21:28 GMT
- Title: Design by Contract Framework for Quantum Software
- Authors: Masaomi Yamaguchi and Nobukazu Yoshioka
- Abstract summary: We propose a design-by-contract framework for quantum software.
It provides assertions on the input and output states of all quantum circuits built by certain procedures.
Our framework has sufficient expressive power to verify the whole procedure of quantum software.
- Score: 1.9988400064884826
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: To realize reliable quantum software, techniques to automatically ensure the
quantum software's correctness have recently been investigated. However, they
primarily focus on fixed quantum circuits rather than the procedure of building
quantum circuits. Despite being a common approach, the correctness of building
circuits using different parameters following the same procedure is not
guaranteed. To this end, we propose a design-by-contract framework for quantum
software. Our framework provides a python-embedded language to write assertions
on the input and output states of all quantum circuits built by certain
procedures. Additionally, it provides a method to write assertions about the
statistical processing of measurement results to ensure the procedure's
correctness for obtaining the final result. These assertions are automatically
checked using a quantum computer simulator. For evaluation, we implemented our
framework and wrote assertions for some widely used quantum algorithms.
Consequently, we found that our framework has sufficient expressive power to
verify the whole procedure of quantum software.
Related papers
- Concolic Testing of Quantum Programs [5.3611583388647635]
This paper presents the first concolic testing framework specifically designed for quantum programs.
The framework defines quantum conditional statements that quantify quantum states and presents a symbolization method for quantum variables.
arXiv Detail & Related papers (2024-05-08T07:32:19Z) - Quantum algorithms: A survey of applications and end-to-end complexities [90.05272647148196]
The anticipated applications of quantum computers span across science and industry.
We present a survey of several potential application areas of quantum algorithms.
We outline the challenges and opportunities in each area in an "end-to-end" fashion.
arXiv Detail & Related papers (2023-10-04T17:53:55Z) - QbC: Quantum Correctness by Construction [4.572433350229651]
We propose Quantum Correctness by Construction (QbC), an approach to constructing quantum programs from their specification in a way that ensures correctness.
We use pre- and postconditions to specify program properties, and propose sound and complete refinement rules for constructing programs in a quantum while language from their specification.
We find that the approach naturally suggests how to derive program details, highlighting key design choices along the way.
arXiv Detail & Related papers (2023-07-28T16:00:57Z) - quAssert: Automatic Generation of Quantum Assertions [5.263910852465185]
We propose automated generation and placement of quantum assertions based on static analysis and random sampling of quantum circuits.
We uncover special properties of a quantum circuit, such as purely classical states, superposition states, and entangled states using statistical methods.
We demonstrate the effectiveness of the generated assertions in error detection using a suite of quantum benchmarks.
arXiv Detail & Related papers (2023-03-02T18:49:14Z) - Quantum process tomography of continuous-variable gates using coherent
states [49.299443295581064]
We demonstrate the use of coherent-state quantum process tomography (csQPT) for a bosonic-mode superconducting circuit.
We show results for this method by characterizing a logical quantum gate constructed using displacement and SNAP operations on an encoded qubit.
arXiv Detail & Related papers (2023-03-02T18:08:08Z) - Verification of Nondeterministic Quantum Programs [1.9302781323430196]
Nondeterministic choice is a useful program construct that provides a way to describe the behaviour of a program without specifying the details of possible implementations.
Nondeterminism has also been introduced in quantum programming, and the termination of nondeterministic quantum programs has been extensively analysed.
arXiv Detail & Related papers (2023-02-15T22:37:23Z) - Qafny: A Quantum-Program Verifier [39.47005122712576]
We present Qafny, an automated proof system for verifying quantum programs.
At its core, Qafny uses a type-guided quantum proof system that translates quantum operations to classical array operations.
We show how Qafny can efficiently verify important quantum algorithms, including quantum-walk algorithms, Grover's algorithm, and Shor's algorithm.
arXiv Detail & Related papers (2022-11-11T18:50:52Z) - Circuit Symmetry Verification Mitigates Quantum-Domain Impairments [69.33243249411113]
We propose circuit-oriented symmetry verification that are capable of verifying the commutativity of quantum circuits without the knowledge of the quantum state.
In particular, we propose the Fourier-temporal stabilizer (STS) technique, which generalizes the conventional quantum-domain formalism to circuit-oriented stabilizers.
arXiv Detail & Related papers (2021-12-27T21:15:35Z) - Depth-efficient proofs of quantumness [77.34726150561087]
A proof of quantumness is a type of challenge-response protocol in which a classical verifier can efficiently certify quantum advantage of an untrusted prover.
In this paper, we give two proof of quantumness constructions in which the prover need only perform constant-depth quantum circuits.
arXiv Detail & Related papers (2021-07-05T17:45:41Z) - QUANTIFY: A framework for resource analysis and design verification of
quantum circuits [69.43216268165402]
QUANTIFY is an open-source framework for the quantitative analysis of quantum circuits.
It is based on Google Cirq and is developed with Clifford+T circuits in mind.
For benchmarking purposes QUANTIFY includes quantum memory and quantum arithmetic circuits.
arXiv Detail & Related papers (2020-07-21T15:36:25Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.