[Paper Review] Verifying Quantum Programs: From Quipper to QPMC
This paper presents a semantic translation from Quipper, a high-level quantum circuit description language using the state vector formalism, to QPMC, a model checker based on the density matrix formalism and Quantum Markov Chains. The translation enables formal verification of quantum programs via QCTL properties, validated on Grover’s algorithm with 100% success probability in the target state, demonstrating feasibility and scalability up to 8 qubits.
In this paper we present a translation from the quantum programming language Quipper to the QPMC model checker, with the main aim of verifying Quipper programs. Quipper is an embedded functional programming language for quantum computation. It is above all a circuit description language, for this reason it uses the vector state formalism and its main purpose is to make circuit implementation easy providing high level operations for circuit manipulation. Quipper provides both an high-level circuit building interface and a simulator. QPMC is a model checker for quantum protocols based on the density matrix formalism. QPMC extends the probabilistic model checker IscasMC allowing to formally verify properties specified in the temporal logic QCTL on Quantum Markov Chains. We implemented and tested our translation on several quantum algorithms, including Grover's quantum search.
Motivation & Objective
- To bridge the gap between high-level quantum programming (Quipper) and formal verification (QPMC), enabling verification of quantum algorithms without low-level physical details.
- To address Quipper's lack of built-in formal verification by translating its circuit descriptions into a form compatible with QPMC's model checking framework.
- To support verification of quantum properties such as measurement probabilities and state reachability using temporal logic over Quantum Markov Chains.
- To ensure semantic fidelity during translation, preserving quantum behavior like superposition and entanglement through density matrix representation.
- To evaluate scalability and correctness on non-trivial quantum algorithms, particularly Grover’s search, under realistic resource constraints.
Proposed method
- Translating Quipper circuits into a canonical form suitable for QPMC by expressing unitary operations and measurements as quantum Markov chains.
- Mapping Quipper’s state vector formalism to QPMC’s density matrix formalism through superoperator representations of quantum operations.
- Encoding quantum gates and controlled operations as transition matrices in the QPMC model, including ancilla qubit management and measurement effects.
- Generating QPMC input code automatically from Quipper source, preserving circuit structure and quantum semantics.
- Using QPMC’s QCTL logic to specify and verify temporal properties such as the probability of reaching specific final states.
- Applying the translation to Grover’s algorithm and validating results via density matrix evaluation and trace analysis.
Experimental results
Research questions
- RQ1Can Quipper programs be automatically translated into a form compatible with QPMC’s model checking framework while preserving semantic correctness?
- RQ2Does the translation accurately represent quantum behaviors such as superposition, entanglement, and interference in the target QPMC model?
- RQ3Can the resulting QPMC model correctly verify expected outcomes of quantum algorithms like Grover’s search, particularly the 100% success probability in the target state?
- RQ4What is the scalability of the translation pipeline in terms of execution time and memory usage for circuits with increasing qubit counts?
- RQ5How effectively can the framework verify properties involving measurement outcomes and state probabilities in quantum protocols?
Key findings
- The translation correctly mapped Quipper circuits into QPMC-compatible models, enabling formal verification of quantum algorithms using QCTL.
- For Grover’s algorithm, the QPMC model confirmed that the target state s14 is reached with probability 1, while all other terminal states have probability 0, validating the expected behavior.
- The trace of the density matrix for state s14 was exactly 1, and traces for other terminal states were 0, confirming correctness of the verification process.
- The framework scaled reasonably well on circuits with up to 8 qubits, with execution times remaining within practical limits on a 2014 MacBook Air.
- The implementation successfully handled complex operations including controlled gates and amplitude amplification, demonstrating robustness for non-trivial algorithms.
- The authors identified opportunities for optimization, particularly in avoiding composition of binary swaps, to improve performance for larger circuits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.