Identification of a reversible quantum gate: assessing the resources

We assess the resources needed to identify a reversible quantum gate among a finite set of alternatives, including in our analysis both deterministic and probabilistic strategies. Among the probabilistic strategies we consider unambiguous gate discrimination, where errors are not tolerated but inconclusive outcomes are allowed, and we prove that parallel strategies are sufficient to unambiguously identify the unknown gate with minimum number of queries. This result is used to provide upper and lower bounds on the query complexity and on the minimum ancilla dimension. In addition, we introduce the notion of generalized t-designs, which includes unitary t-designs and group representations as special cases. For gates forming a generalized t-design we give an explicit expression for the maximum probability of correct gate identification and we prove that there is no gap between the performances of deterministic strategies an those of probabilistic strategies. Hence, evaluating of the query complexity of perfect deterministic discrimination is reduced to the easier problem of evaluating the query complexity of unambiguous discrimination. Finally, we consider discrimination strategies where the use of ancillas is forbidden, providing upper bounds on the number of additional queries needed to make up for the lack of entanglement with the ancillas.

discrimination. Finally, we consider discrimination strategies where the use of ancillas is forbidden, providing upper bounds on the number of additional queries needed to make up for the lack of entanglement with the ancillas.
in the alignment of reference frames via quantum communication [30][31][32][33][34], in the design of quantum communication protocols that work in the absence of shared reference frames [36][37][38] and quantum machines that learn to execute a desired operation from a training set of examples [39]. For all these applications, the crucial step is to find efficient strategies that discriminate among a set of unknown gates with minimum expenditure of resources. Typical resources considered are: the number of black box queries needed to identify the unknown gate, the number of time steps and the size of the auxiliary systems (ancillas) employed in the discrimination strategy, and the total number of elementary gates needed to implement the discrimination strategy.
A striking feature of gate discrimination is that any two distinct unitaries can be perfectly distinguished from one another in a finite number of queries, either using entanglement [1,2] or using a sequential strategy where different queries are called at different time steps [5]. This feature implies that an unknown gate in a finite set U := (U x ) x∈X can be perfectly identified in a finite number of queries, e.g. by running |U| − 1 pairwise tests each of which eliminates one wrong alternative [1]. However, in terms of efficiency the method of pairwise elimination leaves large room for improvement: for example, when the unitaries are mutually orthogonal, one can identify the black box in a single query using an ancilla, following the lines of the dense coding protocol [40]. In general, finding the minimum number of queries needed for perfect discrimination is a hard problem: solving it would automatically give a general solution for the query complexity of oracle identification. One way to approach the problem is to consider the less demanding task of unambiguous gate discrimination [3,4,6,7,41], where the unknown gate is identified without errors but one allows for an inconclusive result. General conditions for unambiguous discrimination were given in [4,7,41] under the assumption that the available queries are used in parallel. However, the case of general strategies and the quantification of the resources required for unambiguous gate discrimination have remained largely unaddressed up to now.
In this paper we provide a systematic study of the resources needed to identify an unknown gate, focusing in particular on the following resources: number of queries, size of the ancillary systems and number of time steps in the discrimination strategy. We start from the observation that parallel strategies are sufficient for unambiguous gate discrimination: if unambiguous discrimination can be achieved in N queries, then it can be achieved by applying the N queries in parallel (in general, using ancillas). Based on the reductions to parallel strategies, we provide lower and upper bounds on the query complexity of unambiguous discrimination and on the size of the ancilla systems needed by the discrimination strategy. The bounds are general and can often be improved in specific cases. Nevertheless, they suffice to show that unambiguous discrimination of the gates U is always possible with no more than |U| − 1 queries. Since |U| − 1 is the minimum number of queries that would be needed by the method of pairwise elimination, our result shows that a joint discrimination strategy typically offers an advantage.
After having discussed the resources for unambiguous discrimination, we ask under which conditions one can achieve the stronger task of perfect discrimination, where inconclusive outcomes are not allowed. This is important because in practice the usefulness of unambiguous discrimination can be undermined by the fact that the inconclusive outcome occurs too frequently. To this purpose, we introduce the notion of generalized t-designs, which includes as special cases the unitary t-designs of [43][44][45][46] and all the examples where the unknown gates form a group [47][48][49][50]. Relative to gate identification, generalized t-designs have three important features: (i) there is no difference between the performances of deterministic and probabilistic strategies allowing for inconclusive outcomes; (ii) there is no difference between the performances of strategies using the queries in parallel and general strategies using the queries in a sequence of time steps; and (iii) there is a simple analytic formula for the maximum probability of correct gate identification with given number of queries.
The feature (i) implies that, if unambiguous discrimination is possible in N queries, then also perfect deterministic discrimination must be possible in N queries. This result reduces the query complexity of perfect discrimination to the query complexity of unambiguous discrimination, which is much simpler to evaluate. The reduction to unambiguous discrimination has a fairly large range of applications, especially in the case when the set of gates forms a group. Particular examples are the group of all Boolean oracles [10], the groups of linear [16] and quadratic [42] Boolean functions, the group of permutations [30] and the group of all oracles corresponding to functions from a given finite set to another [7]. The feature (ii) implies that the number of time steps needed to identify a gate picked from a generalized t-design is minimum: applying the queries in parallel one can reduce the discrimination strategy to three steps: the preparation of an entangled state; the parallel application of the unitary gates; and the execution of a suitable measurement. Note that the number of time steps in a discrimination strategy should not be confused with the number of elementary gates needed to implement the strategy: preparing the joint state and performing the joint measurement may require a large number of elementary gates. Nevertheless, the fact that in principle the number of time steps can be reduced to the minimum is an interesting and non-trivial property. In general, such a property does not hold when the unitaries do not form a generalized t-design: for example, using the available queries in parallel would spoil the quadratic speed-up in Grover's algorithm [51,52]. Finally, we address the quantification of resources for strategies where the use of ancillary systems is forbidden. This analysis is important for applications to reference frame alignment [30][31][32][33][34][35] and quantum communication in the absence of shared reference frames [36][37][38]. Our contribution to these research topics is (a) to show that every gate discrimination using ancillas can be converted into a strategy using a number of extra queries to the unknown gate and (b) to provide bounds on the number of extra queries. When the dimension of the ancilla used in the original strategy is large, we show that the number of extra queries scales logarithmically with the ancilla dimension: a strategy using N A 1 ancillary qubits can be replaced by a strategy using O(N A ) extra queries. More specific bounds can be obtained when the unitaries form a generalized t-design or a group. In all these cases, we show that, again, there is no difference between the performances of deterministic strategies and those of probabilistic strategies allowing for inconclusive outcomes.
The paper is structured as follows. In section 2 we give a synopsis of the main results. The basic facts about general gate discrimination strategies, along with the observation that unambiguous discrimination can be parallelized, are provided in section 3, and exploited in section 4 to derive upper and lower bounds on the query complexity of unambiguous discrimination. In section 5 we introduce the notion of generalized t-designs, giving an explicit formula for the maximum probability of correct gate identification and showing that parallel deterministic strategies achieve the same performances of arbitrary probabilistic strategies. Bounds on the size of the ancilla needed for unambiguous/perfect discrimination with minimum queries are provided in section 6, while section 7 considers discrimination schemes where the ancilla is not allowed, providing estimates for the query overhead. The conclusions are drawn in section 8. The appendix contains all the technical proofs of the results presented in the paper.

