Manuscript Offprint
arXiv:2610.37045AI-Assisted Discovery of CNOT Decompositions for Quantum Permutations on Constrained Topologies
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Efficient quantum circuit compilation is a fundamental challenge for current quantum computers, where limited qubit connectivity can introduce substantial overhead in the implementation of logical operations. Recent AI-assisted synthesis methods have shown considerable potential for reducing circuit complexity, but their role in uncovering principles that can guide the design of new deterministic compilation algorithms remains largely unexplored. In this work, we investigate this perspective for the synthesis of quantum permutations into CNOT circuits under constrained qubit connectivity. Using AlphaCNOT as an exploratory tool, we identify a recurring decomposition for remote transpositions that improves on the standard construction based on adjacent SWAP routing. For two qubits at graph distance , the discovered pattern yields a topology-legal implementation using at most CNOT gates, compared with the gates required by the corresponding SWAP-based construction. We formalize this observation through a constructive proof and use it to define Global Transpositions, a deterministic synthesis method that searches for a minimum-cost decomposition of an entire permutation into topology-aware logical transpositions. The resulting method subsumes optimal SWAP routing within its synthesis model and provides certified upper bounds on the topology-constrained CNOT cost. Our experiments also reveal optimized circuits that cannot be expressed as concatenations of independently synthesized transpositions. Instead, these circuits exploit intermediate linear transformations that temporarily leave the permutation subgroup and combine partial effects of multiple logical operations, a mechanism we call intermediate CNOT fusion. Overall, our results show that AI-assisted synthesis can support not only circuit optimization, but also the discovery of reusable identities, provable constructions, and previously hidden mechanisms in quantum circuit compilation.
Keywords
Quantum circuits, CNOT Optimization, AI-assisted discovery, Quantum optimization, Linear reversible circuits
A standard approach to connectivity-constrained compilation is to insert SWAP gates whenever two logical qubits that must interact are not physically adjacent. Since a SWAP is commonly decomposed into three CNOT gates, minimizing the number of SWAPs provides a natural surrogate objective for
AIQxQIA 2026: International Workshop on AI for Quantum and Quantum for AI | co-located with AIxIA 2026, Perugia, Italy
Supported by University of Catania, progetto PIACERI 2024-2026 - Linea di Intervento 1
lizziobosco.daniele@spes.uniud.it (D. Lizzio Bosco); cossio.jacopo@spes.uniud.it (J. Cossio); simone.faro@unict.it
(S. Faro); francesco.marino@phd.unict.it (F. P. Marino); gabriele.messina@phd.unict.it (G. Messina); carla.piazza@uniud.it (C. Piazza); giuseppe.serra@uniud.it (G. Serra)
0009-0002-7372-6518 (D. Lizzio Bosco); 0009-0006-1132-730X (J. Cossio); 0000-0001-5937-5796 (S. Faro);
0000-0003-4722-9542 (F. P. Marino); 0009-0004-9926-3691 (G. Messina); 0000-0002-2072-1628 (C. Piazza); 0000-0002-4269-4501 (G. Serra)
© 2026 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).

