Manuscript Offprint

arXiv:2611.02269

Qubrio: High-Performance Quantum Compilation via Multi-Agent LLM Collaboration

Jixuan Ruan, Zhuo Cui, Zhengding Hu, Zhongkai Yu, Xiang Fang, Yue Guan, Jason Ludmir, Phillip E. Weinberg, Xiuzhe Luo, Shengtao Wang, Sonia Lopez Alarcon, Hezi Zhang, Yufei Ding

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large Language Models (LLMs) offer an adaptable alternative to traditional quantum compilation heuristics, which bottleneck progress by demanding costly manual redesigns whenever hardware evolves. However, naive single-pass LLM approaches fail under the unique challenges introduced by quantum compilation. We introduce Qubrio, a practical agentic framework that significantly reduces heuristic redesigns through a three-level decomposition. By (1) partitioning programs into sequential operation stages, (2) deploying specialized agents for placement, routing and optimization, and (3) using disaggregated feedback for precise error correction, our system reliably navigates complex physical constraints. Beyond serving as a direct compiler, our LLM framework also uncovers novel strategies that facilitate convoy-style shuttling, substantially enhancing hardware concurrency without sacrificing fidelity. We further integrate these strategies into the previous state-of-the-art (SOTA) compiler, recovering a significant fraction of the LLM's performance advantages. On realistic workloads, our compiler achieves significant improvements in hardware runtime and program fidelity over the SOTA baseline PowerMove, seamlessly adapting to new hardware capabilities. Qubrio features an open user interface for practical use, and its code is publicly available at https://github.com/crosaa/Qubrio.

1 Introduction

Quantum compilation, the process of translating high-level descriptions of quantum algorithms into hardware-executable instructions, is a key challenge in enabling practical quantum computation [1–5]. Existing quantum compilers [4–7] typically rely on domain-engineered heuristics to handle diverse hardware constraints and capabilities. This reliance, however, creates a significant maintenance burden. Adapting to new hardware features often requires domain experts to redesign heuristics and rewrite substantial portions of the compilation pipeline [1, 4, 7, 8]. This highlights a critical need for compilation frameworks capable of automatically adapting to evolving hardware.

Against this backdrop, LLMs [9, 10] offer a promising solution. Notably, LLMs have demonstrated strong capabilities in program synthesis, code optimization, and reasoning over structured representations [11–14]. This suggests they can learn compilation logic directly from specific hardware descriptions, significantly reducing the need for experts to redesign heuristics. However, whether and how LLMs can work as practical quantum compilers is still largely unexplored.

Empirical observations reveal that naive single-pass LLM compilation fails in practice. We attribute this failure to three orthogonal sources of pressure that any LLM compilation agent must absorb, corresponding to the input, processing, and feedback stages of its operational loop: (i) Input complexity:

∗^{*}Equal contribution.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

A full quantum program exceeds the regime in which current LLMs reason reliably. Current LLMs struggle with long contexts, especially in tasks like quantum compilation where each decision affects all the decisions that follow. (ii) Task heterogeneity: Compilation couples sub-tasks with distinct reasoning modes (e.g., spatial assignment versus sequential trajectory planning). Forcing a single LLM agent to handle these jointly induces cross-task interference, degrading performance on all of them. (iii) Feedback ambiguity: LLMs improve their outputs by iterating on feedback, but feedback that only reports overall performance does not tell the model which constraint was violated and which step caused this violation, leaving the agent without an actionable gradient for repair.

We address the challenges through a three-level decomposition that relieves pressure at each stage of the compilation process. (1) Input decomposition partitions a quantum program into sequential operation stages, so that each stage fits within the context length over which LLMs reason reliably. (2) Task decomposition assigns sub-tasks to specialized agents (placement, routing and optimization) each matched to one reasoning mode, eliminating cross-task interference. (3) Feedback decomposition replaces overall performance scores with structured, multi-dimensional signals: the verifier localizes constraint violations to the offending step, and the simulator disentangles performance into distinct physical error sources, enabling the agent to reason about trade-offs and apply targeted repair.

Furthermore, our LLM framework uncovers novel strategies that facilitate a highly parallel routing pattern, which we term 'convoy-style shuttling'. Unlike previous compilers that route qubits along shortest paths, which frequently induces move conflicts under hardware constraints, the LLM learns to leverage buffer positions to resolve these conflicts and align multiple qubits into synchronized movements. Moreover, the LLM learns to maintain qubits in continuous motion across consecutive routing rounds to minimize associated fidelity penalties introduced by qubit transfer (pick-up and drop) operations. This coordination parallelizes otherwise sequential movement operations, significantly accelerating hardware execution without compromising fidelity. A key insight is that without the bias of a hardcoded heuristic algorithm, the LLM uncovers non-trivial strategies to accelerate hardware execution. This demonstrates our framework's dual value: not just as a practical compiler, but as a systematic tool for discovering novel heuristics.

In summary, our contributions are as follows:

(1) An Adaptable Agentic Compiler Framework: We introduce an agentic quantum compilation framework that significantly reduces the need for manual heuristic rewrites. To overcome the failures of single-pass LLMs, we propose a three-level decomposition framework: partitioning programs into manageable stages, deploying specialized agents for distinct tasks, and providing disaggregated feedback for precise correction and optimization.

(2) LLM-Driven Heuristic Discovery and Convoy-Style Shuttling: Beyond serving as a direct compiler, our framework also uncovers novel strategies that utilize buffer positions and continuous motion to facilitate convoy-style shuttling, substantially enhancing hardware concurrency without sacrificing fidelity. We further integrate these strategies into the classical compiler, recovering a significant fraction of the LLM's performance advantages.

(3) SOTA Efficacy and Hardware Adaptability: Qubrio consistently outperforms the SOTA compiler PowerMove[4], yielding average improvements of 4.7×4.7\times and 1.3×1.3\times in hardware runtime and fidelity, and easily adapts to new hardware capabilities.

References (70)