Existing quantum compilers optimize quantum circuits by applying circuit transformations designed by experts. This approach requires significant manual effort to design and implement circuit transformations for different quantum devices, which use different gate sets, and can miss optimizations that are hard to find manually. We propose Quartz, a quantum circuit superoptimizer that automatically generates and verifies circuit transformations for arbitrary quantum gate sets. For a given gate set, Quartz generates candidate circuit transformations by systematically exploring small circuits and verifies the discovered transformations using an automated theorem prover. To optimize a quantum circuit, Quartz uses a cost-based backtracking search that applies the verified transformations to the circuit. Our evaluation on three popular gate sets shows that Quartz can effectively generate and verify transformations for different gate sets. The generated transformations cover manually designed transformations used by existing optimizers and also include new transformations. Quartz is therefore able to optimize a broad range of circuits for diverse gate sets, outperforming or matching the performance of hand-tuned circuit optimizers.
翻译:现有量子汇编器通过应用专家设计的电路变换优化量子电路。 这种方法需要大量人工努力设计和实施不同量子装置的电路变换, 这些装置使用不同的门套, 并且可能错过难以手动找到的优化。 我们建议使用量子电路超优化器Quartz, 一种量子电路变换自动生成并核实任意量子门变换的电路变换。 对于给定的门组来说, Quartz 生成候选电路变换, 方法是系统地探索小路, 并使用自动的电文验证器来验证所发现的变换。 为了优化量子电路, Quartz 使用基于成本的回溯跟踪搜索, 将经核实的变换换应用到电路。 我们对三个流行的门组的评估显示, Quartz 能够有效生成并核查不同的门变换。 所产生的变换包括现有优化器使用的人工设计的变换, 并包含新的变换。 因此, Quartz 能够优化各种门变换的电路段范围,, 超过或匹配手调电路优化的性。