reducing the two-qubit gate count. This approach is particularly relevant on current quantum devices, where two-qubit gates typically dominate both the execution error and the compilation overhead.
For permutation circuits, the relationship between SWAP and CNOT synthesis is particularly direct. A permutation directly describes a rearrangement of qubit states and can therefore be implemented as a sequence of transpositions. In the absence of connectivity constraints, this relationship is well understood. Bu et al. [4] proved that a permutation of n elements consisting of k disjoint cycles admits an optimal realization using exactly CNOT gates. Thus, under all-to-all connectivity, the optimal CNOT cost is completely determined by the cycle structure of the target permutation.
Under constrained connectivity, however, SWAP minimization and CNOT minimization are distinct problems. Chen et al. [5] showed that a routing solution containing the minimum possible number of SWAP gates does not necessarily yield a minimum-CNOT implementation after each SWAP is expanded independently. Although this establishes a separation between the two optimization objectives, it leaves open a more structural question: which opportunities available to direct CNOT synthesis are excluded when the search is restricted to SWAP-based routing?
We investigate this question using the constant-depth circuits for quantum rotations and permutations introduced by Faro et al. [6]. These constructions provide depth-optimal implementations through structured layers of disjoint transpositions, and therefore constitute a strong benchmark for determining whether circuits already optimized at the permutation level can be further improved at the CNOT level.
To analyze these circuits, we employ AlphaCNOT [7], an AI-based optimizer that searches directly in the space of topology-legal CNOT circuits. Unlike SWAP-based routing, AlphaCNOT is not restricted to intermediate transformations that are themselves permutations. Rather than treating the optimizer only as a black box, we inspect its outputs to identify recurring structures that can be formalized and incorporated into deterministic synthesis methods.
Our first observation concerns remote transpositions. A transposition between two qubits at graph distance can be implemented through adjacent SWAPs, requiring CNOT gates. AlphaCNOT repeatedly produces implementations using CNOTs. We formalize this pattern through a constructive proof, showing that every such transposition admits a topology-legal implementation of length at most . This provides a reusable local primitive that improves by one CNOT over the corresponding SWAP-based construction.
Building on this primitive, we introduce Global Transpositions, a deterministic synthesis method for arbitrary permutations. Each logical transposition is assigned a topology-dependent CNOT cost, and the target permutation is synthesized through a minimum-cost path in a weighted Cayley graph of the symmetric group. The method is exact within the restricted model of circuits obtained by concatenating independently synthesized transpositions. Since the generator set includes all adjacent SWAPs, the CNOT count produced by Global Transpositions is never greater than that obtained by expanding an optimal SWAP routing into three-CNOT blocks.
Global Transpositions is more expressive than SWAP routing, but it still requires the circuit to return to the permutation subgroup after every logical transposition. AlphaCNOT reveals that this restriction can leave additional optimization opportunities unexplored: for several target permutations, direct synthesis produces circuits shorter than those represented by the Global Transpositions model.
These additional reductions arise when the partial effects of multiple logical operations are synthesized jointly. Intermediate prefix transformations may temporarily leave the permutation subgroup and traverse more general linear reversible transformations before returning to the target permutation. This allows partial effects to be shared across the boundaries of independently synthesized transpositions. We refer to this mechanism as Intermediate CNOT Fusion.
This phenomenon suggests a possible explanation for the separation between SWAP-based and direct CNOT synthesis. SWAP routing and Global Transpositions search within the permutation subgroup, whereas direct CNOT synthesis can exploit the larger space of invertible binary linear transformations. Intermediate states outside the permutation subgroup can therefore provide shorter paths to a target permutation.
The contributions of this paper are threefold:
• We give a constructive topology-legal implementation of a transposition at graph distance using at most CNOT gates.
• We introduce Global Transpositions, a deterministic synthesis method that computes a minimum-cost decomposition into independently synthesized logical transpositions and is never worse than an optimal SWAP routing expanded into CNOT gates.
• We experimentally investigate Intermediate CNOT Fusion, through which direct CNOT synthesis combines partial effects of multiple logical operations using intermediate transformations outside the permutation subgroup.
Overall, our results show how AI-assisted optimization can support the discovery of deterministic compilation principles. In this context, AlphaCNOT acts not only as an optimizer, but as a discovery tool. It reveals two levels of structure: a local remote-transposition saving, which we formalized constructively and used to construct the Global Transpositions algorithm, and a more global fusion phenomenon, which is experimentally visible but not yet fully characterized.
2. Background
This section reviews the background necessary for the remainder of the paper. We first recall the family of constant-depth quantum circuits for rotations and permutations introduced in [6], which serves as the baseline for our study. We then briefly describe the AI-based optimization framework employed throughout the paper [7]. In both cases, we focus only on the concepts and results directly relevant to our analysis, referring the reader to the original works for complete technical details.
2.1. Constant-Depth Quantum Rotations and Permutations
Let be a quantum register of qubits. A rotation of magnitude cyclically shifts the qubit states by positions, while a permutation rearranges the qubits according to an arbitrary permutation . These operations are fundamental building blocks in quantum algorithms and compilation, as they frequently arise when adapting logical circuits to the connectivity constraints of quantum hardware.
Faro et al. [6] introduced a constructive framework for implementing both rotations and arbitrary permutations by means of logspace-uniform families of quantum circuits having constant depth and linear size. The construction exploits the decomposition of a rotation into two reflections, each implemented as a layer of pairwise disjoint SWAP operations that can be executed completely in parallel. Consequently, every rotation is realized using only two layers of parallel SWAP gates, yielding a constant-depth circuit whose depth is independent of the size of the quantum register.
The construction naturally extends from rotations to arbitrary permutations. Any permutation is first decomposed into disjoint cycles, and each cycle is implemented as a cyclic rotation acting only on the qubits belonging to that cycle. Since disjoint cycles operate on disjoint subsets of qubits, all cycle implementations can be executed simultaneously, preserving constant circuit depth while maintaining linear circuit size. This establishes that arbitrary qubit permutations belong to the complexity class QNC .
The circuits introduced in [6] constitute the baseline considered throughout this paper. Their highly structured SWAP-based construction, based on layers of pairwise disjoint transpositions, provides a natural benchmark for investigating whether additional reductions can be achieved when synthesis is performed directly at the CNOT level. Rather than modifying the routing itself, our work analyzes how AI-based CNOT synthesis transforms these SWAP-optimal circuits and studies the structural properties of the resulting CNOT decompositions.
2.2. AI-Based CNOT Optimization
Artificial intelligence has recently emerged as a promising approach for quantum circuit synthesis, optimization, and compilation. Reinforcement learning methods have been applied to hardware-aware transpilation and CNOT minimization [8, 9, 7], while other works have shown that AI-based search can discover non-trivial circuit structures and compilation strategies. Examples include AlphaTensor for quantum circuit optimization [10], reinforcement-learning-based discovery of fault-tolerant state-preparation circuits [11], reinforcement-learning based methods for synthesis and transpilation of permutation circuits [12], RL-based methods for Clifford synthesis [13, 14], and Q-PRESYN, where learned local circuit transformations improve the outcome of a subsequent synthesis procedure [15]. More recently, AI-driven search has also been investigated for automated quantum algorithm discovery [16]. These results suggest that AI-generated solutions can be useful not only as optimized outputs, but also as objects from which reusable compilation principles may be identified.
AlphaCNOT. AlphaCNOT [7] is a model-based reinforcement learning algorithm that tackles the CNOT synthesis as a sequential planning problem. A CNOT circuit can be represented by its parity matrix . Consequently, CNOT synthesis is addressed by searching for a sequence of CNOT operations that reduces A to the identity matrix. Each state of the search therefore corresponds to an invertible binary matrix, while each action corresponds to the application of a CNOT gate, implemented as an elementary row operation over .
To learn efficient decompositions (i.e., equivalent circuits with lower gate count), AlphaCNOT combines deep neural networks with Monte Carlo Tree Search (MCTS) to explicitly explore multiple candidate synthesis trajectories. The MCTS procedure iterates through the standard phases of selection, expansion, simulation, and backpropagation, progressively focusing the search on promising branches of the search tree. Its exploration is guided by two neural networks: a policy network, which assigns prior probabilities to all possible CNOT actions, and a value network, which estimates the quality of the current matrix state, without performing an exhaustive exploration. This model-based formulation allows AlphaCNOT to exploit the known circuit dynamics and perform look-ahead search, rather than committing to a single sequence of heuristic-based actions.
AlphaCNOT tackles both the unconstrained version of the problem, also referred to as linear reversible synthesis, and the topology-aware one. In the latter setting, the action space is restricted to CNOT gates supported by the coupling graph, defined a priori in the problem's formulation.
Finally, since the search process is nondeterministic, AlphaCNOT can be used in a “multi-shot” fashion: given the same circuit, we can repeat the synthesis process multiple times and select the best outcome.
In what follows, we use AlphaCNOT primarily as an exploratory tool. The decompositions provided are used to explore and inspect recurring structures, and to formulate hypotheses that can subsequently be formalized as deterministic constructions. This methodology motivates the local transposition construction and the intermediate CNOT-fusion phenomena studied in the following sections.
Experimental Details. Since AlphaCNOT performs a stochastic search, repeated inference runs on the same target may return different valid CNOT decompositions. In what follows, we report CNOT decompositions and counts either in a single-shot setting, in which a single synthesis run is performed, or in a best-of-ten setting, in which the model is independently sampled ten times and the solution with the smallest CNOT count is retained.
Figure 1 shows a few representative coupling graphs used in the experiments. We adopt the topology notation of [8], in which each coupling graph is identified by its number of qubits followed by a letter denoting its connectivity family. Thus, for instance, 3L denotes a three-qubit line, whereas 4T denotes a four-qubit T-shaped topology. We extend the same naming convention to the other graph families considered in our experiments.
The source code used to run AlphaCNOT, together with the trained models for the coupling topologies considered in our experiments, is publicly available in the AlphaCNOT GitHub repository.
https://github.com/Jaccos01/AlphaCNOT
3. Discovery of local primitives
As a starting point, we consider the problem of mapping a target permutation consisting of a single transposition . Let denote the distance between the two endpoints in the coupling graph . A standard SWAP-based implementation moves one endpoint along a shortest path, swaps it with the other, and moves it back. This requires adjacent SWAP gates and therefore CNOT gates after expanding each SWAP into three CNOTs. A closely related problem was studied by Kutin et al. [17] in the linear nearest-neighbor setting: their construction exchanges the two endpoints of an -wire line using CNOT gates, which corresponds to when the endpoint distance is .
This bound, however, is not necessarily optimal with respect to CNOT count. The smallest example is on the three-qubit line . The SWAP-based construction requires three adjacent SWAPs, i.e., nine CNOT gates, while the same permutation admits an eight-CNOT implementation, as shown in Figure 2.
Empirical pattern. We evaluated the CNOT count found by AlphaCNOT on a variety of topologies for all transpositions. Interestingly, we noticed the same pattern (see Table 1): for most targets , AlphaCNOT finds a CNOT decomposition with CNOT count of
The single-shot results in Table 1 show that AlphaCNOT does not always find decompositions of length in a single inference run, as in a few cases (i.e. the ones in bold in Table 1), some average decompositions yield slightly increased CNOT counts. However, by increasing the computational budget by evaluating AlphaCNOT in a best-of-ten fashion, AlphaCNOT found exactly for each transposition, suggesting that for each transposition for of distance , it is always possible to decompose in CNOTs.
Starting from this observation, we provide a constructive proof of the following theorem.
Theorem 3.1. Let be a topology and let be a transposition whose endpoints have distance in . Then admits a topology-legal CNOT implementation of length at most .

