We present CertiQ, a verification framework for writing and verifying compiler passes of Qiskit, the most widely-used quantum compiler. To our knowledge, CertiQ is the first effort enabling the verification of real-world quantum compiler passes in a mostly-automated manner. Compiler passes written in the CertiQ interface with annotations can be used to generate verification conditions, as well as the executable code that can be integrated into Qiskit. CertiQ introduces the quantum circuit calculus to enable the efficient checking of equivalence of quantum circuits by encoding such a checking procedure into an SMT problem. CertiQ also provides a verified library of widely-used data structures, transformation functions for circuits, and conversion functions for different quantum data representations. This verified library not only enables modular verification but also sheds light on future quantum compiler design. We have re-implemented and verified 26 (out of 30) Qiskit compiler passes in CertiQ, during which three bugs are detected in the Qiskit implementation. Our verified compiler pass implementations passed all of Qiskit's regression tests without showing noticeable performance loss.
翻译:我们提出CertiQ, 用于编写和核查最广泛使用的量子汇编器的编纂者通行证。 据我们所知, CertiQ 是第一个能够以多数自动方式核查真实世界量子汇编者通行证的努力。 CertiQ 与注释接口中写成的编纂者通行证可用于产生核查条件,以及可纳入Qiskit的可执行代码。CertiQ 引入量子电路计算器,以便通过将这种检查程序编码为SMT问题来有效检查量子电路的等同性。 CertiQ 还提供了一个经过核查的图书馆,其中含有广泛使用的数据结构、电路转换功能和不同量子数据表示功能的转换功能。这个经过核查的图书馆不仅能够进行模块核查,而且还为未来的量子汇编设计提供了亮度。我们已经在CertiQ重新实施并核实了26份(30份) Qiskit 的可执行代码, 在此期间,在Qiskit 实施过程中检测了3个错误。 我们经过核查的编译员通过测试, 展示了所有可见的Qiskiskit回归性测试。