Main results
We provide here a synopsis of the main results of the paper. A more extended discussion, including the precise definition of the framework, additional results and applications will be the object of the following sections.

Unambiguous gate discrimination: parallelizability and bounds on the query complexity
We start by showing that unambiguous gate discrimination can be parallelized: if the gates in a given set can be distinguished unambiguously with N queries, then they can be distinguished unambiguously by applying the queries in parallel, possibly using ancillas. This fact is extremely useful to provide bounds of the query complexity of unambiguous discrimination. Denoting by N min the minimum number of queries needed to unambiguously identify a unitary gate in the set U, we prove the bounds and where d is the dimension of the Hilbert space where the gates act and dim(U) is the number of linearly independent unitaries in U. Both bounds are tight, in the sense that for every size |U| one can find a set of gates achieving the equality. The upper bound of equation (2) proves that a joint discrimination strategy typically needs less queries than a strategy based on pairwise eliminations. The bound of equation (1) contains implicitly a lower bound on N min , which can be estimated as When d is fixed and |U| is large, this estimate gives the actual scaling of the tight bound of equation (1). In addition to the above bounds, we also provide a bound in term of the maximum fidelity between pairs of gates. The bound is obtained from a simple observation about unambiguous state discrimination of pure states, which to the best of our knowledge did not appear in the previous literature on the subject: the states in a generic set {|ψ x } x∈X can be unambiguously discriminated using N identical copies whenever N satisfies In the case of gate discrimination, this result can be applied to the set of bipartite states | x := (U x ⊗ I )| , where | is a bipartite input state. Optimizing over | , we then get the fidelity bound N min log(|U| − 1) where F U is the minimax fidelity F U := min | ∈H⊗H,|| ||=1 max x =y |(U † x U y ⊗ I )| 2 . The fidelity bound is important because it connects a measure of pairwise distinguishability with the performances of general joint strategies for unambiguous discrimination. Moreover, in several examples it gives a better estimate than the linear bound of equation (2).

Generalized t-designs: maximum error probability and optimality of parallel deterministic strategies
We introduce the notion of generalized t-designs, which includes as special cases the unitary t-designs of [43][44][45][46] and all the examples where the unknown gates form a group [47][48][49][50]. When the unitary gates form a generalized t-design, we consider the problem of gate discrimination with minimum error probability, or, equivalently, with maximum probability of correct gate identification. Optimizing over all possible discrimination strategies, we show that the maximum probability of correct identification with N t queries (conditional to the occurrence of conclusive outcomes) is given by Moreover, we show that this optimum value can be achieved by a deterministic strategy that uses the N queries in parallel. As a consequence, this shows that (i) there is no difference between the performances of deterministic and probabilistic discrimination strategies, and (ii) there is no difference between the performances of parallel strategies and those of strategies using a sequence of time steps. In particular, if a set of gates U is a generalized |U|-design, then there is no difference between perfect and unambiguous discrimination: whenever unambiguous discrimination is possible, the probability of the inconclusive result can be reduced to zero. This result is important from the practical point of view, because unambiguous discrimination by itself may not be a useful primitive if the probability of the inconclusive result is too high. Moreover, thanks to the reduction to deterministic strategies, equations (1), (2) and (5) become bounds on the query complexity of perfect deterministic gate discrimination.

Minimum ancilla dimension
Another important resource, in addition to the number of queries, is the dimension of the ancilla needed to achieve gate discrimination [48,53]. The ancilla dimension quantifies the extra memory space used for the discrimination task. We show that, when N queries to the black boxes are used, the minimum ancilla dimension can be upper bounded as Since the binomial can be upper bounded as (N + 1) d−1 , our result implies that the size of the ancilla scales at most polynomially in the number of queries. In other words, this means that the number of ancillary qubits needed for gate discrimination in N queries is at most logarithmic in N . The bound is independent of the gate set U. When more information on the gates is available, further estimates can be provided. For example, if the set U is contained in a representation of a finite group G, the dimension of the ancilla can be upper bounded as independently of the number of queries and of the dimension of the Hilbert space. This bound provides a fast estimate of the ancilla dimension, and, in several situations, the estimate is actually accurate. For example, in the case of the Pauli matrices {I, X, Y, Z } the bound gives correctly d min A,N 2, meaning that unambiguous discrimination is possible using a single ancilla qubit. This is indeed what is achieved by the dense coding protocol [40]. An even stronger result holds if the unitaries in U commute: in this case, no ancilla at all is needed, a result that was already known for discrimination strategies using parallel queries [7,48].