(a) 7Y topology

(b) 8H topology
Figure 1: Examples of coupling topologies considered in our experiments. Vertices represent physical qubits, while edges denote the allowed two-qubit interactions. The full set of topologies can be found in [8].
(a) SWAP routing: 3 SWAPs = 9 CNOTs

(b) Direct decomposition: 8 CNOTs

Figure 2: The first local separation between SWAP routing and direct CNOT synthesis. The transposition on the path costs 9 CNOTs when implemented as three adjacent SWAPs, but admits a direct topology-legal implementation with 8 CNOTs.
Table 1
Mean CNOT count found by AlphaCNOT (single shot) over all transpositions of distance for selected topologies as defined in [8]. Values in bold represent averages that do not coincide with the formula , highlighting that in some cases AlphaCNOT was not able to obtain the observed upper bound.
| Topology | |||||||
|---|---|---|---|---|---|---|---|
| Formula | |||||||
| 4L | |||||||
| 4Y | |||||||
| 5L | |||||||
| 5T | |||||||
| 6L | |||||||
| 6Y | |||||||
| 7L | |||||||
| 7Y | |||||||
| 8F | |||||||
| 8H |
Proof. Let
be a shortest path in from to . Since every consecutive pair is connected by an edge of , any CNOT circuit using only edges of this path is automatically topology-legal on . Thus it is enough to construct the desired circuit on the line topology
after relabeling as . In particular, it suffices to prove the statement for the transposition on this line.
Write for a CNOT with control and target . All gate products below are listed in application order. We proceed by induction on . The base case is . On the line , the following eight gates implement :
Indeed, applying these gates to the row labels gives
which is exactly the transposition of the two endpoints.
For the induction step, assume that there is a CNOT circuit implementing on the subpath , with length . Let
be the usual three-CNOT implementation of the adjacent transposition . Then
implements , since at the permutation level
To see this directly, the two outer transpositions exchange the labels 0 and 1, so conjugating by simply replaces the endpoint 1 by 0, while d is fixed because . Hence the resulting transposition exchanges precisely 0 and d.
Finally, the length of the circuit is
This completes the induction and proves the claimed construction.
A visualization of our construction for is provided in Figure 3, compared to an optimal output provided by AlphaCNOT. The linear behavior of the bound is also a natural consequence of the recursive construction. Increasing the distance by one amounts to surrounding the transposition at distance with two adjacent transpositions, each of which requires three CNOTs. Thus, each additional unit of distance contributes exactly six CNOTs, yielding the recurrence , which, together with the base case , gives .
It is important to emphasize that the construction above establishes only an upper bound, as we do not prove that the length is optimal. Nevertheless, the available computational evidence supports its optimality. In addition to the experimental results obtained with AlphaCNOT, we performed exhaustive brute-force searches on all graph topologies considered in this work with up to five qubits. In all cases considered, no topology-legal implementation shorter than was found. This evidence leads us to conjecture that the bound is tight, although a general proof of optimality remains open.
At this point, the construction above assigns an explicit topology-dependent CNOT cost to every transposition of two qubits. This naturally suggests using remote transpositions as the basic building blocks for synthesizing arbitrary permutations, and choosing among them according to their certified CNOT costs. In the following section, we formalize this idea as a deterministic global synthesis algorithm.
4. Global Transpositions Algorithm
The previous result associates every logical transposition with a concrete topology-legal CNOT decomposition and, consequently, with an explicit CNOT cost. This allows us to move from the synthesis of individual transpositions to that of arbitrary permutations: instead of decomposing a permutation exclusively into adjacent SWAPs, we may search directly over all logical transpositions and weight each of them by the cost of its CNOT implementation.
(a) Recursive construction for : 20 CNOTs

