Manuscript Offprint
arXiv:2611.04381On the Hardness of Approximate Quantum Circuit Membership and Optimization
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Adam Husted Kjelstrøm, Jaco van de Pol, and Andreas Pavlogiannis
Department of Computer Science, Aarhus University
Quantum circuit optimization is a standard, indispensable component of the quantum software stack, used to reduce noise, maximize performance, alleviate costs of quantum error correction, or tailor quantum circuits to specific hardware platforms. Another natural problem is the approximate membership question: for a fixed set of unitaries , decide whether a given circuit can be approximated within a distance by a unitary in , according to some metric . Membership is a special case of optimization, where specifies a set of unitaries that can be implemented at no cost (e.g., with noise-minimal circuits, or without the need for magic states). In a well-known result, Janzing, Wocjan, and Beth (Int. J. Quantum Inf., 2005) showed that, for being the operator metric, the special case of membership where (i.e., approximate identity) is QMA-complete when comes with a promise that it is either close to the identity or sufficiently far from it.
In this work, we generalize the setting of Janzing, Wocjan, and Beth in three natural directions: (i) we work over promise-free inputs, (ii) besides the case , we also consider the cases where contains only Clifford unitaries, or only generalized permutation matrices (i.e., no superposition), and (iii) we measure unitary distances under several metrics , namely, the trace-based, spectral, and operator metrics. We show that, in all cases, the approximate membership question is hard even for , for wide ranges of , provided 's gate set can implement Clifford+T, which is a property of the gate-sets provided by standard hardware. In particular, if , or if contains only generalized permutation matrices, , and is a trace-based distance, then -hardness holds for all possible (non-trivial) values of . Moreover, if and is a trace-based distance, then -hardness holds even for circuits over classical-reversible gate-sets.
Overall, our results indicate that the approximate membership problem is harder over promise-free inputs, compared to QMA-completeness of Janzing, Wocjan, and Beth, and this hardness persists across quantum resources (any gates, non-Clifford, superposition) and various distance metrics. Finally, these results directly imply the -hardness of circuit optimization when minimizing total, non-Clifford, or superposition gate depth or count.
Adam Husted Kjelstrøm: husted@cs.au.dk
Jaco van de Pol: jaco@cs.au.dk
Andreas Pavlogiannis: pavlogiannis@cs.au.dk
1 Introduction
Optimizing quantum circuits, that is, given a circuit , obtaining an (approximately) equivalent circuit that minimizes an objective function, is a standard task to improve the performance of quantum computers, thus producing circuits that are tailored to a given quantum run-time environment. By picking different objective functions, optimization can target both NISQ and error-corrected platforms by minimizing, e.g., the number of multi-qubit gates or non-Clifford resources. Permitting a bit of slack, i.e., allowing an output circuit that is a close (but not necessarily exact) match, is typical [1, 2, 3, 4, 5, 6, 7, 8, 9]. This is partly because it gives the optimizer more freedom, which may yield better results, and partly because it is often unavoidable: for finite gate-sets such as Clifford+T, universality holds only approximately, so most unitaries cannot be implemented exactly. Circuit optimization is often phrased as a decision problem given a circuit and budget . It is parameterized by a cost function , a metric , a tolerance , and a gate-set , where denotes the distance between the unitaries of and under :
Input: A circuit over and an integer . Question: Is there a circuit over s.t. and ?
Another common computational problem is the (approximate) equivalence question: given two circuits and , are their corresponding unitaries -close to each other, according to some metric ? The equivalence question often serves as a subroutine of peephole optimization, whereby a subcircuit can be replaced by a circuit with a small cost , provided that it encodes an equivalent computation. The case where is the empty circuit (asking whether is -close to the identity) has received special attention. Indeed, besides being theoretically fundamental, this question also underpins practical circuit-reduction techniques, whereby parts of a circuit are deleted if they are deemed to be close enough to the identity [10, 11, 12]. When comes with a promise that its distance from I in the operator metric is either or with , the resulting problem, known as non-identity check, is well known to be QMA-complete over gate-sets of arbitrary one- and two-qubit gates [13]. On the other hand, insisting on corresponds to exact non-identity check, which is NQP-complete for circuits over Clifford+T [14, 15, 16].
A natural generalization of equivalence is the membership question. It is parameterized by a set of unitaries that are considered to be of minimal cost. Instead of comparing with a single candidate circuit , the task is to decide whether is approximately equivalent to any element of .
Input: A circuit over . Question: Is there a s.t. ?
Approximate equivalence with the empty circuit is the special case of APPROXMEMBER, which we call APPROXID. In this work, we consider two additional cases for , namely, and , where is the set of unitaries imple-
| Identity | Any Clifford set | Any generalized permutation set | |
|---|---|---|---|
| Trace (Sine) | (0, 1) | (0, ) | (0, 1) |
| Spectral | (0, 2) | (0, ) | (0, ) |
| Operator | (0, 2) | (0, ) | (0, ) |
Table 1: The open interval of P-time computable for which Theorem 1 establishes PP-hardness for APPROXMEMBER(), per metric and set of unitaries , where the columns cover , every with , and every with , respectively. Boldface entries mark ranges equal to , i.e., every strictly between 0 and the diameter of the metric.
mented by Clifford circuits and is the set of generalized permutation matrices (which do not create superposition). We further require that . Each case asks whether can be approximated to precision with restricted quantum resources: no gates at all (), only Clifford gates (), or no superposition gates ().
We consider three standard metrics for defining the distance between two unitaries and . The Sine metric is defined as a function of the trace , which captures the “average-case” difference between and . Related measures include the Bures angle, Bures metric [17], and average gate distance measures [18]. These have seen extensive use in quantum circuit synthesis [2, 3, 4, 5, 6, 7]. The spectral metric, induced by the operator norm, captures the “worst-case” difference between and . This is the metric in which the Solovay-Kitaev theorem is stated [1]; it is also used for quantum circuit optimization [8, 9]. The operator metric, also considered in [16], is given by the minimum of the spectral metric between and over . This is a natural choice as the global phase is physically irrelevant, potentially permitting better optimizations.
Our contributions. Our main result is that APPROXMEMBER() is PP-hard for every set of unitaries , metric , and tolerance covered by Table 1, where is P-time computable, i.e., computable to bits of precision in time .
Theorem 1. Consider any gate-set that exactly implements Clifford+T. For each combination of a set of unitaries , metric , and P-time computable in the range given by the corresponding cell in Table 1, we have that APPROXMEMBER() is PP-hard.
In the context of optimization, given some cost function , let denote the set of unitaries of circuits with . Theorem 1 yields the following corollary.
Corollary 1. Consider any gate-set that exactly implements Clifford+T. For each combination of a set of unitaries , metric , and P-time computable in the range given by the corresponding cell in Table 1, and any for which , we have APPROXOPT is PP-hard.
A few consequences are worth highlighting, with P-time computable throughout. First, optimizing total gate depth or count is PP-hard under each of the three metrics for every strictly between 0 and the diameter of the metric. Second, the same holds for optimizing superposition gate depth or count, this time only for the Sine metric. Third, optimizing non-Clifford (e.g., T) gate depth or count is PP-hard for . This strengthens a result of Van de Wetering and Amy [16] who, under the operator metric, established NP-hardness for , and also generalizes it to the other metrics. Fourth, APPROXID(Sine, , ), and APPROXOPT(, Sine, , ) for the total gate depth or count, remain PP-hard for all even when consists only of classical-reversible gates (e.g., X, CNOT, and TOF), which cannot create superposition; see Remark 1.
Our PP-hardness results also generalize in two ways. First, for any distance measure that is derivable from one of the considered metrics , i.e., for some strictly increasing function , the corresponding membership and optimization problems under are also PP-hard, for the respective approximation range obtained under (see Lemma 1). In particular, every Sine entry of Table 1 transfers to the Bures angle, the Bures metric, and the average gate distance at the correspondingly transformed threshold. This covers, for instance, the distance measures used in [4, 7], and shows that minimizing total depth or count to within any non-trivial (measure-specific) for any distance measure derived from the Sine metric is PP-hard. Second, the optimization problems remain PP-hard even to approximate the minimum cost within any factor (constant or not), because the hardness holds already when the minimum cost is 0 (i.e., the optimal circuit has and thus ); see Remark 2.
Paper organization and proof structure. The remainder of the paper is organized as follows. Section 2 fixes notation and recalls standard background on unitaries, quantum circuits, distance measures, and the class PP. Fig. 1 shows the chain of reductions towards Theorem 1. We use ATMOSTSAT as the source of PP-hardness, which asks whether a propositional formula is satisfied by at most a fraction of its assignments. In Section 3, Lemma 2 shows that ATMOSTSAT remains PP-hard under the promise that at most a fraction of all assignments satisfy ; we call this promise problem PROMISEATMOSTSAT. We then use the PP-hardness of PROMISEATMOSTSAT to establish the hardness of PROMISEAPPROXID under all three metrics we consider (Theorem 2). In words, PROMISEAPPROXID is a promise version of APPROXID, asking whether a circuit is -close to I under the promise that it is -close to it. This naturally yields hardness for APPROXID (as the two problems agree on every circuit satisfying the promise), and thus completes the case of Theorem 1. In Section 4, we establish Theorem 1 for the cases and . We show that the hard circuits for PROMISEAPPROXID are also hard for APPROXMEMBER() with : intuitively,

