A Hardware-Conditioned Diffusion Prior for Distributing Quantum Circuits Across Chips

Large quantum computers will probably be built from many small chips ("cores") linked by quantum interconnects, not from one giant chip. Whenever a two-qubit gate touches qubits that sit on different cores, the machine spends a Bell pair, which is a shared entangled state that is slow and noisy to produce. It spends that pair either to run the gate remotely or to teleport one qubit over. Deciding which qubit lives on which core at each step of the circuit is an NP-hard search, and today every instance is solved from scratch. Each new circuit gets its own genetic-algorithm run or annealing run. Each new chip layout means retraining a reinforcement-learning agent. Work on neural combinatorial optimization has meanwhile shown that a model trained on one routing problem can be steered at inference time toward a related problem it never saw, by adding the new objective as a guiding "energy."

We propose to bring that inference-time steering into quantum circuit distribution. We would train one generative model, a discrete diffusion model that produces a qubit-to-core assignment by gradually denoising a random one. It would be trained on cheap, uniform multi-core settings. At test time it would be steered by the Bell-pair cost of whatever hardware and circuit are in front of it. The claim is that this amortizes the search. Our target is to stay within a few percent of the Bell-pair cost reached by the best per-instance optimizers on circuit families, core counts, and interconnect topologies the model never trained on, at seconds per circuit rather than tens of minutes. The model should also beat those optimizers when both get the same wall-clock budget.

Core Claim

Assigning qubits to cores across time slices resembles routing, and its structure plausibly transfers. Qubits that interact often should share a core. Assignments should stay put unless moving pays off later. Interaction motifs recur across adders, Fourier transforms, and variational ansätze. What does not transfer is the cost model: how many cores there are, how far apart they are on the interconnect graph, and how a remote gate is priced against a qubit migration. We therefore split the two. The learned prior captures assignment structure and is conditioned on a description of the core graph. The cost model enters only through an energy function used for guidance at sampling time.