(b) AlphaCNOT output for : 20 CNOTs

Figure 3: Example of the recursive decomposition of with distance 4, compared to a decomposition found by AlphaCNOT. Note that in the decomposition below, it is easy to recognize the components corresponding to the two copies of the SWAP between and (i.e., the 6 CNOTs between and ). However, the remaining transposition cannot be easily decomposed into and .
Let be the coupling graph, with , and assume that every undirected edge supports both CNOT orientations. For two vertices , let be their graph distance. The previous construction gives a topology-legal CNOT implementation of the transposition with cost
Thus, every logical transposition can be assigned an explicit, certified CNOT cost , corresponding to a constructive decomposition in the same number of CNOTs.
Note that minimum-cost decompositions of permutations into transpositions with non-uniform costs have previously been studied in a general combinatorial setting [18]. Our construction can be viewed as an instance of this framework in which transposition costs are induced by topology-constrained CNOT implementations.
Weighted Cayley graph. Define a weighted graph whose vertices are the permutations in . For every permutation and every unordered pair , add an edge
with weight . Since arbitrary transpositions generate , is connected. A path in is a decomposition of the target permutation into logical transpositions, and the path weight is a guaranteed CNOT cost obtained by expanding each transposition with the construction above.
We call the resulting method Global Transpositions: it is global because the decomposition is chosen over the whole target permutation, not independently cycle by cycle. In particular, if
is the path returned by the weighted search, then the CNOT cost reported by the method is
Table 2 Naive exact search complexity for the three synthesis models.
| Method | State space | Number of states | Generators | Naive algorithm | Worst-case time |
|---|---|---|---|---|---|
| Optimal SWAP | n! | adjacent SWAPs | BFS | ||
| Global Transpositions | n! | weighted transpositions | Dijkstra | ||
| Optimal CNOT | oriented CNOTs | BFS |
The corresponding concrete circuit is obtained by replacing each by the CNOT block associated with a shortest path between its two endpoints.
Algorithm. For a fixed topology , the algorithm is:
-
compute all-pairs graph distances on ;
-
assign each logical transposition the weight ;
-
run Dijkstra from the identity permutation in the weighted Cayley graph ;
-
for a target , recover the predecessor chain from to the identity, giving a minimum-weight transposition decomposition;
-
expand each selected transposition into its topology-legal CNOT block.
Guarantees. The output of Global Transpositions is exact for its own restricted model: among all decompositions of into logical transpositions with block costs , Dijkstra returns one with minimum total weight. Moreover, this weight is always an upper bound on the true topology-constrained CNOT optimum:
Indeed, every weighted edge in is backed by a concrete topology-legal CNOT circuit.
The method also dominates optimal SWAP routing expanded gate by gate:
To see this, take an optimal adjacent-SWAP decomposition of . Each adjacent SWAP is precisely a transposition with and weight 3. Since Global Transpositions minimizes over all transpositions, it can reproduce that SWAP path and possibly improve on it by using longer transpositions with the identity.
These inequalities explain why this method is a useful middle baseline. It is strictly more expressive than SWAP routing, but it still returns to after each transposition block. Therefore it cannot represent CNOT-level fusions between consecutive blocks. Any residual gap
or, empirically,
is evidence for a phenomenon beyond independent transposition blocks.
Search-space and complexity comparison. The three relevant exact-search viewpoints differ mainly in the state space and in the generator set. Let . In Table 2, we report the cost of the most direct exhaustive algorithm for each model, ignoring constant-time details of state encoding and hash-table lookup.
The all-pairs shortest-path distances required to define the transposition weights can be computed in time by running BFS from every vertex. This preprocessing cost is negligible compared with the -state search over the permutation space performed by Global Transpositions.
More generally, exact synthesis remains computationally challenging across the different models considered here. Finding a minimum-length sequence of adjacent SWAPs on an arbitrary connectivity graph corresponds to the Token Swapping problem, which is NP-hard [19]. Optimal CNOT synthesis is also computationally hard: hardness results are known for topology-constrained CNOT synthesis [20], while CNOT-distance has recently been shown to be NP-complete even under all-to-all connectivity [21].
These complexity results motivate the development of more scalable alternatives to exhaustive search. In this direction, the approximation techniques developed for permutation decompositions with non-uniform transposition costs [18] provide a natural starting point for approximate variants of Global Transpositions that avoid explicit exploration of the full permutation space . Determining whether the specific topology-induced cost function admits stronger approximation guarantees or more efficient specialized algorithms remains an interesting open question.
5. Beyond Transpositions: Intermediate CNOT Fusion
Global Transpositions improves over SWAP routing by changing the elementary objects used to synthesize a permutation. Instead of restricting the search to adjacent SWAPs, it searches over arbitrary logical transpositions and assigns a topology-dependent CNOT cost to each of them. The resulting permutation is therefore implemented as a sequence of independently synthesized transpositions. The circuits produced by AlphaCNOT reveal that this construction does not exhaust the available savings. In several instances, direct CNOT synthesis produces a circuit shorter than the complete Global Transpositions construction, even though the latter has already selected its sequence of transpositions globally.
Global Transpositions is optimal with respect to the decomposition model of transpositions. In particular, we have that given a connectivity map with , and a permutation , the cost found by GT is
Definition 1 (Intermediate CNOT fusion). Let be a connectivity map and let . We say that admits an intermediate CNOT fusion (with respect to transpositions) on if there exists a topology-legal CNOT circuit implementing such that
Any such circuit C is called a fusion witness for on G. Thus, intermediate CNOT fusion relative to GT occurs whenever admits a topology-legal CNOT implementation using fewer CNOT gates than the minimum-cost concatenation of transposition blocks considered by the GT model.
Note that this definition is specifically relative to transpositions, whose elementary permutation blocks are cycles of length two, i.e., logical transpositions, with their constructive implementation costs (assuming they are optimal). The same comparison could possibly be extended to synthesis models whose block libraries also include longer cycles (for example, the set of transpositions and 3-cycles, etc.), allowing for a more general definition of intermediate fusion. However, while for transpositions we were able to obtain a constructive bound of the cost , for longer cycles we would need to develop different tools, or to compute optimal costs of each cycle. For this reason, in what follows we will consider only fusions with respect to transpositions.
Minimal example. Consider the line topology 4L and the target permutation
Global Transpositions returns
(a) 4L, Global Transpositions: CNOTs

