Manuscript Offprint

arXiv:2610.40886

Clifford synthesis is NP-complete

Søren Fuglede Jørgensen

SØREN FUGLEDE JØRGENSEN

ABSTRACT. We show that the problem of synthesizing a quantum circuit for a given Clifford operator using at most a specified amount of resources is NP-complete for several resource models of practical interest.

Specifically, we study synthesis of a given Clifford operator using single-qubit Clifford gates and two-qubit Clifford gates, with full qubit connectivity and no additional ancilla qubits. With single-qubit gates free and CNOT as the only two-qubit gate, we show that deciding whether a given target admits an implementation using at most a specified number of CNOT gates is NP-complete, and we show that the problem remains NP-complete when any two-qubit Clifford gate is allowed and the budget counts all such gates. Moreover, we show that both results continue to hold when SWAP gates may be inserted for free, and when single-qubit gates are also considered part of the budget.

In each case, we build on recent work by Li and Guan and show that there are polynomial-time reductions from Hamiltonian path in grid graphs to these decision problems, using a number of qubits quadratic in the number of grid vertices.

1. INTRODUCTION

Clifford operators play a central role in quantum error correction [1] and magic state distillation [2,3], making efficient Clifford circuit synthesis an important task in quantum computing. It is also useful in quantum circuit optimization in which peephole methods replace Clifford subcircuits by equivalent circuits with fewer gates or smaller depth, reducing the resource requirements of the larger circuit [4].

As such, a significant amount of work has been devoted to developing algorithms for Clifford circuit synthesis. These range from efficient algorithms that can synthesize instances with large qubit count [5] but may produce circuits with high gate counts or depths, to methods for producing lookup tables giving optimal circuits for small numbers of qubits [6], and exact and heuristic synthesis algorithms covering intermediate regimes aiming to minimize computational requirements of the resulting circuits, generally measured in terms of circuit gate count and circuit depth [4,7–21]. A similar body of literature exists for the closely related problem of minimizing circuits that do not allow general Clifford gates, but only CNOT gates, and for variations such as those that allow CNOT and T gates [22–36]. Indeed, our work follows a line of earlier work on the complexity of circuit optimization [25,35–38], and builds on the recent work of Li and Guan [36] which showed NP-completeness of CNOT circuit synthesis.

For contemporary quantum hardware, it is generally the case that single-qubit gates are available at lower cost and with higher fidelity compared to two-qubit entangling gates. This motivates the study of Clifford circuit synthesis under cost models that are aimed at minimizing the use of two-qubit gates, and our focus is on minimizing the use of CNOT gates. By the stabilizer formalism, any Clifford operator defines a symplectic matrix F∈Sp2N(F2)F \in \mathrm{Sp}_{2N}(\mathbb{F}_2) acting on the 2N2N-dimensional symplectic vector space over F2\mathbb{F}_2, and the goal is to write FF as a product of single-qubit Clifford gates and CNOT gates using as few CNOT gates as possible.

Our main result is that deciding whether a given Clifford operator can be synthesized using at most a specified number of CNOT gates, with single-qubit gates being free, is NP-complete. Throughout, we will allow full connectivity of the qubits, and we will not consider additional ancilla qubits. Specifically, assume that FF is the symplectic matrix of a Clifford operator. If CC is a circuit composed of single-qubit Clifford gates and CNOT gates which implements FF, let cost(CC) be the number of CNOT gates in this circuit, and let cost(FF) denote the minimal cost among all circuits that implement FF. Of particular interest will also be linear reversible operators, which are Clifford operators that can be

KVANTIFY, ROSENVÆNGETS ALLÉ 25, DK-2100 COPENHAGEN, DENMARK E-mail address: sfj@kvantify.dk. Date: November 2, 2026.

implemented using only CNOT gates. Any such operator may be represented by an invertible binary matrix A∈GLN(F2)A \in \mathrm{GL}_N(\mathbb{F}_2) and defines a Clifford operator with symplectic matrix

ρ(A)=(A00(A−1)⊤)\rho(A)=\begin{pmatrix}A&0\\ 0&(A^{-1})^{\top}\end{pmatrix}

acting on the same number of qubits.

Theorem 1.1. Deciding whether cost(F) ≤ k is NP-complete. NP-completeness holds already for targets F=ρ(A)F = \rho(A) with A lower unitriangular and (A−I)3=0(A - I)^3 = 0.