Let $x_{q,t}$ be the core that holds logical qubit $q$ during slice $t$. Let $G_t$ be the set of qubit pairs that share a two-qubit gate in slice $t$, and let $d(c,c')$ be the hop distance between cores $c$ and $c'$ on the interconnect. The energy is

$$E(x) = \alpha \sum_t \sum_{(q,q') \in G_t} d(x_{q,t}, x_{q',t}) \;+\; \beta \sum_t \sum_q d(x_{q,t}, x_{q,t+1}) \;-\; \mu \sum_{t,c} \log\big(K_c - n_{c,t}(x)\big),$$

where $\alpha$ and $\beta$ are the Bell-pair prices of a remote gate and of a qubit teleportation per hop, $K_c$ is the capacity of core $c$, and $n_{c,t}$ is its occupancy. The log-barrier term, with weight $\mu$, follows the constraint handling of DIFU-Ada. This energy merges the two communication mechanisms that A Genetic Approach to Minimising Gate and Qubit Teleportations for Multi-Processor Quantum Circuit Distribution trades off explicitly. It also generalizes the interaction and communication terms of Mapping quantum circuits to modular architectures with QUBO to non-uniform topologies.

The energy has a side benefit for slicing. The migration term already penalizes needless movement, so the number of effective "blocks" emerges from the sample rather than being fixed beforehand. This bears directly on the overblocking effect that Crampton et al. found, where cutting the circuit into more time blocks can raise total cost.

Relation to Prior Work

Three papers motivate the gap. Circuit Partitioning for Multi-Core Quantum Architectures with Deep Reinforcement Learning trains a policy-gradient agent (PPO) that decides qubit swaps per time slice. It beats the classical FGP-rOEE heuristic, but it is trained and tested on the same circuit families at 16–32 qubits on 4 cores, and it never evaluates transfer. Its best variant leans on a hard action mask that reduces the agent to executing a hand-written heuristic. We differ in two ways. We train once and test on unseen hardware. Our search freedom also comes from sampling a full assignment under guidance rather than from masking actions.

Crampton et al. evolve slice boundaries with a genetic algorithm and use Kernighan-Lin partitioning and bipartite matching inside it. Bandic et al. encode mapping as a binary quadratic objective (QUBO) solved by simulated annealing. Both pay a full search on every instance and keep nothing between instances. We reuse their cost structure and their benchmarks, and we use them as teachers and baselines.

Circuit Partitioning Using Large Language Models for Quantum Compilation and Simulations fine-tunes language models to imitate one fixed classical partitioner. That partitioner, BQSKit's Quick Partition, targets compilation and simulation, not inter-core Bell pairs. The paper also reports that few-shot prompting scores 0%. This result constrains our design: plain imitation caps quality at the teacher's level. Our guidance step is there so the model can surpass its teachers.

The method comes from routing. Boosting Cross-problem Generalization in Diffusion-Based Neural Combinatorial Solver via Inference Time Adaptation keeps a diffusion model trained only on TSP frozen. It adapts zero-shot to PCTSP and OP by adding energy gradients and repeated noising-and-denoising during sampling, which cut the PCTSP-20 gap from 19.21% to 4.20%. Cross-Problem Learning for Solving Vehicle Routing Problems shows that a shared backbone with small adapters recovers near-full fine-tuning quality. We use its adapters as our fallback when zero-shot guidance is not enough.

Two results temper expectations. On the Generalization of Neural Combinatorial Optimization Heuristics finds that naive multi-task training generalizes poorly (a 26.04% TSPlib gap versus 13.22% for meta-learning) and that architecture capacity caps scale transfer. The negative result of Haiou Shen et al. warns that structure can break when moved across very different representations. Both point the same way. Our cross-domain step must be modest: from uniform cores to non-uniform cores, within the same assignment representation. It should not jump from routing problems to circuits directly.

Research Program

The source domain consists of circuits from MQT Bench and synthetic random circuits at 16–64 qubits, placed on 4 all-to-all cores with a single fixed cost ratio $\alpha/\beta$. Training labels are the best solutions found by Crampton-style genetic search and Bandic-style annealing, both given generous budgets on these small instances.

The model is a graph network. It reads three things: the time-sliced interaction graph, a positional encoding of the core graph built from its distance matrix, and per-core capacities. It denoises a categorical assignment of every qubit at every slice. Deep circuits are handled with overlapping windows of slices, each conditioned on the previous window's final assignment. This is how we address the context-length wall that hit the language-model approach.

At inference we apply energy guidance and a small number of renoise–denoise rounds. We then run one cheap polishing pass: Crampton's bipartite matching between consecutive slices, which re-optimizes migrations. The polishing pass is also applied to every baseline, so it is not the source of any gain.

Targets are held out along four axes. The first is circuit family: QFT, Draper adder, Quantum Volume, and variational and chemistry circuits from QASMBench, none of them seen in training. The second is scale, up to 100–127 qubits. The third is core count, 8 and 16. The fourth is interconnect topology, line, ring, and star, together with cost models whose remote-gate-to-teleportation price ratios were never seen. Where zero-shot guidance falls short, we fit adapters on 100 target instances and report how many are needed.

Baselines

The naive reference points are random assignment and static Kernighan-Lin partitioning of the whole-circuit interaction graph with no migration. These match the comparisons that both Pastor et al. and Crampton et al. report against. Crampton et al. report "up to a 40% reduction in Bell pair consumption" over Kernighan-Lin on QASMBench. Pastor et al. report a 36% reduction in non-local communications over random execution.

The strongest per-instance competitors are two of the prior methods. The first is the ODQC-MHA genetic method, which is the strongest prior method that explicitly prices both gate and qubit teleportation. The second is the QUBO annealer, which reports "as few as 0.78 inter-core communications per two-qubit gate," an 87% first-attempt validity rate, and 75% of its 50–100-qubit circuits mapped in under 30 minutes. We reimplement both with our generalized distance-weighted energy so that every method optimizes the same objective. We run each method twice: once with a matched budget equal to our total inference time, and once with an unconstrained budget of up to 30 minutes per circuit. We also include FGP-rOEE, which Pastor et al. beat by 20% on 32-qubit Cuccaro adders and 5% on QAOA.

The strongest learned competitor is Pastor-style masked PPO, retrained from scratch on each target configuration with a fixed training budget. It is also evaluated zero-shot when transferred from the source setting.

Ablations isolate the key ingredients. Removing guidance tests whether the prior alone transfers. Removing the learned prior, by running the same guided dynamics from uniform noise, tests whether learning matters at all. Removing hardware conditioning tests whether the core-graph input matters. Swapping the diffusion model for multi-task supervised training without guidance gives the naive learned alternative.

The proposal counts as beating the baselines only under three conditions on held-out families and topologies. First, at matched wall-clock it must reach lower Bell-pair cost than both per-instance optimizers. Second, against their unconstrained runs it must be within 5% of their cost while running at least 50 times faster. Third, its validity rate must be no lower than the annealer's.

Why not just…?

Why not just run Kernighan-Lin or FGP-rOEE, which need no training? They are fast, but they cut a static graph and ignore when migration pays off. Both Crampton et al. (40% fewer Bell pairs than Kernighan-Lin) and Pastor et al. (20% over FGP-rOEE on Cuccaro adders) show large gaps. We rerun both with polishing, so if they close the gap, our experiments will show it.

Why not just give the genetic algorithm or annealer more time? This is the real threat. On a single circuit given ample time, per-instance search may well match or beat us. Our claim is restricted to amortization. That is why the matched-budget comparison and the cost-versus-time curve are the headline results rather than unconstrained quality alone. If the curves cross only at budgets a compiler would never use, the claim fails.

Why not warm-start annealing with Kernighan-Lin instead of learning a prior? That is a cheap hybrid. We include it at matched budget, and it is the right test of whether learned structure adds anything beyond a good initial point. The "guidance without prior" ablation answers the same question from the other side.

Why not retrain PPO per target, as Pastor et al. do? Training per configuration is exactly the cost we want to remove. We report both its training time and its quality. If an agent trained from scratch on a new topology beats our zero-shot model within a few hours, the transfer argument is weak there, and adapters become the honest recommendation.

Why not fine-tune a language model on partition outputs? The only evidence in our file says that this imitates a teacher at about 53% boundary accuracy, that prompting scores 0%, and that circuits overflow the context window. Nothing indicates it would optimize Bell pairs on unseen hardware, so we do not adopt it.

Decisive Checks

The first check is the zero-shot topology test: train on all-to-all 4-core settings and evaluate on star and line interconnects with 8 cores. If guidance cannot bring the model within 5% of the unconstrained annealer there, the "learn the structure, inject the cost" split is wrong. The second check is the family hold-out on QASMBench chemistry and Quantum Volume circuits, which tests whether the learned structure is more than memorized adder motifs. The third check asks whether guided sampling ever beats its own teachers on held-out instances. If it never does, the method is an amortized imitator. That would still be useful for speed, but it is a smaller claim, and we would report it as such. Finally, we measure the sample-count curve for adapter fine-tuning against PPO trained from scratch, in the spirit of the 3,000-sample adaptation result of Qing et al.