Figure 1: The chain of reductions. ATMOSTSAT() is by folklore PP-hard for every fixed efficiently computable , and each arrow is a Karp reduction, where an arrow into the bottom row reduces to APPROXMEMBER() for the indicated , with throughout. Hardness for each is obtained in one of three ways: via a reduction from a promise problem to its promise-free variant, as is the case for (); via the triangle inequality argument of Lemma 6, which is the route taken for ; or via Lemma 3, as is the case for .
the promise that is always -close to I, combined with the triangle inequality of the respective metric, implies that the only elements of that can be -close to are those at distance 0 from I, and thus APPROXMEMBER() coincides with PROMISEAPPROXID on circuits satisfying its promise, which is PP-hard by Theorem 2. The case of proceeds by reduction from PROMISEATMOSTSAT: given , we construct circuits which are -close to I when is satisfied by at most a fraction of its assignments, and at a distance greater than from otherwise (Theorems 4 and 5). We conclude in Section 5 with open problems.
2.1 Unitary Transformations and Quantum Circuits
Unitary Transformations. Throughout, we write for -qubit unitaries. A unitary (transformation) satisfies . By the spectral theorem, admits a factorization as , where and is diagonal with the eigenvalues of on the diagonal. The eigenvalues of are of the form for real ; we call the set the eigenangles of .
We write if for some and denote the tensor product of and by . If and are the eigenangles of and , respectively, then the eigenangles of are .
Gates and Quantum Circuits. A circuit is a finite sequence of quantum gates from some gate-set , each applied to specific (possibly different) qubits in a system. Each gate corresponds to a fixed unitary. We frequently use some standard gates, defined by their action on the basis qubits written and ; we let . The identity gate is . The Pauli gates are defined as , and .
The Clifford gate-set consists of CNOT, H and S. Here the binary gate CNOT (Conditional NOT, entangling) is defined by . The phase gate (so ) and the Hadamard gate (superposition) as (so ).
We need at least one more quantum gate to obtain an approximately complete gate-set [1]. To this end we define the gate , such that . The Clifford+T gate-set plays an important role in our main result.
Ancillas. To enable tradeoffs between circuit depth and circuit width, we permit the use of helper qubits, called ancillas, both clean (initialized to ) and dirty (in an unknown state), as long as they are restored after use. Specifically, for a circuit over data qubits, dirty ancillas, and clean ancillas, we say that exactly implements the -qubit unitary if for all -qubit quantum states and -qubit quantum states , we have
We call such a circuit ancilla-restoring. A circuit that does not restore its ancillas implements no unitary by this definition; every circuit we construct is ancilla-restoring. We identify a circuit with the unitary it exactly implements: we write for and speak of the eigenangles of for those of .
Special Unitaries. In the sequel, we will use three particular sets of unitaries:
where a generalized permutation matrix is a unitary of the form for a bijection on and a phase function . Since they map basis states to basis states (with a global phase), they cannot introduce superposition.
Since the unitary I can be implemented by the empty circuit, and . We will use the fact that is the normalizer of the Pauli group [19, Ch. 10]. That is, if , then for any Pauli (a tensor of Pauli gates with phase ), we have is a Pauli, and vice versa.
Note that the use of ancillas neither enlarges nor takes superposition-free circuits outside . Dirty ancillas reduce to clean ones: taking in the definition shows that also exactly implements when its dirty ancillas are regarded as clean, so we may assume . For superposition-free , we have , and restoration forces for some bijection , so is again a generalized permutation matrix. For Clifford , we use the normalizer property above. Let be any Pauli on the data qubits. Then . By the normalizer property, is also a Pauli, say ; comparing the two expressions forces and , a Pauli. Hence is Clifford.
2.2 Cost Functions and Free Sets
We use a cost function to abstract from a particular implementation setting. A cost function is a map from circuits over to non-negative reals. Our results depend on only through its free set , the set of unitaries that can be implemented at cost 0:
We consider every whose free set satisfies one of the following:
-
. We call such f a total cost function. Note that total gate depth and count are instances.
-
. We call such a non-Clifford cost function. Note that T-depth and T-count are instances (when is Clifford+T).
-
. We call such a superposition cost function; H-depth and H-count are instances (when is Clifford+T), as a circuit with no superposition-generating gate implements a generalized permutation matrix.
2.3 Distance Metrics
The literature provides several functions for measuring the similarity between unitaries; we review three classes of them. We say that a function from -qubit unitaries to real numbers is a metric if these four properties hold: (i) ; (ii) ; (iii) for -qubit (the triangle inequality); and (iv) either (which holds for the spectral metric), or (which holds for the Sine and operator metrics). If we have all but perhaps the triangle inequality, we simply call a distance measure.
We write for the diameter of , that is, . We overload the notation so that either argument may be a circuit over data qubits, standing for the unitary it implements, and so that for a set of unitaries , we have , the infimum over distances between and elements of .
Derived distance measures. We say that a distance measure is derived from if there is a strictly increasing , independent of , s.t. for all and .
Lemma 1. Consider any gate-set . Let be a set of unitaries, let be a cost function, let be a distance measure derived from via , and let . Then APPROXMEMBER() = APPROXMEMBER(), and APPROXOPT() = APPROXOPT(), in the sense that they have the same yes-instances.
Proof. As is strictly increasing, iff for all and .
Sine metric and derived trace measures. The Sine metric is defined in terms of the operator trace. For a square matrix with eigenvalues , the trace is
We use the following standard properties: , , and for the -qubit identity .
The Sine metric [7] is defined as
The literature contains many derived distance measures, including the Bures angle, Bures metric [17], and the average gate distance [18]. To illustrate, the Bures angle, , is derived as . We have .
Spectral metric. The spectral metric is defined in terms of the operator norm. We write for the Euclidean vector norm. Let be (not necessarily unitary) matrices. The operator norm of is
If is normal, then , where are the eigenvalues of . The operator norm satisfies . Further, and , while for unitary , .
These distance measures are often phrased in terms of the fidelity of two states. The fidelity evaluated on the Choi states of and equals , so the state-level definitions and our trace-level definition describe the same quantity.
For unitaries with spectral decomposition where , we have that , since
The spectral metric can now be defined as
where are the eigenangles of . Note that this metric is sensitive to global phase: there exist , and s.t. . We have .

