Functional validation is necessary to detect any errors during quantum computation. There are promising avenues to debug quantum circuits using runtime assertions. However, the existing approaches rely on the expertise of the verification engineers to manually design and insert the assertions in suitable locations. In this paper, we propose automated generation and placement of quantum assertions based on static analysis and random sampling of quantum circuits. Specifically, this paper makes two important contributions. We automatically uncover special properties of a quantum circuit, such as purely classical states, superposition states, and entangled states using statistical methods. We also perform automated placement of quantum assertions to maximize the functional coverage as well as minimize the hardware overhead. We demonstrate the effectiveness of the generated assertions in error detection using a suite of quantum benchmarks, including Shor's factoring algorithm and Grover's search algorithm.
翻译:功能验证对于检测量子计算过程中的任何错误是必要的。基于运行时断言的量子电路调试方法具有广阔前景,但现有方法依赖验证工程师的专业知识来手动设计断言并将其插入合适位置。本文提出基于静态分析和随机采样的量子断言自动生成与放置方法。具体而言,本文做出两项重要贡献:通过统计方法自动发现量子电路的特殊性质,如纯经典态、叠加态和纠缠态;同时实现量子断言的自动放置,以最大化功能覆盖范围并最小化硬件开销。我们通过一系列量子基准测试(包括Shor因子分解算法和Grover搜索算法)证明了所生成断言在错误检测中的有效性。