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.
翻译:为了在量子处理器上执行量子电路,必须找到从电路量子比特到处理器量子比特的映射,并在满足处理器约束的条件下规划指令执行。这被称为量子比特映射与路由问题。高质量的量子比特映射与路由解决方案对于最大化稀缺量子资源的利用率、最小化逻辑错误影响计算概率至关重要。挑战在于量子处理器的架构极其多样且快速演进。针对这种多样性,已有数十篇论文通过为特定场景开发新算法,针对不同量子比特硬件、连接约束和量子纠错方案解决了该问题。本文提出一种替代方法:为任意量子处理器自动生成量子比特映射与路由编译器。尽管每个量子比特映射与路由问题各不相同,我们识别出一种共同核心结构——设备状态机,并借此构建了抽象的量子比特映射与路由问题框架。该框架自然衍生出用于描述量子比特映射与路由问题的紧凑领域特定语言,以及可适配任意问题规约的强大参数化算法。通过对重要量子比特映射与路由案例的全面评估表明,生成的编译器在运行时间和解质量方面与手工编写的专用编译器具有竞争力。