Ancilla-free gate discrimination
For applications in reference frame alignment [30][31][32][33][34][35] and quantum communication in the absence of shared reference frames [36][37][38], it is useful to consider discrimination strategies that do not use ancillas, here referred to as ancilla-free. In this case, one can make up for the lack of ancillas using a number of additional queries to the black box, using the invariant encoding of [54]. For a strategy using a large number of ancilla qubits N A , we show that the scaling of the minimum overhead N min is upper bounded as In other words, the N A ancilla qubits can be replaced with (order of) N A extra queries to the black box, showing that the use of extra queries is a more powerful resource than the use of ancillas. In addition, we provide the ancilla-free version of the upper bounds of equations (2) and (5), showing that, even if the use of ancillas is prohibited, a joint discrimination strategy will still outperform the method of pairwise elimination. The conditions for unambiguous discrimination are sufficient to guarantee perfect deterministic discrimination when the set U is a generalized t-design. Indeed, also in the ancillafree case we show that for generalized t-designs there is no difference between probabilistic and deterministic discrimination strategies. Finally, when the gates in U form a representation of a group G, one can prove more specific results [55]: (i) A perfect discrimination strategy using d A -dimensional ancilla can be replaced by a perfect ancilla-free discrimination strategy using extra queries. This result is consistent with the scaling with the number of qubits promised by equation (9): for a strategy using a large number of ancillary qubits N A log √ |G|, the number of extra queries to the black box scales as O(N A ).
(ii) The query complexity of ancilla-free discrimination can be upper bounded with an expression involving the maximum entanglement fidelity between pairs of different gates (cf section 7.2 for the actual expression). This is quite surprising because the operational interpretation of the entanglement fidelity is the fidelity between the output states obtained by applying the unitaries on one side of the maximally entangled state, a strategy that is forbidden in ancilla-free gate discrimination. When the entanglement fidelity is zero, we obtain that the minimum number of queries needed for ancilla-free discrimination is given by In principle, this is the most favourable scaling possible: indeed, with less than log d |G| queries it would be impossible to pack |G| orthogonal vectors in the joint Hilbert space of the systems used by the discrimination strategy.
Equations (10) and (11) allow one to quantify the resources needed for protocols of quantum communication [36] and decoherence-free encoding [38] in the absence of shared reference frames. Indeed, in these cases N min is equal to the number of physical systems needed to construct the 'token state' used in the communication protocol [36,38]. In the case of the alignment protocols [30][31][32][33][34][35], N AF min is the minimum number of quantum systems that have to be exchanged in order to establish a reference frame.

Gate discrimination: framework and basic definitions
We consider the problem of identifying an unknown unitary gate under the promise that the gate belongs to a finite set U. For simplicity, we assume that the gates act on a system with Hilbert space H of finite dimension d < ∞. Moreover, all throughout the paper we assume that every two unitaries U x , U y ∈ U are statistically distinguishable, that is, there exists at least one input state, with density matrix ρ, such that If this were not the case, there would be no point in making an experiment to distinguish between U x and U y , because these two gates would give rise to the same outcome probabilities for every possible experiment, and, therefore, there would be no operational way to tell them apart.

Discrimination strategies
In order to identify the action of the unknown gate, one is allowed to make queries to the corresponding black box and to use them in an arbitrary quantum circuit. As long as there is no constraint on the use of ancillas, one can focus without loss of generality on circuits consisting of pure states and unitary gates, of the form where (i) | ∈ H ⊗ H A is the joint state of the input of U x and of an ancilla with Hilbert space H A , (ii) U t is a unitary gate representing a joint evolution of the system and the ancilla at the time step t ∈ {1, . . . , N } (the unitary U N is added just for convenience of notation).
Once the input state | and the unitaries (U t ) N t=1 have been chosen, identifying the unitary U x is equivalent to identifying the output state To this purpose, one has to perform a suitable quantum measurement, described by a joint positive operator valued measure (POVM) (P y ) y∈Y . Here we allow for measurements with a set of outcomes Y = X ∪ {?}, including an inconclusive outcome y =?, which corresponds to the case when the experimenter abstains from producing a guess [3]. Among all possible strategies, the deterministic ones are those for which the inconclusive outcome never occurs, namely P ? = 0.

Optimal, error-free, unambiguous and perfect discrimination
As a figure of merit for gate discrimination, we choose the probability that the unknown gate is identified correctly, provided that the measurement does not output the inconclusive outcome y =?. This probability is given by where p x is the prior probability of U x and p N (y|x) = x |P y | x is the conditional probability of the measurement outcome y given that the gate is U x and that N queries are used. The optimal discrimination strategy is the one that maximizes the success probability p N . We denote the corresponding probability by p max N . Note that, in general, a deterministic strategy may not be able to reach the value p max N : in order to achieve the optimal performances one may be forced to have an inconclusive outcome. For this reason, the probability p max N is an upper bound on the maximum probability of success over deterministic strategies, which is the quantity normally considered in minimum-error discrimination.
In this paper we will be particularly interested in discrimination strategies that are errorfree, in the sense that they never misidentify the gate ( p N = 1). Note that the error-free condition p N = 1 is much weaker than it may seem at first sight: this can be seen in the example of the qubit gates where K is an arbitrary integer number. In this case, one can achieve success probability p N = 1 by applying the unknown unitary on one side of the maximally entangled state | + = (|0 |0 + |1 |1 )/ √ 2 and by measuring the output state with the POVM given by Clearly, when the inconclusive result does not occur, the unknown gate has been identified with certainty: indeed, the outcome 0 can only occur when the gate is U 0 .
In some situations, having a discrimination strategy that detects only one gate and aborts otherwise may not be useful. Instead, one may require that every gate in the set U have a nonzero probability of being identified. We say that a discrimination strategy achieves unambiguous discrimination if it is error-free ( p N = 1) and, in addition, p(x|x) > 0 for every x. For example, the two unitaries U 0 = I and U 1 = exp[iθ Z ] can be distinguished unambiguously by preparing the input state |+ = (|0 + |1 )/ √ 2 and by measuring the POVM defined by This strategy is error-free p N = 1 and both gates have the chance of being detected: in this particular case, one has p(0|0) = p(1|1) = [sin(θ/2)] 2 /[1 + cos(θ/2)].
Note that the definition of unambiguous discrimination does not include any requirement on the probability of the inconclusive outcome, which in principle can be arbitrarily close to 1.
In some situations, this feature can undermine the usefulness of the discrimination scheme. On the opposite end, one can restrict the attention to discrimination strategies such that the probability of the inconclusive outcome is equal to 0. We refer to these strategies as perfect discrimination strategies.

Basic facts about error-free and unambiguous discrimination
Error-free and unambiguous discrimination can be nicely characterized in terms of linear independence: Parallel strategies are a special case of the strategies of equation (13), where one has the freedom to apply the N queries at different time steps in a quantum circuit. The parallel strategies of equation (17) can be recovered as a special case from the general strategies of equation (13) by setting the gates (U t ) N t=1 to be suitable swap gates, as in the following example: Theorem 1 has an important consequence: it implies that error-free discrimination and unambiguous discrimination can be parallelized:

