To evaluate a quantum circuit on a quantum processor, one must find a mapping from circuit qubits to processor qubits and plan the instruction execution while satisfying the processor's constraints. This is known as the qubit mapping and routing (QMR) problem. High-quality QMR solutions are key to maximizing the utility of scarce quantum resources and minimizing the probability of logical errors affecting computation. The challenge is that the landscape of quantum processors is incredibly diverse and fast-evolving. Given this diversity, dozens of papers have addressed the QMR problem for different qubit hardware, connectivity constraints, and quantum error correction schemes by a developing a new algorithm for a particular context. We present an alternative approach: automatically generating qubit mapping and routing compilers for arbitrary quantum processors. Though each QMR problem is different, we identify a common core structure-device state machine-that we use to formulate an abstract QMR problem. Our formulation naturally leads to a compact domain-specific language for specifying QMR problems and a powerful parametric algorithm that can be instantiated for any QMR specification. Our thorough evaluation on case studies of important QMR problems shows that generated compilers are competitive with handwritten, specialized compilers in terms of runtime and solution quality.
翻译:为了在量子处理器上执行量子电路,必须找到从电路量子比特到处理器量子比特的映射,并在满足处理器约束的条件下规划指令执行。这被称为量子比特映射与路由问题。高质量的量子比特映射与路由解决方案是最大化稀缺量子资源利用率、最小化逻辑误差影响计算概率的关键。挑战在于量子处理器的架构极其多样且快速演进。针对这种多样性,已有数十篇论文通过为特定场景开发新算法,针对不同的量子比特硬件、连接约束和量子纠错方案解决了量子比特映射与路由问题。我们提出一种替代方法:为任意量子处理器自动生成量子比特映射与路由编译器。尽管每个量子比特映射与路由问题各不相同,但我们识别出一个共同核心结构——设备状态机——并利用其形式化抽象的量子比特映射与路由问题。我们的形式化方法自然导出了一个用于描述量子比特映射与路由问题的紧凑领域特定语言,以及一个可针对任何量子比特映射与路由规范实例化的强大参数化算法。通过对重要量子比特映射与路由问题案例研究的全面评估表明,生成的编译器在运行时间和解质量方面与手工编写的专用编译器具有竞争力。