Figure 2: Left: A unit circle with the eigenangles of . Right: The same unit circle with the shortest arc containing all eigenangles of drawn in. The minimizing sits at the midpoint of the arc.
Operator metric. The operator metric is the global-phase-invariant counterpart of the spectral metric:
where are the eigenangles of . Using standard trigonometry, as the optimizing minimizes the worst case, it lies at the midpoint of a shortest arc on the unit circle containing all eigenangles, meaning the endpoints of the arc are the worst case (see Fig. 2). We see that an equivalent formula is
where is the length of the shortest arc on the unit circle containing all eigenangles of . We have .
Mutually underivable metrics. No two of the Sine, spectral, and operator metrics are derived from one another, so Lemma 1 does not transfer results between them and we treat each separately. Specifically, for any two distinct metrics among the Sine, spectral, and operator metrics, there exist unitaries and , s.t. but . For spectral vs. operator, we have , while . For Sine vs. spectral, and Sine vs. operator, one can verify that and , while .
2.4 The complexity class PP
Let be a propositional formula over bits, defined inductively over conjunctions, disjunctions, and negations of Boolean variables. We write for the fraction of satisfying assignments of . Note that .
The complexity class [20] is central to our results. A language is in if there is a probabilistic polynomial-time Turing machine that accepts with probability greater than iff . A real number is -time computable if, given in unary, a dyadic rational within of can be computed in time . The -time computable reals remain -computable under on , , and on [21, 22]. It is folklore that is -hard for every fixed -time computable ; for , see [20, 23].
Karp reductions. A Karp reduction from a decision problem P to a decision problem Q is a -time computable map s.t. is a yes-instance of P iff is a yes-instance of Q; if P is a promise problem, this is required only for satisfying the promise of P, and if Q is a promise problem, must satisfy its promise. A problem is -hard if every problem in Karp-reduces to it, so -hardness transfers along Karp reductions.
Since contains , the class of “quantum tractable” problems, an efficient classical algorithm for any -hard problem would undermine the computational advantage of quantum computing. Moreover, is not even contained in the Polynomial Hierarchy unless the Polynomial Hierarchy collapses [24], placing it well beyond what is considered tractable. Further, contains and is itself contained in .
3 The PP-hardness of Approximate Identity
In this section, we prove the case of Theorem 1, i.e., of checking approximate identity. We prove the stronger statement that a promise version of APPROXID is -hard. The hardness of the promise version will allow us to also establish hardness for with in the next section (cf. Lemma 6).
3.1 Promise Problems
We begin with a promise version of , parameterized by real numbers and .
Input: An -bit propositional formula . Promise: . Question: Is ?
The next lemma states that is also -hard. The proof is via a reduction from that scales the satisfying fraction by a fixed dyadic constant; although it appears to be folklore, we are not aware of a specific reference for this fact, and thus we present it in the appendix.
Lemma 2. Let be fixed, with -time computable. Then is -hard.
Next, we define a promise version of APPROXMEMBER, where an additional real number serves as an approximation promise.
Input: A circuit over .
Promise: .
Question: Is ?
We further let be . The next lemma states sufficient conditions on , , and that make hard. In Section 3.2, we establish the hardness of under the Sine, spectral, and operator metrics by showing that it meets the conditions of the lemma.
Lemma 3. Consider any gate-set that exactly implements Clifford+T. Fix a set of unitaries , a metric , and a constant . Let be strictly increasing and continuous on with . Suppose there is a -time computable mapping from propositional formulas with to ancilla-restoring Clifford+T circuits s.t.
Then is -hard for all fixed s.t. is -time computable, where is the inverse of on .
Proof. Let be given s.t. is -time computable, where exists on since is strictly increasing and continuous there. Set , which is -time computable. As , we have . We give a Karp reduction from to , which yields the result by Lemma 2.
Given a yes/no instance of , transform into a Clifford+T circuit using the -time computable mapping. Since exactly implements Clifford+T, replacing each gate of by its implementation over yields a circuit over with , which is the output of the reduction.
We proceed to show correctness, that is, is a yes-instance iff is a yes-instance. By the promise of , we have , so
where the second equality follows from . Hence is a yes-instance iff . As is strictly increasing on , this is equivalent to , which is exactly the acceptance condition of .
It remains to verify the promise, that is, . By the promise of , we have , and since is increasing on , we see that as required.
3.2 Hardness of PROMISEAPPROXID
In this subsection, we apply Lemma 3 to obtain hardness of PROMISEAPPROXID. For each metric, we provide a -time computable mapping from propositional formulas to circuits , and a closed form for in terms of . In the rest of this section, we prove the following theorem.
Theorem 2. Consider any gate-set that exactly implements Clifford+T, and let be the Sine, spectral, or operator metric. Then PROMISEAPPROXID is PP-hard for all with P-time computable.
We treat the Sine, spectral, and operator metrics in turn, in each case applying Lemma 3. The spectral metric additionally depends on Lemma 4 and the operator metric additionally on Lemma 5.
3.2.1 Proof of Theorem 2 for the Sine Metric
Let be given. Given over bits, we construct a Clifford+T circuit over data qubits with . Treat as a classical Boolean circuit in the obvious way, and apply the construction of Section 1.4.1 of Nielsen and Chuang [19] to obtain an X+CNOT+TOF circuit with this unitary that uses polynomially many clean ancillas. Replacing each X and TOF gate by its implementation over Clifford+T yields . Set and . Then , , and is strictly increasing and continuous on . To apply Lemma 3, it suffices to show that for ,
Towards this, we compute
Plugging this in, we see that
Hence . For P-time computable , the value is P-time computable, so Lemma 3 yields PP-hardness of PROMISEAPPROXID(Sine, , , ) for every P-time computable . This concludes the proof for the Sine metric.
Remark 1. Before the final substitution, the circuit constructed above for the Sine metric is a standard oracle for that uses only X, CNOT, and TOF gates. Hence, for any gate-set that exactly implements X, CNOT, and TOF, APPROXID(Sine, , ) is PP-hard for every P-time computable , even when has no access to superposition or phase (i.e., is classical-reversible).
3.2.2 Proof of Theorem 2 for the Spectral Metric
The spectral and operator metrics are functions of the spectrum, so to apply Lemma 3 to these metrics, we construct a unitary whose spectrum is a function of the fraction of satisfying assignments of , namely of
As is a strictly increasing continuous bijection from onto with inverse , we have , , and iff for every . The following lemma gives such a unitary. Replacing by for a fresh bit preserves and takes linear time, so we assume in what follows. For a satisfiable propositional formula over bits, we define
Lemma 4. Given a propositional formula over bits, there is a P-time constructible Clifford+T circuit s.t. the eigenangles of are , where . Moreover, if and are both satisfiable, then
and otherwise .
Proof. We take , where is the Grover iterate [25] of :
where the left factor is Grover's diffusion operator (reflection about ) and the right factor is the phase oracle for (mapping to ). Since is implemented by a polynomially sized, P-time constructible ancilla-restoring Clifford+T circuit (Figure 6.2 of [19]), so is .
If is unsatisfiable, then , and if is unsatisfiable, then . In either case, is a reflection, so , and , so the eigenangles of are (mod ).
Otherwise and are well-defined states; let be the projector onto the span of and . The state lies in the span of and , and restricted to this span is the rotation , (Section 6.1.3 of [19]). Hence and . For perpendicular to the span of and , write with supported on and on . Then and , so and are also perpendicular to this span. The reflection maps to , which is perpendicular to this span and hence to , so and . Combining both, we obtain
In particular, is the rotation by on the span of and , with eigenangles , and the identity on its orthogonal complement, which has dimension , with eigenangle 0, so the eigenangles of are .
Let be given. Given , construct as in Lemma 4, so that has eigenangles with . Set and . Here increases on and decreases on , with , so we read as the inverse of the restriction of to , on which it is a continuous bijection onto ; since this gives . Then , , and is strictly increasing and continuous on . To apply Lemma 3, it suffices to show that for . We have
We see that
For -time computable , the value is -time computable, so Lemma 3 yields -hardness of PROMISEAPPROXID(sp, , , ) for every -time computable . This concludes the proof for the spectral metric.
3.2.3 Proof of Theorem 2 for the Operator Metric
In the remainder of this section, let be a constant integer (depending on ), to be chosen later, and set
The operator metric is a function of the length of the shortest arc on the unit circle containing all eigenangles, so to apply Lemma 3, we control the length of this arc, which means controlling the relative distances between all eigenangles. The following lemma controls this arc by taking a tensor product of powers of the circuit of Lemma 4.
Lemma 5. Given a propositional formula with , there is a -time constructible Clifford+T circuit s.t.