Corollary 1 (Parallelization of error-free and unambiguous discrimination).
If the gates U can be distinguished unambiguously (respectively, in a error-free fashion) with N queries, then they can be distinguished unambiguously (respectively, in a error-free fashion) using the N queries in parallel.
In other words, the identification of the gate can be achieved in the shortest possible number of time steps: in the problem of error-free and unambiguous discrimination the time resource can be completely replaced by spatial resources. This fact is also useful as a technical tool: it implies that the query complexity of error-free/unambiguous discrimination-defined as minimum number N min needed to unambiguously identify a gate in U-does not change if one restricts to parallel strategies. Note, however, that general sequential strategies can help in reducing the probability of the inconclusive result. This fact is well illustrated by the example of Grover's algorithm.

Example 1 (Discrimination of Grover's oracles).
Grover's algorithm is designed to identify a unitary gate in the set U containing the gates U x = I − 2|x x|, x ∈ X = {1, . . . , d}. Clearly, the gates U are linearly independent for every d > 2 and therefore they can be unambiguously discriminated in a single query, as originally observed by Chefles et al in [7]. However, the probability of unambiguous discrimination in a single query must be necessarily low. One way to see it is the following: as showed by Brassard et al [51] and Zalka [52], Grover's algorithm cannot be efficiently parallelized: there is no deterministic parallel strategy that can achieve in N queries the same probability of correct gate identification as in Grover's algorithm. Now, if the probability of unambiguous discrimination were sufficiently large, one could run different rounds of unambiguous discrimination, and use this fact to construct an efficient parallel strategy. In the case of search in a large database (d 1), denoting by N G is the number of queries needed by Grover's algorithm to achieve maximum probability of correct gate identification, one can show that the probability of unambiguous discrimination in one query must be upper bounded by O(logN G /N G ).

General bounds on the query complexity of unambiguous gate discrimination
The possibility of parallelizing unambiguous gate discrimination, established by theorem 1, leads immediately to general bounds on the query complexity. These bounds do not assume any structure of the set of unitaries U and can typically be improved when more information about U is available.

Lower bound
Here we give a lower bound to the number of queries that are necessary for unambiguous gate identification.

Proposition 1 (Dimensional bound).
If the gates in U can be unambiguously discriminated using N queries, then If we do not impose any structure on the set of unitaries U, then the bound of equation (18) is the best we can hope for. Indeed, for any fixed Hilbert space dimension d and for every size |U| we can always find a set of unitaries U such that the minimum number of queries needed to unambiguously identify a gate in U is exactly the minimum N compatible with equation (18) (cf the proof in the appendix).
Equation (18) can be used to provide an easy lower bound on the query complexity: combining it with the inequality we obtain the bound N > |U| 1 d 2 −1 − 1, which is a necessary condition for unambiguous discrimination with N queries. The bound is not tight, but provides the right scaling with |U| in the regime when d is fixed and N is large compared to d 2 . Indeed, in this case one has which means that the scaling of the tight bound associated to equation (18) is

Upper bounds
An upper bound on the query complexity can be obtained by observing that the number of linearly independent unitaries in U N grows at least linearly with N , a fact that can be proved using an earlier result by Chefles [57].

Proposition 2 (Linear bound). The query complexity of unambiguous discrimination of the gates in U is upper bounded by
In general, the bound of equation (20) can be achieved: for every fixed Hilbert space dimension d and for every fixed cardinality |U| we can find a set of unitaries such that N min = |U| − dim(U) + 1. This can be seen in the following. Another example where the bound of equation (20) gives the exact value is the identification of a 'shift-and-multiply' gate.

Example 3 (Unambiguous discrimination of shift-and-multiply gates). Consider the problem of identifying a shift-and-multiply gate
where S = d k=1 |(k + 1) mod d k| and M = d k=1 e (2π ik)/d |k k|. In this case, the unitaries (U pq ) ( p,q)∈Z d ×Z d are linearly independent, and therefore the bound gives N min = 1. Note that, in fact, the unitaries are orthogonal in the Hilbert-Schmidt product, and, therefore, an unknown unitary U pq can be identified perfectly and deterministically, as in the dense coding protocol [40].
Proposition 2 provides an estimate of N min that is always better than the number of pairwise tests |U| − 1 that would be needed to identify a gate in U with the method of pairwise eliminations outlined in [1,2]. Note however that equation (20) only ensures unambiguous discrimination, while the pairwise elimination method ensures perfect discrimination. In the next section we will see that the distinction between unambiguous and perfect discrimination disappears when the gates in U form a group representation, or, more generally, a generalized t-design.
Before adding more structure on the set U, we give here a second upper bound that often yields a better estimate than proposition 2. To state the bound we introduce the minimax fidelity of the unitaries in U, defined as The minimax fidelity quantifies the pairwise distinguishability of the gates in U when singleshot ancilla-assisted strategies are used. Clearly, if F U = 0, the unitaries can be perfectly distinguished in one shot using a suitable input state. Note also that, under the standing assumption of this paper, F U must be strictly smaller than 1: indeed, the distinguishability condition of equation (12) implies that for every two distinct unitaries U x and U y there exists at least an input state |ψ such that ψ|U † x U y |ψ 2 < 1. In terms of the minimax fidelity, we have the following.

Proposition 3 (Fidelity bound). The query complexity of unambiguous discrimination of the gates in U is upper bounded as
The proof of the bound is based on a simple observation about unambiguous state discrimination, which is interesting per se: Lemma 1. Let (|ψ x ) x∈X ∈ H be a set of pure states and let F := max x =y | ψ x |ψ y | 2 be the maximum fidelity between two distinct states in the set. If F N /2 < 1/(|X| − 1), then the states (|ψ x ⊗N ) x∈X are linearly independent, and, therefore, unambiguously distinguishable.
For qubits, this simple observation gives exactly the minimum number of copies needed for unambiguous discrimination of the states in a symmetric informationally-complete (SIC) POVM [58,59]. Recall that a SIC-POVM in dimension d is a set of d 2 unit vectors with the property that the overlap between any two distinct vectors is the same: In general, for d 2 pure states one can easily see from dimensional arguments that unambiguous discrimination requires at least three copies (cf the lower bound in [57]). On the other hand, lemma 1 shows that for qubits N = 3 copies are sufficient, thus implying that N = 3 is actually the minimum number of copies needed for unambiguous discrimination of a SIC-POVM. For general d-dimensional systems, lemma 1 gives the upper bound N 4, almost matching the dimensional lower bound [60], and thus showing that the number of copies does not scale up with the dimension of the system. The exact value of the minimum number of copies is equal to N min = 3 for all the known examples of SIC-POVMs, except for one example of SIC-POVM in dimension d = 3, which actually requires N min = 4 copies [60].
Let us now comment on the tightness of the fidelity bound for gate discrimination. The bound gives good estimates when F U is close to zero (in particular, in the extreme case where F U = 0 it predicts correctly N min = 1). However, it tends to overestimate N min when F U approaches 1. To understand this fact, note that for F 1 − , the estimate of N min becomes having chosen the logarithm in base e. Now, two unitaries can have fidelity arbitrarily close to 1 and still be linearly independent. For example, the unitaries U 0 = I and U 1 = e iθ Z are linearly independent, and their fidelity is F = cos θ . This implies that for every set U containing these two unitaries one has F U cos θ and, therefore, the fidelity bound gives N min 4 ln(|U|−1) θ 2 , where the rhs can be arbitrarily large when the angle θ is small. Hence, for F U ≈ 1 the fidelity bound can be arbitrarily far from the correct value (think of the case when the unitaries U are linearly independent, and the correct value is N min = 1). Another example of the gap between the value of the upper bound and true value of N min for F U ≈ 1 is illustrated in the following.

Example 4 (Permutation gates). Consider identification of an unknown permutation gate
where π is an element of the permutation group S d .

Discrimination of generalized t-designs
Here we impose additional structure on the set of gates U. Our analysis includes the case where the set X labelling the gates in U is a finite group and x → U x is a representation of X. Also, it includes the case where the unitaries U from a unitary t-design [43][44][45][46]. In order to treat these two cases in a unified way, we introduce the notion of generalized t-designs. For the discrimination of generalized t-designs we will show the following properties: (i) among all possible discrimination strategies using N t queries, the deterministic strategies using all queries in parallel maximize the probability of correct gate identification; (ii) for strategies using N t queries, there is no difference between error-free, unambiguous, and perfect discrimination; and (iii) the maximum probability of correct gate identification with N t queries has a simple analytic formula.

Generalized t-designs: definition and characterization
The notion of unitary t-design plays an important role in quantum information, with applications essentially in all protocols that require to extract a random gate from the uniform distribution over all possible unitaries [43][44][45][46]. Unitary t-designs are defined as follows: consider an ensemble (U x , p x ) x∈X where U x is a unitary and p x is a probability. The ensemble is a unitary t-design iff where U denotes the complex conjugate of the matrix U and the integral in the lhs runs over the normalized Haar measure on the unitary group U (d).
We will now generalize the above definition considering, instead of the full unitary group, a smaller group of unitary gates.

Definition 1 (Generalized t-designs). Let U : g → U g be a representation of a group G and let X be a subset of G. An ensemble
where dg f (g) denotes the integral of f with respect to the normalized Haar measure.
Note that, by definition, every generalized t-design is also a generalized (t − 1)-design. Of course, a special case of generalized t-design is obtained by taking G to be a finite group and X = G: Example 5. The ensemble consisting of unitary gates in a representation of a finite group G, randomly sampled with uniform probability distribution p g = 1/|G|, is a generalized t-design for every t.
The definition of t-designs is convenient, because it allows one to transfer properties of groups to finite sets of quantum gates. In the next sections we will use this trick to prove strong properties of gate discrimination in the case of generalized t-designs.

Optimal discrimination of generalized t-designs
We start from general result about probabilistic gate discrimination. Precisely, we show that the maximum probability p max N of correct gate identification can be always achieved with a parallel strategy. In addition, we give an analytic expression for p max N . Theorem 2 (Optimal probabilistic gate discrimination). For every choice of prior probabilities, the maximum success probability p max N (cf equation (15)) is achieved by applying the N queries in parallel on an entangled state. The probability p max N is given by with |U x := (U x ⊗ I )|I , |I := d n=1 |n |n , R N := x∈X p x (|U x U x |) ⊗N and R −1 N being the inverse of R N on its support.
The explicit formula of equation (25) is useful even if one is interested in deterministic strategies, rather than probabilistic ones. Indeed, by definition p max N provides an upper bound to the probability of success of arbitrary deterministic strategies. In some cases, one may even be able to achieve the upper bound with a deterministic strategy. This is actually the case for generalized t-designs:

Theorem 3 (Optimal gate discrimination for generalized t-designs). Let (U x , p x ) x∈X be a generalized t-design. Then, the maximum of the probability of correct discrimination over all probabilistic strategies consisting of N t queries is
For uniform prior p x = 1/|U|, the maximum probability p max N = dim(U N )/|U| can be achieved by a deterministic strategy that uses the N queries in parallel.
The general result of theorem 3 is well illustrated by the case of discrete phase shifts.

Example 6 (Discrete phase shifts). Consider problem of identifying a discrete phase-shift gate
U x chosen at random with uniform probability p x = 1/|U|. Here U : x → U x is a unitary representation (UR) of the Abelian group X = Z K , and, therefore, it is a generalized t-design for every t. Now, the number of linearly independent unitaries in U is d. Hence, the probability of correct identification of a unitary with a single query is p max 1 = d/|U|. Similarly, the number of linearly independent unitaries in U N is min{N (d − 1) + 1, |U|}, and therefore, equation (26) gives

Perfect discrimination of generalized t-designs
From now on, we restrict our attention to generalized t-designs with uniform probability distribution p x = 1/|X|. Since there is no ambiguity, we will just refer to them as 'generalized t-designs'. An immediate consequence of theorem 3 is that for generalized t-designs there is no difference between error-free, unambiguous and perfect gate discrimination.

Corollary 2.
If the unitaries (U x ) x∈X form a generalized t-design, then the following are equivalent: (i) error-free discrimination is possible with N t queries; (ii) unambiguous discrimination is possible with N t queries; and (iii) perfect discrimination is possible in N t queries.
In particular, for a generalized |U|-design there is no difference between error-free, unambiguous and perfect discrimination.
For generalized t-designs the evaluation of the query complexity of perfect discrimination is reduced to the simpler problem of evaluating the query complexity of unambiguous discrimination. In particular, the bounds in propositions 1-3 become automatically bounds on the query complexity of perfect discrimination.

Bounding the dimension of the ancilla
In addition to the query complexity, it is useful to bound the size of the ancilla needed for gate discrimination [48,53]. Here we show that the size of the optimal ancilla scales at most polynomially with the number of queries N . We prove this result as a particular case of a more powerful statement about discrimination of unitaries picked from a group representation. Proposition 4. Let U : g → U g be a representation of a group G and let U be a subset of (U g ) g∈G Then, the minimum dimension of the ancilla needed for unambiguous discrimination of the gates U in N queries is upper bounded by where the maximum runs over the set Irr(U ⊗N ) of irreducible representations contained in the decomposition of U ⊗N , d µ and m µ are the dimension and the multiplicity of the irreducible representation µ (see the appendix for some background information on representation theory).
Proposition 4 has many useful consequences. The first is that ancillas are not needed for the unambiguous discrimination of commuting unitaries, a fact that was noted in [7] for parallel discrimination strategies.

Corollary 3. If the unitaries (U x ) x∈X commute, then no ancilla is needed for unambiguous discrimination.
The proof is immediate: a commuting set of unitaries is a subset of the Abelian group of all unitaries diagonal in a given basis. Since in this case the irreducible subspaces are onedimensional, equation (29) gives d min A,N 1, which means that no ancilla is required. As anticipated, another consequence of proposition 4 is the fact that, no matter which set of gates U we are considering, the dimension of the ancilla needed for discrimination in N queries cannot grow faster than a polynomial in N .

Corollary 4. The minimal dimension of the ancilla needed for unambiguous discrimination with N queries is upper bounded by d min
The proof is provided in the appendix. Bounding the binomial with equation (19), we have that the dimension of the ancilla is upper bounded by (N + 1) d−1 . In other words, the number of ancillary qubits needed for unambiguous discrimination scales at most as the logarithm of the number of queries.
Another application of proposition 4 can be found when the group G is finite. In this case, one can provide an upper bound on the size of the ancilla that is independent of the number of queries.

Corollary 5. The minimum dimension of the ancilla needed for unambiguous discrimination of the gates U ⊆ (U g ) g∈G is upper bounded by d min
|G|, independently of the number of queries.
The bound follows from the fact that, for a finite group G, the dimensions of the irreducible subspaces are upper bounded by √ G (cf the background on representation theory provided in the appendix). Corollary 5 is useful to give a quick estimate of the size of the ancilla. Such an estimate is actually tight in the example of the shift-and-multiply gates U pq (cf example 3), which form a representation of the group G = Z d × Z d . Since the size of the group is |G| = d 2 , the bound gives d min A,N d. In other words, this means that unambiguous discrimination can be achieved with an ancilla that is of the same size of the input system. This is exactly what is done by the dense coding protocol [40].

Ancilla-free gate discrimination
We conclude the paper by briefly discussing parallel discrimination strategies that do not use ancillas. These strategies involve the preparation of a multipartite input state | ∈ H ⊗N and the application of the unknown gate on each of the N systems, thus obtaining the output state We refer to these strategies as ancilla-free. Note that the only difference between an ancillafree strategy and a general parallel strategy, as in equation (17), is the presence of a non-trivial ancilla system. We will now show that the ancilla system can be always traded for an additional number of queries.

Theorem 4. Every parallel discrimination strategy using a d A -dimensional ancilla can be replaced by an ancilla-free strategy using a finite number of extra queries. For large d A , the minimum number of extra queries scales as O(log d (d A )).
This result guarantees that a discrimination strategy using a large number N A of ancillary qubits can be replaced by an ancilla-free strategy that uses O(N A ) extra queries to the black box. Essentially, this means that the black box queries are a stronger resource than the use ancillary qubits, as the latter can be efficiently simulated using the former.

Upper bounds on the query complexity of ancilla-free unambiguous discrimination
Let us denote by N AF min the query complexity of ancilla-free unambiguous discrimination, i.e. the minimum number of queries needed to distinguish the gates U unambiguously in an ancillafree way. It is immediate to see that ancilla-free unambiguous discrimination is possible in N queries if and only if there exist a state | ∈ H ⊗N such that the output states | x = U ⊗N x | are linearly independent. Using this fact, the upper bounds of propositions 2 and 3 can be easily adapted, by replacing the dimension dim(U) and the minimax fidelity F U with the corresponding ancilla-free quantities.

Proposition 5.
The query complexity of ancilla-free unambiguous discrimination of the gates U is upper bounded as where dim loc (U) is the maximum over all possible input states |ψ ∈ H of the dimension of the subspace spanned by the vectors (U x |ψ ) x∈X . Another upper bound is given by where F loc,U is the local minimax fidelity F loc,U := min |ψ ∈H max x =y | ψ|U † x U y |ψ | 2 . The proof is the obvious adaptation of proof for general parallel strategies, provided in the appendix. Note that, due to the prohibition to use ancillas, one has dim loc (U) dim(U) and F U,loc F U . Therefore, the values of the upper bounds in proposition 5 are larger than the values of the upper bounds in propositions 2 and 3. Nevertheless, even without the use of ancillas, the minimum number of queries needed for unambiguous discrimination is always less than |U| − 1, the minimum number of tests that would be needed to identify a gate in U via pairwise eliminations. The local fidelity bound of equation (32) provides an even better estimate when the unitaries in U generate a SIC-POVM [58,59], in which case one has F loc,U (d + 1) −1 , implying that N = 4 queries are sufficient for ancilla-free discrimination. This estimate is much better than the estimate coming from the linear bound of equation (31), which in the case under consideration gives a quadratic scaling with the dimension N AF min d 2 − d + 1.

Perfect ancilla-free discrimination of generalized t-designs
For generalized t-designs, one can prove that unambiguous discrimination coincides with perfect discrimination, even in the case of ancilla-free strategies.
Proposition 6. Let U be a generalized t-design. Then, the following are equivalent: (i) there exists an ancilla-free strategy for unambiguous discrimination using N t queries and (ii) there exists an ancilla-free strategy for perfect deterministic discrimination of the gates using N t queries.
A case of special interest is when unitaries form a group representation, namely U ≡ (U g ) g∈G . Two group-theoretic lower bounds on the query complexity were originally derived in [55]. We include them here for completeness, concluding our general investigation of gate identification with multiple queries: Proposition 7 [55]. For every perfect discrimination strategy using N parallel queries and a d A -dimensional ancilla there exists a perfect ancilla-free strategy using N + N min queries, with Note that for a strategy using a large number of ancillary qubits N A log √ |G|, the number of extra queries to the black box scales as O(N A ), as anticipated by theorem 4. Note also that the bound is independent of the number of queries of the initial ancilla-assisted strategy: in order to apply the bound, we only need to know that the original strategy allowed for perfect discrimination.
The last bound is expressed in terms of the maximum entanglement fidelity between pairs of unitaries. The entanglement fidelity between two unitaries U g and U h , defined as is the fidelity between the states | g = (U g ⊗ I )| and | h = (U h ⊗ I )| , obtained by applying the two unitaries on one side of the maximally entangled state | = ( d n=1 |n |n )/ √ d. Thanks to the group structure, the maximum entanglement fidelity over all pairs of unitaries in U is given by The other quantity appearing in the bound is the number of unitaries U g that can be confused with the identity, given by With the above definitions we have the following.

Proposition 8 (Entanglement fidelity bound [55]). If
then the unitaries in U can be perfectly distinguished with an ancilla-free strategy using N queries.
The condition of equation (34) contains implicitly an upper bound on the query complexity of ancilla-free discrimination. The fact that an upper bound on N AF min can be expressed in terms of the entanglement fidelity is quite surprising, because applying the unitaries on one side of a maximally entangled state is not an allowed strategy in ancilla-free gate discrimination.
Let us discuss the consequences of equation (34). The most immediate consequence is that when the entanglement fidelity is zero, perfect ancilla-free discrimination is possible with N = log d |G| queries. This value is actually the optimal one, because log d |G| is the minimum number of copies that is needed to pack |G| orthogonal vectors in the N -fold tensor product of a d-dimensional Hilbert space. An example of this situation is the discrimination of shift-and-multiply gates, already discussed in example 3: Example 7 (Ancilla-free discrimination of shift-and-multiply gates). For a d-dimensional quantum system, the shift-and-multiply gates U pq = S p M q are d 2 mutually orthogonal unitaries. Equation (34) then predicts that perfect ancilla-free discrimination is possible with N AF min = 2 queries. A concrete discrimination strategy consists in preparing two probe systems in the state |0 | f 0 , where | f 0 = ( d n=1 |n )/ √ d is the first vector of the Fourier basis. Applying two queries of the unknown gate U pq we then obtain the output state | p |q , from which p and q can be read out in a perfect deterministic way.
Before concluding, we note that, more generally, the optimal scaling N AF min = O(log d |G|) can be achieved whenever the condition log C is satisfied for some constant α > 0. Indeed, under this condition the query complexity of ancilla-free gate discrimination can be bounded between log d |G| and log d |G| + log d α −1 , thus implying . The argument is simple and is provided in the appendix.

Conclusion
In this paper we investigated the problem of identifying an unknown unitary gate in a finite set of alternatives, using both deterministic and probabilistic discrimination strategies, and allowing the unknown gate to be queried multiple times and to be used in parallel or in series in arbitrary quantum circuits. In this scenario, we provided upper and lower bounds on the amount of resources needed to achieve unambiguous and perfect gate identification. Specifically, we gave bounds on the query complexity and the minimum size of the ancillas.
Most of our results stem from two key observations. The first observation is that unambiguous gate discrimination can be parallelized: if unambiguous discrimination is possible with N queries, then unambiguous gate discrimination must also be possible by applying the N queries in parallel on a suitable entangled state. The second key observation is based on the definition of generalized t-designs, a definition that includes unitary t-designs and group representations as special cases. The remarkable feature of generalized t-designs is that for strategies using N t queries there is no difference between unambiguous and perfect discrimination. Using this fact, one can reduce the analysis of perfect gate discrimination to the simpler analysis of unambiguous gate discrimination. Finally, motivated by the application to quantum communication in the lack of shared reference frames, we considered discrimination strategies where ancillas are not allowed, providing upper bounds on the number of extra queries that are needed to make up for this limitation.
Our results suggest several directions of further research. First of all, up to now we considered the question whether or not unambiguous discrimination is possible with a certain number of queries. However, as the example of Grover's algorithm clearly shows, sometimes the probability of unambiguous discrimination could be too small to have a useful application. Hence, for future developments it is important to have bounds on the probability of the inconclusive outcome as a function of the number of queries. Our work addressed the question in the simplest case, namely the case of generalized t-designs, where the probability of the inconclusive outcome is always zero. In other cases, like the discrimination of Grover's unitaries, an estimate of the probability of the inconclusive outcome as a function of the number of queries can be obtained with the techniques developed by Eldar [61]. Our work provides a useful first step in this direction, because knowing that the unitaries are unambiguously distinguishable, and therefore, that they produce linearly independent output states is a necessary condition for the application of the techniques of Eldar [61]. Besides the evaluation of the probability of the inconclusive outcome, it is also worth relaxing the requirement of perfect gate identification, allowing for a small probability of error p e . In this case, the interesting quantity would be the minimum number of queries N min, needed to achieve gate identification with error probability smaller than . For generalized t-designs, our expression for the maximum probability of correct discrimination, given by p max N = dim(U N )/|U| (cf theorem 3), gives a starting point for the evaluation of N min, .
Another interesting development suggested by our work is the experimental demonstration of quantum advantages in gate discrimination with multiple queries. While the viability of unambiguous state discrimination has been demonstrated in many experiments (see e.g. [62][63][64][65]), the experimental realization of gate discrimination strategies is a rather unexplored territory. A recent experiment demonstrating unambiguous discrimination of two non-orthogonal gates was reported in [66] in the single-query scenario. As the level of control in the experiments increases, it would be highly desirable to have proof of principle demonstrations of the advantage of joint multi-query discrimination strategies over strategies based on pairwise elimination, both in the case of perfect discrimination and of unambiguous gate discrimination. Moreover, our results on gate discrimination without ancillas show suggest one may have quantum advantages even with relatively small amounts of entanglement.

A.2 Proof of proposition 1
By theorem 1, unambiguous discrimination is possible only if dim(U N ) = |U|. On the other hand, thinking of each unitary U ⊗N as a vector in the symmetric subspace of ( The bound is tight, because one can always choose the unitaries U N to be a spanning set for the symmetric subspace of (C d 2 ) ⊗N .

A.3 Proof of proposition 2
Let S = (v x ) x∈X be a finite set of vectors in a vector space V , with the property that every two distinct vectors in S are linearly independent. Under this hypothesis, Chefles [57] proved Applying the result to the set U N := (U ⊗N x ) x∈X gives dim(U N ) dim(U) + N − 1. Hence, for the unitaries in U N are linearly independent for N = |U| − dim(U) + 1.

A.4 Proof of lemma 2
Suppose that y∈X c y |ψ y

A.5 Proof of proposition 3
Choose the input state | ∈ H ⊗ H so that max x,y∈X,x =y | |(U † are linearly independent. Therefore, also the unitaries (U ⊗N x ) x∈X are linearly independent, i.e. unambiguously distinguishable.

A.6 Proof of theorem 2
Using the formalism of quantum combs [56,68], we express the probability p N (y|x) as p N (y|x) = U x | ⊗N T y |U x ⊗N where (T y ) y∈Y is a collection of positive operators satisfying suitable normalization conditions [56,69] (the actual form of the conditions is irrelevant here). The probability of correct identification can be bounded as the last inequality coming from the condition x∈X Tr[ρ x ] = 1. Defining the bound can be saturated by applying the N queries of U x in parallel on the maximally entangled state | ⊗N , | := |I / √ d, and by performing the POVM (P y ) y∈Y defined by

A.7 Basic representation-theoretic facts
Since generalized t-designs have an underlying group-theoretic structure, before proceeding to the next proofs it is useful to recall some basic facts about group representations.
Let us denote by Lin(H) the set of linear operators acting on H and consider a representation U : G → Lin(H), g → U g of some (compact) group G. Here we allow U to be a unitary projective representation (UPR), with multiplier ω : G × G → C. In short, this means that U g U h = ω(g, h)U gh , ∀g, h ∈ G. The most familiar case is the case of the unitary representations (UR), for which ω(g, h) = 1 ∀g, h ∈ G.
With a suitable choice of basis, the Hilbert space can be decomposed as a direct sum of tensor product pairs where I M µ denotes the identity matrix on M µ . Note that all the irreps U µ ∈ Irr(U ) must have the same multiplier ω.
Using equation (A.2) and the orthogonality of matrix elements, one can prove that the set of unitaries U := (U g ) g∈G satisfies Due to the importance of linear independence in the gate discrimination problem, this equation will become very useful in the following section.
A representation that plays a key role in gate discrimination is the regular representation, which for finite groups is a representation of G on the Hilbert space H = C |G| , equipped with the orthonormal basis {|g |g ∈ G}. Precisely, the regular representation with multiplier ω is the projective representation U reg,ω : G → Lin(C |G| ) defined by The regular decomposition is reducible and its decomposition is where Irr(G, ω) denotes the set of all the irreps of G with multiplier ω (in particular, Irr(G, 1) is the set of all unitary irreps of G). Note that every irrep appears with multiplicity m µ = d µ .
Choosing g = e (the identity element in the group) and taking the trace on both sides of equation (

A.8 Proof of theorem 3
Let G the compact group such that x∈X (U x ⊗ U x ) ⊗N = dg (U g ⊗ U g ) ⊗N , or equivalently, x∈X U ⊗N so that, computing the inverse, one has U x | ⊗N R −1 N |U x ⊗N = µ∈Irr(U ⊗N ) d 2 µ = dim(U ⊗N ) (cf equation (A.3)). Inserting this value in equation (25) proves equation (26). We now prove that for the uniform prior the maximum success probability can be obtained with a deterministic strategy that uses the N queries in parallel. To this purpose, consider the maximum likelihood input state [47,49]: this is the state in H ⊗N ⊗ H A given by where |I R µ = d µ n=1 |α µ n |β µ n , (|α µ n ) Optimal discrimination can be achieved deterministically using the square root measurement [70], which in this case has POVM elements P x := dim(U N ) |U| | ML,x ML,x |.

A.9 Proof of proposition 4
The proof is an immediate generalization of the proof of lemma 1 in [48]. | , x ∈ X is equal to the number of linearly independent unitaries in the set (U ⊗N x ) x∈X . In particular, the unitaries (U ⊗N x ) x∈X are linearly independent (i.e. unambiguously distinguishable) iff the states (| x ) x∈X are linearly independent (i.e. unambiguously distinguishable), that is, iff unambiguous discrimination is possible using a d A -dimensional ancilla satisfying d A = max µ∈Irr(U ⊗N ) d µ /m µ .

A.10 Proof of corollary 4
Every unitary set U is contained in the group U (d). The irreps of the tensor representation U → U ⊗N are labelled by Young diagrams of N boxes arranged in at most d rows and their dimensions (multiplicities) are given by [71] where the products runs over the boxes in the Young diagram µ, each box being identified by its row-column coordinates (i, j). Here, |h i j | is the length of the hook centred on the box (i, j).
Taking the ratio, one obtains , the last inequality due to lemma 2. Now, the condition d M d A √ |G| guarantees m ν,N +M d A for every possible irrep ν ∈ Irr(G, ω M+N ). Hence, by proposition 4 the optimal discrimination can be achieved without ancilla. Since dim(U N ) = |G| = dim(U N +M ), the discrimination is perfect (theorem 3).

A.14 Proof of proposition 8
The proof takes advantage of the connection between perfect distinguishability and the regular representation. If N is such that d N (1 − F N /2 U,ent C) |G|, then we have m µ d µ for every µ ∈ Irr(G, ω N ). This means that U ⊗N contains the regular representation U reg,ω N as a subrepresentation, and, therefore, perfect discrimination is possible by proposition 3.

A.15 Scaling of the ancilla-free query complexity under the condition of equation (35)
Equation (35) can be rewritten as or, equivalently, F log d |G|/2 ent,U C 1 − α. By monotonicity of the exponential, this implies that, for every N log d |G|, one has F N /2 loc,U C 1 − α, which in turn implies Hence, choosing N = log d |G| + log d α −1 the condition of equation (34) is satisfied. In conclusion, the query complexity has been bounded has N AF min log d |G| + log d α −1 .