A graph-based reinforcement-learning framework for logical qubit allocation in fault-tolerant quantum architectures
Abstract Logical-qubit allocation is a central compilation problem for fault-tolerant quantum architectures, where circuit qubits must be assigned to feasible chip tiles while minimizing {the ancilla-qubit cost (the number of extra workspace qubits consumed by the routing corridors required to execute the circuit)} and preserving efficient access to magic-state resources. This hard combinatorial problem has resisted full automation: existing allocators struggle to jointly capture global circuit interactions, tile-level routing feasibility, and generalization across circuit families. We propose a graph-based reinforcement-learning framework in which a graph neural network is first pretrained to predict {the ancilla-qubit cost of circuit-allocation pairs} from allocation-aware circuit graphs {(graphs that combine circuit structure with the current placement of each qubit)}, and the resulting encoder is transferred to a reinforcement learning agent that assigns tiles one at a time. As a result, the agent learns to utilize past experience to produce higher-quality solutions to new instances of the allocation problem. Evaluated on MQTBench circuits compiled to lattice-surgery instructions under leave-one-family-out cross-validation, our allocator reduces average ancilla-qubit cost by 36.7\% compared to the state-of-the-art ECMAS+ baseline and achieves lower cost in 57 out of 64 qubit-size bins. The method further exhibits family-dependent scale extrapolation and responsive few-shot adaptation, establishing learned logical-qubit allocation as a scalable and transferable paradigm that outperforms ECMAS+ under the evaluated fixed-chip setting.