(b) 4L, joint AlphaCNOT synthesis: 13 CNOTs

Figure 4: Intermediate CNOT fusion on 4L for . Global Transpositions realizes three independently synthesized transpositions using 14 CNOTs, whereas direct AlphaCNOT synthesis realizes an optimal decomposition in 13 gates.
Table 3 Mean CNOT count over 100 target permutations per constrained topology (for 4 qubits, all 24 permutations are considered). AlphaCNOT results are obtained with 10 repetitions. Results for Optimal CNOT are obtained with bidirectional BFS.
| topology | SWAP×3 | Global Transpositions | AlphaCNOT | Optimal CNOT |
|---|---|---|---|---|
| 4L | 8.64 | 8.18 | 8.03 | 8.03 |
| 4Y | 8.04 | 7.83 | 7.59 | 7.59 |
| 5L | 15.03 | 14.21 | 13.73 | 13.71 |
| 5T | 13.50 | 12.92 | 12.46 | 12.42 |
| 6L | 22.59 | 21.24 | 20.37 | - |
| 6T | 19.20 | 18.28 | 17.67 | - |
| 6Y | 18.78 | 17.86 | 17.26 | - |
| 7L | 32.28 | 30.23 | 28.97 | - |
| 7T | 27.45 | 25.89 | 25.01 | - |
| 7Y | 26.40 | 24.95 | 24.53 | - |
| 8F | 37.71 | 35.34 | 34.07 | - |
| 8H | 32.40 | 30.82 | 29.92 | - |
| 8T | 38.67 | 36.36 | 35.23 | - |
| 8T2 | 33.27 | 31.57 | 30.71 | - |
whose three blocks cost CNOTs. The first two blocks are adjacent transpositions, while the last one is a distance-two transposition implemented with the construction of Section 4. AlphaCNOT, when applied directly to the full permutation, returns the 13-CNOT circuit shown in Figure 4. For this instance, exhaustive bidirectional BFS over topology-legal CNOT circuits certifies that 13 CNOTs are optimal.
This example separates intermediate fusion from the remote-transposition construction studied in the previous section. The latter reduces the cost of one logical transposition. Here, all three transpositions have already been assigned the individual costs used by the GT construction; the additional CNOT disappears only when the complete permutation is synthesized as one circuit. The improvement is numerically small, but it exposes a limitation of any method whose total cost is obtained by summing independently synthesized transposition blocks.
Full evaluation. We now evaluate the average number of CNOTs found by optimal SWAP algorithm, Global Transpositions, and AlphaCNOT over different topologies. For each topology, we randomly select 100 permutations of the corresponding size (for 4L and 4Y we consider all the 24 permutations instead). Results for AlphaCNOT are obtained with a best-of-ten strategy, i.e. we execute the model 10 times and select the best solution. In addition, we report the average optimal CNOT count obtained by bidirectional BFS for up to 5 qubits. We report our results in Table 3.
AlphaCNOT achieves a lower mean CNOT count than Global Transpositions on every topology in the table. Across the full set sampled targets, the mean decreases from 23.85 CNOTs for SWAP synthesis to 22.55 for Global Transpositions, and then to 21.83 for AlphaCNOT. Thus, the transposition model explains an average reduction of 1.31 CNOTs relative to SWAP synthesis, while direct synthesis finds a further reduction of 0.72 CNOTs, or 3.2% relative to Global Transpositions. The latter gap is present on every tested constrained topology and ranges from 0.15 to 1.27 CNOTs per target on average.
These results support a two-stage interpretation of the structures exposed by AlphaCNOT. Remote-transposition synthesis explains why a logical transposition need not be implemented as a chain of full SWAPs. Intermediate fusion explains the remaining empirical gap: even after the transpositions have been selected globally and assigned improved individual costs, treating them as independent blocks leaves additional CNOT reductions unexplored.
Additional examples. Finally, we show in Figure 5 some examples and visualizations of different permutations, with the solutions found by Global Transpositions and AlphaCNOT. Note that while AlphaCNOT is not optimal, it can find non-trivial CNOT reductions that cannot be obtained by performing optimal synthesis over . This suggests that Intermediate CNOT fusions play a major role in obtaining efficient CNOT decompositions of permutation circuits.
6. Discussion and Future Directions
In this work, we used AlphaCNOT to investigate CNOT synthesis for depth-optimal quantum rotation and permutation circuits. Our analysis revealed two distinct structures. First, the circuits produced by AlphaCNOT exposed a recurring pattern for remote transpositions, which we formalized as a constructive implementation using at most CNOT gates for endpoints at graph distance . This result led to Global Transpositions, a deterministic synthesis method that optimizes the decomposition of an entire permutation into topology-aware logical transpositions. Beyond this, AlphaCNOT reveals additional reductions that cannot be captured by independently optimized transposition blocks. By exploiting intermediate linear transformations outside the permutation subgroup, it can combine effects across transposition boundaries, a mechanism we call Intermediate CNOT Fusion. This shows that the gap between SWAP-optimal and CNOT-efficient synthesis stems not only from cheaper transpositions, but also from the richer intermediate state space available at the CNOT level.
More broadly, these results illustrate a role for AlphaCNOT beyond black-box circuit optimization. Its generated circuits provide concrete objects that can be inspected to identify recurring patterns and formulate structural hypotheses. In the case of remote transpositions, such a pattern led to a constructive proof and a deterministic synthesis algorithm; in the case of Intermediate CNOT Fusion, it exposed a limitation of approaches that restrict their intermediate states to the permutation subgroup.
Several questions remain open. The most immediate is a theoretical characterization of Intermediate CNOT Fusion: determining when fusion is possible, how large the resulting CNOT savings can be, and whether such opportunities can be identified directly from the target permutation and the coupling graph. A related question is whether intermediate non-permutation transformations are necessary for CNOT-optimal realizations of some permutation circuits, or whether equally short circuits confined to more restricted classes of intermediate transformations always exist. More generally, these observations suggest the possibility of deriving new deterministic synthesis rules from the patterns exposed by AlphaCNOT and extending the same methodology to other circuit families and quantum compilation problems.
5T: ( )
(a) GT: 17 CNOTs