Amy et al. [25] studied parity networks, namely CNOT circuits that generate a prescribed set of parities, possibly at different stages of the computation. They proved that deciding whether such a network exists within a given gate budget is NP-complete when all CNOT gates share a common target qubit. Their reduction encodes a hypercube walk visiting a prescribed set of vertices. Li and Guan [36] show NP-completeness for CNOT-minimization of linear reversible operators by using a tight gate budget to force a Hamiltonian path in the induced subgraph on a prescribed set of vertices: the reduction is from Hamiltonian path in induced subgraphs of the hypercube, closely related to the Hamiltonian path problem in grid graphs for which NP-completeness is known [39]. Any path through such a subgraph has the property that two consecutive vertices differ by a single bit flip, corresponding to a CNOT operation. In turn, the composition of these operations defines a linear operator. To ensure that any circuit for such an operator has the desired structure, they further introduce recorder qubits; whenever a new parity is encountered, its value is copied to a number of recorder qubits, helping ensure that the circuit uses the intended sequence of CNOT operations, and that no shortcuts are taken. They show that m recorder qubits per parity suffice to enforce the intended structure, where m is the number of vertices in the subgraph. The final linear operator is one acting on m2+d+1m^2 + d + 1 qubits. See Figure 1 for an example.

In our case, we have the further obstacle that shortcuts through the use of single-qubit Clifford gates must also be prevented. We find that if we build on the construction of Li and Guan and extend the number of recorder qubits for each parity from mm to 6(m−1)+16(m-1)+1, the resulting linear operator has the property that single-qubit Clifford gates cannot be used to bypass the intended sequence of CNOT operations. That is, any circuit implementing the operator with a CNOT gate count below some carefully chosen threshold can be transformed into a CNOT-only circuit without increasing the CNOT gate count. As such, we also end up with a polynomial-time reduction from the Hamiltonian path problem in a grid graph with specified endpoints.

While preparing this manuscript, we became aware of the recent work of Keller and Kueng [40] which shows NP-completeness of deciding whether Clifford circuits can be implemented below a given depth for a given gate set. The work at hand is concerned with cost functions that involve gate count, and not depth, and is therefore complementary to the work in [40].

In Section 2, we introduce the necessary background on Clifford synthesis and the symplectic representation of Clifford operators.

In Sections 3 and 4, we provide a characterization of CNOT gates in Clifford circuits into separate types, based on their action on the symplectic vector space. In a CNOT-only circuit, all gates correspond to gates of one type (called T below), and we introduce a series of bounds that ultimately allow us to ensure that any circuit implementing within the specific CNOT budget the Clifford synthesis instance defined by a hypercube Hamiltonian path instance as above uses CNOT gates only of that one type.

In Section 5, we describe and prove the reduction from grid Hamiltonian path to Clifford synthesis. Readers interested primarily in the main ideas of the reduction may wish to start there.

In Section 6, we provide generalizations to other cost models of practical relevance. We show that NP-completeness extends to the case where the resource cost includes arbitrary two-qubit Clifford gates, rather than just CNOT gates, and to the case where single-qubit Clifford gates are also counted with a given fixed cost per gate. And we show that NP-completeness still holds in the model where SWAP gates are considered free; a cost model that is commonly used when optimizing quantum circuits for architectures with complete qubit connectivity.

(a) Grid instance

Figure

(b) Hypercube embedding

Figure

(c) Circuit from path

Figure

(d) Full CNOT circuit with recorder qubits

Figure

FIGURE 1. Overview of the reduction on an example grid graph with m=4m=4 vertices and endpoints s=(0,0)s=(0,0) and t=(2,1)t=(2,1). (a) A Hamiltonian path visits (0,0),(1,0),(1,1)(0,0),(1,0),(1,1), and (2,1)(2,1) in that order. (b) The encoding maps this path to 000→100→101→111000\to100\to101\to111 in the three-dimensional hypercube; the other cube vertices and edges are shown in grey. (c) Three CNOTs, controlled by coordinate qubits x1,x3x_1,x_3, and x2x_2 in that order, update the path qubit; the parities on its successive wire segments identify the Hamiltonian path. (d) The full circuit shows the coordinate wires and rr recorder qubits for each vertex. Only the first two and last recorder wires and their CNOTs are drawn in each group. Blue CNOTs move the path qubit along the hypercube edges, and green CNOTs add its current parity fvf_v to each recorder yv,ay_{v,a}. Here, m=4m=4, so r=6(m−1)+1=19r=6(m-1)+1=19 and the circuit uses 4r+3=794r+3=79 CNOT gates. The main goal of the paper is to show that any other Clifford circuit implementing the same operator as this circuit, using no more than R+m−1R+m-1 CNOT gates must still be such that the Hamiltonian path can be read off from the parities on the path qubit x0x_0.

References (41)