Manuscript Offprint

arXiv:2610.06768

Complexity separations for optimal matchgate-Clifford synthesis

Berta Casas, Diego García-Martín, Yuxuan Zhang

Abstract

Clifford and matchgate circuits are canonical families of classically simulable quantum circuits. Their intersection, the matchgate-Clifford group, plays an important role in randomized fermionic protocols and in matchgate synthesis. Its adjoint action is isomorphic to the group of unit-determinant signed permutations of 2n Majorana modes, and we study optimal exact synthesis in this group. That is, given a target unitary and a gate set, output an n-qubit circuit implementing the target using the fewest operations. We show that the complexity of this problem strongly depends on the gate set. In particular, we study gate sets consisting of Majorana braids with different connectivity graphs. For path and complete graphs, we prove that the problem is classically solvable in O(n2)\mathcal{O}(n^2) time, and we provide explicit gate-optimal compilers. In addition, we prove that when the connectivity graph is a tree, the decision version of the optimal synthesis problem becomes NP-complete. Finally, we benchmark our optimal compiler on chains of up to n=80n = 80 qubits against those of Qiskit and Tket, obtaining circuits with constant factor improvements ×2.57\times 2.57 and ×2.28\times 2.28 in the total number of gates, respectively.

1 Introduction

Unitary synthesis is a fundamental problem in quantum computing [1]. Given a target unitary realizing a desired polynomial-size quantum computation, one needs to decompose it (either exactly or approximately) using a fault-tolerant gate set. Naturally, it is desirable to find a circuit realization that uses fewer operations, as this can greatly reduce errors and total runtime [2, 3]. The task of finding a decomposition with the least number of gates, known as optimal synthesis, is however a hard problem in general. Its precise complexity has not been pinned down yet, but it has been shown that minimizing the T-count using the Clifford+T gate set is NP-hard (lower bound) and contained in NP NQP^{NQP} (upper bound) [4]. Thus, finding optimal circuits is generally hopeless when the number of qubits grows beyond just a handful [5].

This has motivated the study of the synthesis problem for restricted classes of unitaries, where additional algebraic structure can be exploited. For instance, an impressive series of results has led to optimal single-qubit unitary compilers [6–14]. Clifford circuit synthesis has also been extensively studied [15–23], and the decision version of optimal synthesis for circuits consisting of CNOT gates

*yuxuan.zhang@epfl.ch

Matchgate-Clifford unitary

Signed permutation

Optimal circuit

Figure

Figure

(010000000−100−100000000001000010001000)\begin{pmatrix}{{{0}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{-1}}}&{{{0}}}&{{{0}}} \\{{{-1}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}} \\{{{0}}}&{{{0}}}&{{{0}}}&{{{0}}}&{{{1}}}&{{{0}}} \\{{{0}}}&{{{0}}}&{{{1}}}&{{{0}}}&{{{0}}}&{{{0}}}\end{pmatrix}

?

Figure

Generatorsa) Path![Figure](images/page2_figure4.png)b) All-to-all![Figure](images/page2_figure5.png)c) Tree![Figure](images/page2_figure6.png)
ComplexityPPNP-complete
Optimal compilerO(n2)\mathcal{O}(n^{2})O(n2)\mathcal{O}(n^{2})-

Figure 1: Overview of our main results. We consider the problem of optimal unitary synthesis in the matchgate-Clifford group. Representing the target nn-qubit unitary as a 2n×2n2n \times 2n signed permutation matrix with determinant +1+1, we ask for an optimal circuit with a minimum number of Majorana braids along the edges of a given connectivity graph. We show that for path and complete graphs, the problem can be solved efficiently on a classical computer by providing explicit algorithms that run in O(n2)\mathcal{O}(n^2) time. In addition, we prove that the problem becomes NP-complete when the connectivity graph is an arbitrary tree.

or CZ gates between arbitrary pairs of qubits has been proven to be NP-complete [21–23]. More recently, another important group of unitaries whose synthesis was addressed is that of matchgate or free-fermionic unitaries [24]. Here, the complexity of optimal synthesis remains open.

