Abstract
This paper investigates artificial intelligence (AI) methodologies for thesynthesis and transpilation of permutation circuits across generic topologies.Our approach uses Reinforcement Learning (RL) techniques to achievenear-optimal synthesis of permutation circuits up to 25 qubits. Rather thandeveloping specialized models for individual topologies, we train afoundational model on a generic rectangular lattice, and employ maskingmechanisms to dynamically select subsets of topologies during the synthesis.This enables the synthesis of permutation circuits on any topology that can beembedded within the rectangular lattice, without the need to re-train themodel. In this paper we show results for 5x5 lattice and compare them toprevious AI topology-oriented models and classical methods, showing that theyoutperform classical heuristics, and match previous specialized AI models, andperforms synthesis even for topologies that were not seen during training. Wefurther show that the model can be fine tuned to strengthen the performance forselected topologies of interest. This methodology allows a single trained modelto efficiently synthesize circuits across diverse topologies, allowing itspractical integration into transpilation workflows.