We introduce a new paradigm for analysing and finding bugs in quantum circuits. In our approach, the problem is given by a triple $\{P\}\,C\,\{Q\}$ and the question is whether, given a set $P$ of quantum states on the input of a circuit $C$, the set of quantum states on the output is equal to (or included in) a set $Q$. While this is not suitable to specify, e.g., functional correctness of a quantum circuit, it is sufficient to detect many bugs in quantum circuits. We propose a technique based on tree automata to compactly represent sets of quantum states and develop transformers to implement the semantics of quantum gates over this representation. Our technique computes with an algebraic representation of quantum states, avoiding the inaccuracy of working with floating-point numbers. We implemented the proposed approach in a prototype tool and evaluated its performance against various benchmarks from the literature. The evaluation shows that our approach is quite scalable, e.g., we managed to verify a large circuit with 40 qubits and 141,527 gates, or catch bugs injected into a circuit with 320 qubits and 1,758 gates, where all tools we compared with failed. In addition, our work establishes a connection between quantum program verification and automata, opening new possibilities to exploit the richness of automata theory and automata-based verification in the world of quantum computing.
翻译:我们引入了用于分析和发现量子电路错误的新模式。 在我们的方法中, 问题出在3$P ⁇, C\\\\\\\\\\\\\\\\\\\\\\用3$, 问题在于, 如果在电路输入的量子状态上设置了一套量子状态, 则产出的量子状态等于( 或包含在) 质子电路中, 等于( 或者包含在) 质子电路中引入一个新的模式。 虽然这不适合具体指定量子电路的功能正确性, 但足以检测量子电路中的许多错误。 我们提议了一种基于树自动磁电路的技术, 以压缩代表量状态的各组, 并开发一个变压器来实施量门的语调。 我们的计算法与量子国家的代数代表, 避免使用浮点数字操作的不准确性。 我们在原型工具中应用了拟议的方法, 并根据文献中的各种基准评估了它的表现。 评估表明我们的方法非常可测量, 例如, 我们设法核查了大电路路路段, 40位和141, 527 门的门, 和 将自动的校正的校正连接连接 将我们与1, 我们的机的机 与1, 320 的电路路路路的校 的校 的校 将所有的校 的校 的校 的校程连接连接 。