Importantly, the ultimate goal is not to compile an isolated single-qubit, Clifford or matchgate unitary, but rather to treat the circuits as chunks of a larger quantum computation. Indeed, any unitary can be approximated to arbitrary precision using layers of Clifford gates interleaved with layers of TT gates [1]. Similarly, any fermionic unitary can be factorized into layers of matchgates interleaved with layers of interacting operations [25]. The mathematical structure of the Clifford and matchgate unitaries can then be leveraged to exponentially reduce the size of the matrices to be synthesized, potentially allowing for significant savings in the gate counts of the corresponding layers. In turn, this would reduce the gate count of the entire computation as well.

In this work, we focus on the group of matchgate-Clifford unitaries [26], i.e., the intersection of the matchgate and Clifford groups (see Section 2 for details). This group forms a matchgate 3-design [27, 28] and can therefore be used in randomized fermionic protocols such as fermionic classical shadows [27–29], benchmarking of quantum devices [30–32], or fermionic sampling [33]. Moreover, it plays a crucial role in matchgate synthesis, analogous to that played by the Clifford group in general unitary compilation. Namely, the matchgate-Clifford group together with the TT gate (up to a phase) is universal for matchgates [24]. Hence the motivation to study optimal synthesis in this group.

At the mathematical level, the adjoint representation of nn-qubit matchgate-Clifford unitaries is isomorphic to the group of 2n×2n2n \times 2n signed permutation matrices with determinant +1+1 acting on the vector space of Majorana operators. Optimal matchgate-Clifford synthesis can therefore be formulated as an optimal word problem in this group, and consequently, our results may find application in the field of combinatorial group theory beyond the quantum setting [34].

We consider gate sets consisting of Majorana braids and their inverses [26] on different connectivity graphs, where a braid acts as a signed transposition between pairs of Majoranas connected by an edge. The optimal synthesis problem then asks to realize the desired signed permutation using the smallest number of braids along the edges of the connectivity graph. Our main results are summarized in Fig. 1. For both path and complete graphs, we prove that optimal synthesis can be solved classically in O(n2)\mathcal{O}(n^{2}) time. In particular, we find efficient algorithms for optimally assigning the signs, which combined with well-known sorting algorithms for permutation matrices [35] provide explicit optimal compilers. In addition, for path graphs we investigate the optimal two-qubit-gate count, bound it, and prove that there exists a circuit simultaneously achieving this quantity and optimal total gate count.

Furthermore, we benchmark our path-graph optimal compiler on chains of up to n=80n = 80 qubits against those of Qiskit [36, 37] and Tket [38], obtaining circuits with constant factor improvements ×2.57\times 2.57 and ×2.28\times 2.28 in the total number of gates, respectively. We choose to benchmark the path graph compiler because the generators are simply single-qubit SS gates (up to a phase) and two-qubit Rxx(π2)R_{xx}\left(\frac{\pi}{2}\right) rotations, under the Jordan-Wigner mapping between fermions and qubits. Thus, this case is the most relevant for matchgate circuits in practice [24]1^{1}. We nonetheless emphasize that, alternatively to the Jordan-Wigner picture where one works with qubits and matchgates, one could instead consider a genuinely fermionic device where many different connectivities between Majorana modes may be possible in principle [39, 42]. In such context, our results provide guidance as to which topologies may be more beneficial in practice.

Next, we study arbitrary tree connectivity and show that the decision version of the optimal synthesis problem is NP-complete. The complexity is inherited from the NP-completeness of token swapping on trees [43], which asks to minimize the number of swaps along the edges of an arbitrary tree to realize a given permutation of the tokens (in our case, the tokens would be the Majorana operators, except that we must also account for the signs). Finally, by providing a polynomial upper bound on the number of Majorana braids needed to synthesize a matchgate-Clifford unitary on any connected graph, we find that the synthesis problem on arbitrary connectivities is in NP and thus it is also NP-complete (since it is already complete for trees).

References (81)