Figure 3: The eigenangles of in the proof of Lemma 5, drawn for : the multiples of from to . The highlighted arc contains all eigenangles and has length . The complement of this arc is a gap of length . As long as the gap is at least as long as the spacing between consecutive eigenangles, meaning (or equivalently, ), the shortest arc containing all eigenangles is the highlighted one, and .
Proof. Let be given. Note that iff . Let be the Clifford+T circuit obtained by applying Lemma 4 to . By Lemma 4, has eigenangles , where . Then let
Note that is the tensor product of Clifford+T circuits and hence is a Clifford+T circuit. Since is constant, for is constant, and since is polynomially sized, is also polynomially sized. As is the tensor product of such circuits, then is also polynomially sized and hence -time constructible.
The eigenangles of are , so the eigenangles of are
where are bits. These eigenangles are multiples of from to . See Fig. 3 for their placement on the unit circle. The eigenangles lie on an arc of length , whose complement has length . If , the complement is the largest gap between consecutive eigenangles, so the arc of length is the shortest arc containing all eigenangles. The condition rearranges to , which, as noted at the start of the proof, is equivalent to . In that range,
Let be given. By definition of and ,
so and as ; hence . We now fix with . Given , construct as in Lemma 5 for this , and set , so that . Since is strictly increasing and continuous, maps 0 to 0, and maps to , the outer sine in is applied only on for , where it is strictly increasing and continuous. Hence is strictly increasing and continuous on with and , so is invertible there and satisfies . Therefore the closed form of Lemma 5 applies throughout , where it reads , and with strictly increasing and continuous on . For -time computable , the value is -time computable, so Lemma 3 yields -hardness of PROMISEAPPROXID(op, for every -time computable . This completes the proof of Theorem 2.
4 The PP-hardness of Approximate Membership
In this section, we turn our attention to the hardness of APPROXMEMBER over sets with or , and prove Theorem 1 and Corollary 1. Section 4.1 treats by a reduction from PROMISEAPPROXID (Theorem 3). Section 4.2 treats by applying Lemma 3 directly to constructions whose distance to all of is a closed form in (Theorems 4 and 5). Section 4.3 combines these with Theorem 2 to prove Theorem 1 and Corollary 1.
4.1 Subsets of the Clifford-Implementable Unitaries
We prove that APPROXMEMBER() is -hard when by determining a range of tolerances for which the problem coincides with PROMISEAPPROXID, thereby inheriting the hardness of the latter. To formalize this, let
denote the smallest non-zero distance with respect to between the identity and an element of , with . Note that, for any two sets of unitaries and , if then . Lemma 6 shows that it suffices to establish lower-bounds on in order to obtain hardness of APPROXMEMBER() (see Fig. 4 for a pictorial illustration).
Lemma 6. Consider any gate-set . Let be a set of unitaries , let be a metric, and let . Then every circuit over with is a yes-instance of PROMISEAPPROXID iff is a yes-instance of APPROXMEMBER.
Proof. Let be a circuit over with .
If is a yes-instance of PROMISEAPPROXID, then , and since , the element of satisfies . Hence is a yes-instance of APPROXMEMBER.
If is a no-instance of PROMISEAPPROXID, then , while . We show that for all , we have . If , the triangle inequality gives . Otherwise , by definition of . Again by the triangle inequality,

Figure 4: The triangle inequality argument of Lemma 6. Here lies at non-zero distance from , so . The green regions contain the yes-instances of APPROXMEMBER() and the red region its no-instances; the dashed circle of radius around bounds the promise. A no-instance of PROMISEAPPROXID() satisfies (by the promise). The triangle inequality then gives , so .
Hence for all , we have , meaning is a no-instance of APPROXMEMBER(), as desired.
In light of Lemma 6, we establish lower-bounds on with and being the Sine, spectral, or operator metric. These lower-bounds allow us to select appropriate for which APPROXMEMBER() is -hard for every with . The following lemma lower-bounds for the three metrics we consider.
Lemma 7. We have
Proof. We prove the bound for each metric.
Sine metric. We prove that . Minimizing for an -qubit Clifford unitary is equivalent to maximizing . Let , with ranging over basis states in here and below. Then
This is the squared overlap of the 2n-qubit stabilizer states and , where the latter is a stabilizer state since is Clifford. By Theorem 1 of [26], which builds on [27], for -qubit stabilizer states and , we have that either
or for . As our states are over qubits, either or for . Maximizing yields . Plugging this in, we obtain .
Operator metric. We prove that . Equivalently, we show that there is no Clifford unitary s.t. .
Suppose for contradiction that such a exists. Let be s.t. , and let be a Pauli. Then
By the definition of the Clifford group, we see that is a Pauli. For any Paulis and , we have . From the above, we have , so in particular, , meaning . Since we made no assumptions on , this holds for all Paulis . For satisfying for all , we have for some , but then , yielding a contradiction.
Spectral metric. We prove that . Let with . If then . Otherwise , that is, , and since . Every entry of H, S, and CNOT lies in the ring . Hence every entry of the matrix of a circuit over these gates, and thus of , a block of that matrix, lies in this ring. As for some such , we have . The elements of modulus 1 in this ring are the 8th roots of unity [28, Appendix A], so is a non-zero multiple of and .
Combining Lemmas 6 and 7, we obtain hardness for every with .
Theorem 3. Consider any gate-set that exactly implements Clifford+T. Let be the Sine, spectral, or operator metric, and let be a set of unitaries with . Fix -time computable . Then APPROXMEMBER() is -hard.
Proof. Let and set . As , Lemma 7 gives . Each is a metric and , so by Lemma 6, every circuit over with is a yes-instance of PROMISEAPPROXID iff is a yes-instance of APPROXMEMBER(). Since , Theorem 2 shows that PROMISEAPPROXID is -hard, and hence so is APPROXMEMBER().
4.2 Subsets of the Generalized Permutation Matrices
We now consider sets of unitaries with . The strategy of Section 4.1 does not apply here. For example, consider the unitary diag, pa-rameterized by . Its distance to I tends to 0 as under each of the three metrics, hence , in contrast to Lemma 7 for . Instead, we construct circuits whose distance to is a closed form in and apply Lemma 3 directly. For the Sine metric and a constant , applies controlled on , and follows from a bound on over . For the spectral and operator metrics, and still agree on the circuits of Lemma 4 for which is sufficiently small, as for these circuits.
Sine metric. The following lemma expresses the distance of a -controlled circuit from any generalized permutation matrix as a function of .
Lemma 8. Let be a propositional formula over bits, let , let satisfy , and let be the -qubit unitary with when and otherwise. Then
Proof. We derive an expression for
We do so by giving an upper bound on and showing a specific that attains this bound. Since and is closed under taking adjoints, . We bound the latter and show that attains it.
Towards the upper bound, let , so that for a bijection on and a phase function . For s.t. , we have , so . For s.t. , we have
where satisfies , since every entry of HZ has modulus . Since is a bijection, at most one summand is non-zero, so . Then
For a specific witnessing this bound, take . Since the diagonal entries of HZ are both and diagonals multiply under tensor products, for every , so
The bound is therefore attained, and
□
Theorem 4. Consider any gate-set that exactly implements Clifford+T, and let be a set of unitaries with . Fix -time computable . Then APPROXMEMBER(, Sine, , ) is -hard.
Proof. Let be given. Since as , fix with . Given over bits, construct over qubits as follows: apply to write into a clean ancilla qubit; apply a and then an H gate to each of the target qubits, each controlled on the ancilla; and uncompute the ancilla with a second . All ancillas are restored, and a controlled-H gate is exactly implementable over Clifford+T, so is a polynomially sized Clifford+T circuit and the mapping is -time.
Set and . Then , , and is strictly increasing and continuous on , since strictly decreases from 1 to on . Since , Lemma 8 applies, so for every .
As is -time computable, Lemma 3 yields -hardness of PROMISEAPPROXMEMBER(, Sine, , , ), and since PROMISEAPPROXMEMBER(, Sine, , , ) and APPROXMEMBER(, Sine, , ) agree on all circuits satisfying the promise of the former, we have -hardness of APPROXMEMBER(, Sine, , ). As was chosen with for any , every -time computable is covered.
Spectral and operator metrics. The following lemma shows that, for the circuit of Lemma 4, the closest element of is I when is sufficiently small.
Lemma 9. Let be a propositional formula over bits, and let be the circuit constructed from in Lemma 4. If , then
Proof. As , we have , so it suffices to prove .
Recall that , so and the assumption is equivalent to . As the right-hand side is at least and , this gives , so and , and squaring gives . If , then by Lemma 4, so both sides are 0. Hence we assume that , so that both and are satisfiable and and are well-defined. By Lemma 4,
We implement : by the ancilla-restoring Clifford+T circuit constructed for the Sine metric in Section 3.2.
We expand and . By Lemma 4, the eigenangles of are , so from the definition of the spectral metric, we see that . Let range over unit vectors. We will use the general fact that . Then we have
Hence we need to prove
It suffices to show that for any , there is a choice of s.t. , that is, . We do so by case distinction on , where .
If is not the identity, then pick where is s.t. . Then
We upper-bound for all . As , the triangle inequality gives
For all and , we have . Since and , we have
As and , we have , so and . Substituting, we obtain
where the final step uses and . Hence .
If is the identity, we pick as one of the two eigenstates of , which satisfy . Note that, as is diagonal, has support exactly on , so in particular, . Let
, and note that , as . Then
If , then pick , and otherwise pick . This ensures that the second term equals , and since , , and , we have
Hence in both cases, for some choice of , as desired.
Hardness of APPROXMEMBER then follows from the fact that it coincides with APPROXID on the circuits of Lemma 4 for which satisfies the condition of Lemma 9.
Theorem 5. Consider any gate-set that exactly implements Clifford+T, and let be a set of unitaries with . Fix -time computable . Then APPROXMEMBER() and APPROXMEMBER() are -hard.
Proof. Let be the spectral or the operator metric, and let be given.
Fix with . Set and . As , we have . Then , , and is strictly increasing and continuous on . Since as , fix with .
Given over bits, let , where ranges over bits and over bits, so that . Construct as in Lemma 4 from over bits. Since is constant, is a polynomially sized Clifford+T circuit, and the mapping is -time. To apply Lemma 3, it suffices to show that for .
Towards this, note that the bound on in Lemma 9 is increasing in the number of bits, so for , we have
Hence Lemma 9 applies on , where it yields . By Lemma 4, the eigenangles of are , so , using , the definition of , and standard trigonometry. We now prove for each of the two metrics.
Spectral metric. As , we have
so .
Operator metric. For every and , we have , so
and as , we see that . Conversely, we have , so as ,
Hence .
As is P-time computable, Lemma 3 yields -hardness of PROMISEAPPROXMEMBER(), and since PROMISEAPPROXMEMBER() and APPROXMEMBER() agree on all circuits satisfying the promise of the former, we have -hardness of APPROXMEMBER(). As was chosen with for any , every P-time computable is covered.
4.3 Proof of the Main Results
With the individual results in hand, we are ready to assemble Theorem 1 and Corollary 1.
Proof of Theorem 1. Let , , and a P-time computable be as in some cell of Table 1. There are three cases.
. The cell requires . Pick with , which is possible since . By Theorem 2, PROMISEAPPROXID is -hard. As PROMISEAPPROXID and APPROXID agree on all circuits satisfying the promise of the former, -hardness follows.
. The cell requires , and APPROXMEMBER() is -hard for every such by Theorem 3.
. For the Sine metric, the cell requires , and APPROXMEMBER(, Sine, ) is -hard for every such by Theorem 4. For the spectral or operator metric, the cell requires , and APPROXMEMBER() is -hard for every such by Theorem 5.
For the boldface cells, whose range is , no larger can be added: every makes APPROXMEMBER() accept all instances.
Proof of Corollary 1. Let be a cost function with free set , and let and be as in the cell of Table 1 for . We give a Karp reduction from APPROXMEMBER() to APPROXOPT. Then by Theorem 1, APPROXMEMBER() is -hard, so the result follows.
Given a yes/no instance of APPROXMEMBER(), map to the instance of APPROXOPT. Then is a yes-instance iff some circuit over with satisfies , which is exactly the acceptance condition of APPROXMEMBER().
Remark 2. Let , , and be as in Corollary 1, and let be any factor, possibly depending on the input. Deciding, given and , whether there is a circuit over s.t. and is -hard, since the reduction in the proof of Corollary 1 outputs only instances with , on which .
5 Conclusion and Open Problems
We have shown that approximate quantum circuit optimization is -hard for every combination of cost function, metric, and tolerance in Table 1, and that for total cost functions under any of the Sine, spectral, and operator metrics, and for superposition cost functions under the Sine metric, this covers the entire non-trivial range of . The results are robust in three directions: they transfer to any distance measure expressible as a strictly increasing function of one of these three, they survive the relaxation from exact minimization to approximation within any factor, and, for trace-based distances and , hardness holds already for classical-reversible gate-sets. In particular, within the ranges of Table 1, relaxing the tolerance does not help, and for the boldface cells no non-trivial tolerance does.
For APPROXMEMBER(), our results cover only , and for APPROXMEMBER() with and the spectral or operator metric, only . In both cases, the problem becomes trivial only once is large enough that any unitary is -close to an element of . We leave open the complexity for in the first case and for in the second, up to this threshold. Matching upper bounds are likewise open, with one exception for which our lower bound is tight. For algebraic that exactly implements Clifford+T (e.g., Clifford+T itself), APPROXID(Sine, ) is -complete, as is the acceptance probability of a quantum circuit and with algebraic amplitudes equals [29].
Acknowledgements
Funding. This work was partially supported by a research grant (VIL42117) from VIL-LUM FONDEN.
Disclosure of AI use. An initial draft of the proofs of Lemma 9 and Theorem 5 were generated using Claude Opus 5.5 and subsequently checked line by line and rewritten by the authors. The authors are fully responsible for the whole of this paper.
References
[1] Christopher M. Dawson and Michael A. Nielsen. “The Solovay-Kitaev algorithm”. Quantum Information & Computation 6, 81–95 (2006).
[2] Vadym Kliuchnikov, Alex Bocharov, and Krysta M. Svore. “Asymptotically Optimal Topological Quantum Compiling”. Physical Review Letters 112 (2014).
[3] Vadym Kliuchnikov, Dmitri Maslov, and Michele Mosca. “Practical Approximation of Single-Qubit Unitaries by Single-Qubit Quantum Clifford and T Circuits”. IEEE Transactions on Computers 65, 161–172 (2016).
[4] Sumeet Khatri, Ryan LaRose, Alexander Poremba, Lukasz Cincio, Andrew T Sornborger, and Patrick J Coles. "Quantum-assisted quantum compiling". Quantum 3, 140 (2019).
[5] Priyanka Mukhopadhyay. "Composability of global phase invariant distance and its application to approximation error management". Journal of Physics Communications 5, 115017 (2021).
[6] Emil Génetay Johansen and Tapio Simula. "Fibonacci Anyons Versus Majorana Fermions: A Monte Carlo Approach to the Compilation of Braid Circuits in Anyon Models". PRX Quantum 2 (2021).
[7] Vlad Gheorghiu, Michele Mosca, and Priyanka Mukhopadhyay. "T-count and T-depth of any multi-qubit unitary". npj Quantum Information 8, 141 (2022).
[8] Peter Selinger. “Efficient Clifford+T approximation of single-qubit operators”. Quantum Info. Comput. 15, 159–180 (2015).
[9] Neil J. Ross and Peter Selinger. “Optimal ancilla-free Clifford+T approximation of z-rotations”. Quantum Info. Comput. 16, 901–953 (2016).
[10] Adriano Barenco, Artur Ekert, Kalle-Antti Suominen, and Päivi Törmä. “Approximate quantum Fourier transform and decoherence”. Physical Review A 54, 139–146 (1996).
[11] Pau Escofet, Santiago Rodrigo, Rohit Sarma Sarkar, Carmen G. Almudéver, Eduard Alarcón, and Sergi Abadal. “Quantum Circuit Pruning: Improving Fidelity via Compilation-Aware Circuit Approximation”. In 2026 IEEE International Symposium on Circuits and Systems (ISCAS). Page 1521–1525. IEEE (2026).
[12] Christopher G. Yale, Rich Rines, Victory Omole, Bharath Thotakura, Ashlyn D. Burch, Matthew N.H. Chow, Megan Ivory, Daniel Lobser, Brian K. McFarland, Melissa C. Revelle, Susan M. Clark, and Pranav Gokhale. “Noise-aware circuit compilations for a continuously parameterized two-qubit gateset”. Physical Review Applied 24 (2025).
[13] Dominik Janzing, Pawel Wocjan, and Thomas Beth. “"Non-identity-check" is QMA-complete”. International Journal of Quantum Information 3, 463–473 (2005).
[14] Yu Tanaka. “Exact non-identity check is NQP-complete”. International Journal of Quantum Information 8, 807–819 (2010).
[15] Adam Husted Kjelström, Andreas Pavlogiannis, and Jaco van de Pol. “Exact Quantum Circuit Optimization is co-NQP-hard” (2025). arXiv:2510.16420.
[16] John van de Wetering and Matt Amy. “Optimising quantum circuits is generally hard” (2023). url: https://doi.org/10.48550/arXiv.2310.05958.
[17] Zhihao Ma, Fu-Lin Zhang, and Jing-Ling Chen. “Fidelity induced distance measures for quantum states”. Physics Letters A 373, 3407–3409 (2009).
[18] Michael A Nielsen. “A simple formula for the average gate fidelity of a quantum dynamical operation”. Physics Letters A 303, 249–252 (2002).
[19] Michael A. Nielsen and Isaac L. Chuang. “Quantum Computation and Quantum Information: 10th Anniversary Edition”. Cambridge University Press. (2011).
[20] John T. Gill. "Computational complexity of probabilistic Turing machines". In Proceedings of the Sixth Annual ACM Symposium on Theory of Computing. Page 91–95. STOC '74New York, NY, USA (1974). Association for Computing Machinery.
[21] Richard P. Brent. "Fast Multiple-Precision Evaluation of Elementary Functions". Journal of the ACM 23, 242–251 (1976).
[22] Ker-I Ko. "Complexity Theory of Real Functions". Progress in Theoretical Computer Science. Birkhäuser. Boston (1991).
[23] Janos Simon. "On Some Central Problems in Computational Complexity". PhD thesis. Cornell University. (1975).
[24] Seinosuke Toda. "PP is as Hard as the Polynomial-Time Hierarchy". SIAM Journal on Computing 20, 865–877 (1991).
[25] Lov K. Grover. "A fast quantum mechanical algorithm for database search". In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing. Page 212–219. STOC '96 New York, NY, USA (1996). Association for Computing Machinery.
[26] Rafael Wagner, Filipa CR Peres, Emmanuel Zambrini Cruzeiro, and Ernesto F Galvão. "Unitary-invariant method for witnessing nonstabilizerness in quantum processors". Journal of Physics A: Mathematical and Theoretical 58, 285302 (2025).
[27] Héctor J. García, Igor L. Markov, and Andrew W. Cross. "On the geometry of stabilizer states". Quantum Info. Comput. 14, 683–720 (2014).
[28] Vadym Kliuchnikov, Dmitri Maslov, and Michele Mosca. "Fast and Efficient Exact Synthesis of Single-Qubit Unitaries Generated by Clifford and T Gates". Quantum Information & Computation 13, 607–630 (2013). arXiv:1206.5236.
[29] Tomoyuki Yamakami. "Analysis of Quantum Functions". International Journal of Foundations of Computer Science 14, 815–852 (2003). arXiv:quant-ph/9909012.
Appendix
Proof of Lemma 2. Our proof is by Karp reduction from ATMOSTSAT( ), where we choose s.t. . Let a yes/no instance over bits be given. We define a propositional formula s.t. , while . We do so by taking the conjunction of with a formula over fresh bits that is satisfied by a fraction of its assignments, where , which gives .
Fix a natural number with , which is possible since , and put
Then and , so and . Since is -time computable and is a fixed dyadic rational, so is , and hence is -hard (folklore). Let range over bits, read as an integer in , and define
so that . Let range over the bits of , and define
as the output of the reduction.
We argue that the reduction takes polynomial time. The constants and depend only on and , so is a fixed formula over bits and can be written over , and with constant size (e.g., in disjunctive normal form). Hence is computed from in linear time.
For correctness, note that ranges over bits and is satisfied by exactly the pairs with and , so
Hence, as ,
so is a yes-instance of PROMISEATMOSTSAT() iff is a yes-instance of ATMOSTSAT(). The promise holds since , where we use .