We introduce a framework for the formal specification and verification of quantum circuits based on the Feynman path integral. Our formalism, built around exponential sums of polynomial functions, provides a structured and natural way of specifying quantum operations, particularly for quantum implementations of classical functions. Verification of circuits over all levels of the Clifford hierarchy with respect to either a specification or reference circuit is enabled by a novel rewrite system for exponential sums with free variables. Our algorithm is further shown to give a polynomial-time decision procedure for checking the equivalence of Clifford group circuits. We evaluate our methods by performing automated verification of optimized Clifford+T circuits with up to 100 qubits and thousands of T gates, as well as the functional verification of quantum algorithms using hundreds of qubits. Our experiments culminate in the automated verification of the Hidden Shift algorithm for a class of Boolean functions in a fraction of the time it has taken recent algorithms to simulate.
We introduce a framework for the formal specification and verification of quantum circuits based on the Feynman path integral. Our formalism, built around exponential sums of polynomial functions, provides a structured and natural way of specifying quantum operations, particularly for quantum implementations of classical functions. Verification of circuits over all levels of the Clifford hierarchy with respect to either a specification or reference circuit is enabled by a novel rewrite system for exponential sums with free variables. Our algorithm is further shown to give a polynomial-time decision procedure for checking the equivalence of Clifford group circuits. We evaluate our methods by performing automated verification of optimized Clifford+T circuits with up to 100 qubits and thousands of T gates, as well as the functional verification of quantum algorithms using hundreds of qubits. Our experiments culminate in the automated verification of the Hidden Shift algorithm for a class of Boolean functions in a fraction of the time it has taken recent algorithms to simulate.
The design and compilation of correct, efficient quantum circuits is integral to the future operation of quantum computers. This thesis makes contributions to the problems of optimizing and verifying quantum circuits, with an emphasis on the development of formal models for such purposes. We also present software implementations of these methods, which together form a full stack of tools for the design of optimized, formally verified quantum oracles. \n \nOn the optimization side, we study methods for the optimization of Rz and CNOT gates in Clifford+Rz circuits. We develop a general, efficient optimization algorithm called phase folding, which reduces the number of Rz gates without increasing any metrics by computing its phase polynomial. This algorithm can further be combined with synthesis techniques for CNOT-dihedral operators to optimize circuits with respect to particular costs. We then study the optimal synthesis problem for CNOT-dihedral operators from the perspectives of Rz and CNOT gate optimization. In the case of Rz gate optimization, we show that the optimal synthesis problem is polynomial-time equivalent to minimum-distance decoding in certain Reed-Muller codes. For the CNOT optimization problem, we show that the optimal synthesis problem is at least as hard as a combinatorial problem related to Gray codes. In both cases, we develop heuristics for the optimal synthesis problem, which together with phase folding reduces T counts by 42% and CNOT counts by 22% across a suite of real-world benchmarks. \n \nFrom the perspective of formal verification, we make two contributions. The first is the development of a formal model of quantum circuits with ancillary bits based on the Feynman path integral, along with a concrete verification algorithm. The path integral model, with some syntactic sugar, further doubles as a natural specification language for quantum computations. Our experiments show some practical circuits with up to hundreds of qubits can be efficiently verified. Our second contribution is a formally verified, optimizing compiler for reversible circuits. The compiler compiles a classical, irreversible language to reversible circuits, with a formal, machine-checked proof of correctness written in the proof assistant F*. The compiler is structured as a partial evaluator, allowing verification to be carried out significantly faster than previous results.
We present a new algorithm for classical simulation of quantum circuits over the Clifford+T gate set. The runtime of the algorithm is polynomial in the number of qubits and the number of Clifford gates in the circuit but exponential in the number of T gates. The exponential scaling is sufficiently mild that the algorithm can be used in practice to simulate medium-sized quantum circuits dominated by Clifford gates. The first demonstrations of fault-tolerant quantum circuits based on 2D topological codes are likely to be dominated by Clifford gates due to a high implementation cost associated with logical T gates. Thus our algorithm may serve as a verification tool for near-term quantum computers which cannot in practice be simulated by other means. To demonstrate the power of the new method, we performed a classical simulation of a hidden shift quantum algorithm with 40 qubits, a few hundred Clifford gates, and nearly 50 T gates.
Path sums are a convenient symbolic formalism for quantum operations with applications to the simulation, optimization, and verification of quantum protocols.Unlike quantum circuits, path sums are not limited to unitary operations, but can express arbitrary linear ones.Two problems, therefore, naturally arise in the study of path sums: the unitarity problem and the extraction problem.The former is the problem of deciding whether a given path sum represents a unitary operator.The latter is the problem of constructing a quantum circuit, given a path sum promised to represent a unitary operator.In this paper, we show that the unitarity problem is co-NP-hard in general, but that it is in P when restricted to Clifford path sums.We then provide an algorithm to synthesize a Clifford circuit from a unitary Clifford path sum.The circuits produced by our extraction algorithm are of the form C 1 HC 2 , where C 1 and C 2 are Hadamard-free circuits and H is a layer of Hadamard gates.We also provide a heuristic generalization of our extraction algorithm to arbitrary path sums.While this algorithm is not guaranteed to succeed, it often succeeds and typically produces natural looking circuits.Alongside applications to the optimization and decompilation of quantum circuits, we demonstrate the capability of our algorithm by synthesizing the standard quantum Fourier transform directly from a path sum.
This paper presents a novel approach to verifying the correctness of quantum circuits using temporal logic. Traditional verification methods often rely on gate-level simulation, which can be computationally expensive and insufficient for complex quantum algorithms. This work addresses this limitation by formally modeling quantum circuits as temporal logic systems. We leverage the expressive power of temporal logic to capture the desired behavior of quantum algorithms, including their evolution over time and the effects of quantum phenomena like superposition and entanglement. The core of our method involves mapping the circuit's operations onto temporal logic specifications and utilizing automated theorem proving and model checking techniques, tailored to the probabilistic nature of quantum systems. We demonstrate that this approach provides a more rigorous and scalable verification framework compared to existing methods, offering a pathway to ensuring the reliability of quantum computations. The key contributions of this work are the formalization of quantum circuits with temporal logic, the adaptation of theorem proving and model checking techniques for quantum systems, and the potential for significantly improving the trustworthiness of quantum algorithms.
Quantum arithmetic circuits are fundamental components of many quantum algorithms, including Shor's algorithm. However, ensuring their correctness is challenging because circuit behavior becomes increasingly complex as the number of qubits grows, making exhaustive classical simulation intractable. Subtle design errors may compromise the reliability of entire algorithms. To address this challenge, we present a systematic approach to the formal verification of quantum arithmetic circuits using Maude, a rewriting logic framework suited for algebraic specification and reasoning about complex systems. In our approach, quantum gates and circuits are formally specified as rewrite rules in Maude, enabling a rigorous analysis of their behavior for all possible inputs. Using this framework, we formally verify the correctness of the fundamental quantum arithmetic circuits used in Shor's algorithm, including modular multiplication and modular exponentiation. Our results demonstrate that algebraic specification provides a practical foundation for verifying quantum arithmetic circuits. This work contributes to the development of reliable quantum software and strengthens confidence in arithmetic-intensive quantum algorithms, including the HHL algorithm.
Quantum circuit equivalence checking asks whether two circuits implement the same unitary. It guarantees compiler correctness and safe optimization, yet most existing approaches scale exponentially with the number of qubits or the circuit depth, or are restricted to specific circuit structures. In this work, we present an equivalence-checking method for circuits formed by arbitrary single-qubit layers interleaved with Clifford layers. This pattern is common in variational quantum algorithms and Hamiltonian simulation via Trotter decomposition. It can also represent any unitary with sufficient depth. We prove the existence of an efficient classical algorithm that determines whether a pair of circuits with shared single-qubit layers are equivalent for every possible choice of the shared single-qubit unitaries. The same algorithm can also certify their non-equivalence for fixed assignments of single-qubit unitaries. Our framework supports the validation of emerging quantum compilers and facilitate the discovery of novel circuit optimization passes.