(b) AlphaCNOT: 15 CNOTs

(a) Decomposition of over 5T.
6L: ( )
(a) GT: 20 CNOTs

(b) AlphaCNOT: 19 CNOTs

(b) Decomposition of over 6L.
6T: ( )
(a) GT: 23 CNOTs

(b) AlphaCNOT: 21 CNOTs

(c) Decomposition of over 6T.
6Y: ( )
(a) GT: 20 CNOTs

(b) AlphaCNOT: 18 CNOTs

(d) Decomposition of over 6Y.
8T2: ( )
(a) GT: 42 CNOTs

(b) AlphaCNOT: 37 CNOTs

(e) Decomposition of over 8T2.
Figure 5: Visualizations of some decompositions found by Global Transpositions (GT) and AlphaCNOT with non-trivial intermediate CNOT fusions.
Acknowledgements
JC is supported by FSE/FVG PhD Grant on “Computer Science and Artificial Intelligence” (CUP G23C25000620008). This work has been partially supported by INdAM-GNCS project Algebra lineare quantistica, state preparation e compilazione di circuiti quantistici (CUP E53C25002010001) and by the regional project QUASAR-FVG Calcolo e simulazione quantistica: sviluppo, applicazioni e ricerca in Friuli Venezia Giulia (CUP G23C25001510002).
Declaration on Generative AI
During the preparation of this work, the authors used ChatGPT in order to perform grammar and spelling check, and to paraphrase and reword certain paragraphs. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the publication’s content.
References
[1] M. G. Davis, E. Smith, A. Tudor, K. Sen, I. Siddiqi, C. Iancu, Towards Optimal Topology Aware Quantum Circuit Synthesis, in: 2020 IEEE International Conference on Quantum Computing and Engineering (QCE), IEEE, Denver, CO, USA, 2020, pp. 223–234. URL: https://ieeexplore.ieee.org/document/9259942/. doi:10.1109/QCE49297.2020.00036.
[2] A. Kissinger, A. M. Van De Griend, CNOT circuit extraction for topologically-constrained quantum memories, Quantum Information and Computation 20 (2020) 581–596. URL: http://www.rintonpress.com/journals/doi/QIC20.7-8-4.html. doi:10.26421/QIC20.7-8-4.
[3] B. Wu, X. He, S. Yang, L. Shou, G. Tian, J. Zhang, X. Sun, Optimization of CNOT circuits on limited-connectivity architecture, Physical Review Research 5 (2023) 013065. URL: https://link.aps.org/doi/10.1103/PhysRevResearch.5.013065. doi:10.1103/PhysRevResearch.5.013065.
[4] A. Bu, E. Fan, R. Joo, Minimum synthesis cost of cnot circuits, Quantum Information Processing 24 (2025). URL: http://dx.doi.org/10.1007/s11128-025-04831-5. doi:10.1007/s11128-025-04831-5.
[5] C. Chen, B. Schmitt, H. Zhang, L. S. Bishop, A. Javadi-Abhar, Optimizing quantum circuit synthesis for permutations using recursion, in: Proceedings of the 59th ACM/IEEE Design Automation Conference, DAC '22, ACM, 2022, p. 7–12. URL: http://dx.doi.org/10.1145/3489517.3530654. doi:10.1145/3489517.3530654.
[6] S. Faro, A. Pavone, C. Viola, Families of constant-depth quantum circuits for rotations and permutations, in: U. de'Liguoro, M. Palazzo, L. Roversi (Eds.), Proceedings of the 25th Italian Conference on Theoretical Computer Science, Torino, Italy, September 11-13, 2024, volume 3811 of CEUR Workshop Proceedings, CEUR-WS.org, 2024, pp. 29–41. URL: https://ceur-ws.org/Vol-3811/paper270.pdf.
[7] J. Cossio, D. Lizzio Bosco, R. Romanello, G. Serra, C. Piazza, AlphaCNOT: Learning CNOT minimization with model-based planning, CoRR abs/2604.13812 (2026). URL: https://doi.org/10.48550/arXiv.2604.13812. doi:10.48550/ARXIV.2604.13812. arXiv:2604.13812.
[8] D. Kremer, V. Villar, H. Paik, I. Duran, I. Faro, J. Cruz-Benito, Practical and efficient quantum circuit synthesis and transpiling with Reinforcement Learning, 2024. URL: https://arxiv.org/abs/2405.13196v2.
[9] R. Romanello, D. Lizzio Bosco, J. Cossio, D. Sutulovic, G. Serra, C. Piazza, P. Burelli, CNOT Minimal Circuit Synthesis: A Reinforcement Learning Approach, in: 2025 IEEE International Conference on Quantum Artificial Intelligence (QAI), 2025, pp. 253–260. URL: https://ieeexplore.ieee.org/document/11344638/. doi:10.1109/QAI63978.2025.00047.
[10] F. J. R. Ruiz, T. Laakkonen, J. Bausch, M. Balog, M. Barekatain, F. J. H. Heras, A. Novikov, N. Fitzpatrick, B. Romera-Paredes, J. Van De Wetering, A. Fawzi, K. Meichanetzidis, P. Kohli, Quantum circuit optimization with AlphaTensor, Nature Machine Intelligence 7 (2025) 374–385. URL: https://www.nature.com/articles/s42256-025-01001-1. doi:10.1038/s42256-025-01001-1.
[11] R. Zen, J. Olle, L. Colmenarez, M. Puviani, M. Müller, F. Marquardt, Quantum Circuit Discovery for Fault-Tolerant Logical State Preparation with Reinforcement Learning, Physical Review X 15 (2025) 041012. URL: https://link.aps.org/doi/10.1103/gqpr-dgz7. doi:10.1103/gqpr-dgz7.
[12] V. Villar, J. Cruz-Benito, I. Faro, D. Kremer, Ai methods for permutation circuit synthesis across generic topologies, Proceedings of the AAAI Symposium Series 7 (2025) 404–410. doi:10.1609/aaaiss.v7i1.36912.
[13] D. Lizzio Bosco, J. Cossio, C. Piazza, G. Serra, Alphaclifford: Efficient clifford synthesis and transpilation with model-based rl, 2026. URL: https://arxiv.org/abs/2608.18946. arXiv:2608.18946.
[14] R. Yeung, A. Kissinger, R. Cornish, Equivariant reinforcement learning for clifford quantum circuit synthesis, 2026. URL: https://arxiv.org/abs/2605.10910. arXiv:2605.10910.
[15] D. Lizzio Bosco, L. Cincio, G. Serra, M. Cerezo, Quantum Circuit Pre-Synthesis: Learning Local Edits to Reduce t-count, 2026. URL: https://arxiv.org/abs/2601.19738v1.
[16] F. Finger, F. Rapp, P. Kalidindi, K. He, K. Yin, A. Koziell-Pipe, D. Z. Manrique, G. Greene-Diniz, S. Clark, H. Fawzi, B. Romera-Paredes, A. Fawzi, K. Meichanetzidis, Automated near-term quantum algorithm discovery for molecular ground states, 2026. URL: http://arxiv.org/abs/2603.26359. doi:10.48550/arXiv.2603.26359, arXiv:2603.26359 [quant-ph].
[17] S. Kutin, D. P. Moulton, L. Smithline, Computation at a distance, Chic. J. Theor. Comput. Sci. 2007 (2007). URL: https://api.semanticscholar.org/CorpusID:5429591.
[18] F. Farnoud, O. Milenkovic, Sorting of Permutations by Cost-Constrained Transpositions, IEEE Transactions on Information Theory 58 (2012) 3–23. URL: http://ieeexplore.ieee.org/document/6121988/. doi:10.1109/TIT.2011.2171532.
[19] T. Miltzow, L. Narins, Y. Okamoto, G. Rote, A. Thomas, T. Uno, Approximation and Hardness of Token Swapping, LIPIcs, Volume 57, ESA 2016 57 (2016) 66:1–66:15. URL: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2016.66. doi:10.4230/LIPICS.ESA.2016.66.
[20] J. Jiang, X. Sun, S.-H. Teng, B. Wu, K. Wu, J. Zhang, Optimal space-depth trade-off of cnot circuits in quantum logic synthesis, in: Proceedings of the Thirty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA '20, Society for Industrial and Applied Mathematics, USA, 2020, p. 213–229.
[21] A. Acuaviva, A. Acuaviva, P. Acuaviva, CNOT-Distance is NP-complete under all-to-all connectivity, 2026. URL: http://arxiv.org/abs/2608.03825. doi:10.48550/arXiv.2608.03825, arXiv:2608.03825 [quant-ph].