Quantum gate verification and its application in property testing

To guarantee the normal functioning of quantum devices in different scenarios, appropriate benchmarking tool kits are quite significant. Inspired by the recent progress on quantum state verification, here we establish a general framework of verifying a target unitary gate. In both the non-adversarial and adversarial scenarios, we provide efficient methods to evaluate the performance of verification strategies for any qudit unitary gate. Furthermore, we figure out the optimal strategy and its realization with local operations. Specifically, for the commonly-used quantum gates like single qubit and qudit gates, multi-qubit Clifford gates, and multi-qubit Controlled-Z(X) gates, we provide efficient verification protocols. Besides, we discuss the application of gate verification for the detection of entanglement-preserving property of quantum channels and further quantify the robustness measure of them. We believe that the gate verification is a promising way to benchmark a large-scale quantum circuit as well as to test its property.

To guarantee the normal functioning of quantum devices in different scenarios, appropriate benchmarking tool kits are quite significant. Inspired by the recent progress on quantum state verification, here we establish a general framework of verifying a target unitary gate. In both the non-adversarial and adversarial scenarios, we provide efficient methods to evaluate the performance of verification strategies for any qudit unitary gate. Furthermore, we figure out the optimal strategy and its realization with local operations. Specifically, for the commonly-used quantum gates like single qubit and qudit gates, multi-qubit Clifford gates, and multi-qubit Controlled-Z(X) gates, we provide efficient verification protocols. Besides, we discuss the application of gate verification for the detection of entanglement-preserving property of quantum channels and further quantify the robustness measure of them. We believe that the gate verification is a promising way to benchmark a large-scale quantum circuit as well as to test its property.
To build a large-scale and stable quantum system, efficient and robust benchmarking tools are essential [1]. The core aim of the quantum benchmarking is to establish the correct functioning of a quantum device, so that one can gain the confidence on the final information processing results. A benchmarking process is usually composed of several elements: the unknown target devices, some trusted (or partially characterized) benchmark devices, and a benchmarking protocol with classical data processing.
While quantum mechanics endows us a large Hilbert space for information processing, whose size increases exponentially with the increase of the qubit number, it also introduces a challenging problem of characterizing the devices in this space. In general, without any prior knowledge on the target devices, it on the same time takes exponentially increasing resources to get the full tomographic image of it [2,3]. Fortunately, in most of the cases, one holds some prior knowledge on the possible structure of the target device. With the assistance of this prior knowledge, it is in principle feasible to reduce the benchmarking resources and even characterize the system efficiently with a polynomial number of trials. Some common benchmarking tool kits developed in this spirit and widely applied in experiments are quantum tomography based on compressed sensing [4,5], tensor-network-based quantum tomography [6][7][8], permutation-invariant quantum tomography [9][10][11] and direct fidelity estimation [12], ordered by less information gain or higher efficiency.
On the other hand, the correctness of the benchmark results usually relies on some assumptions made on the benchmarking devices as well as the target devices. In practice, the quantum gate benchmarking protocols with practical assumptions on the benchmarking devices have been proposed, such as gate-set tomography [13,14] and randomized benchmarking [15][16][17]. Meanwhile, in some quantum information task such as quantum key distribution [18,26] and blind quantum computation [19], the quantum objects might be produced by the adversarial party, which may be correlated among different trials. Therefore, robust benchmarking protocol against correlated noise is also meaningful.
Recently, a highly efficient benchmarking protocol called quantum state verification has been introduced [20,21]. In the verification, one aims to know whether the prepared state ρ is close to the ideal pure state |ψ in some precision for a given significance level δ. The verification is accomplished by a few rounds of 2-outcome verification tests, which constitute the verification operator Ω. Conditioning on the pass of all the tests, one can lower bound the fidelity within a high precision. The efficiency of the verification is determined by the spectral gap of the operator Ω. Comparing to the direct fidelity estimation protocols [12], the verification protocol is shown to achieve the same fidelity precision with quadratically fewer number of trials.
Inspired by the quantum state verification [20][21][22], here we propose a general framework of the quantum gate verification. The main idea is to map the gate verification to the verification of corresponding Choi state. We first introduce some prior knowledge on the Choi representation and the gate fidelity in Section I, and then provide a general framework of quantum gate verification in Section II. In Section III, we focus on some typical quantum gates and discuss about their verification strategies. Especially we show that any single-partite (qubit and qudit) gates and Clifford gates can be efficiently verified. In Section IV, we discuss the application of the gate verification in testing the properties of quantum channels, such as the robustness of quantum memory [34,35]. Finally, in Section V, we summarize our work, discuss about the possible future direction, and compare it to recent related works.

I. PRELIMINARIES
In this section we first review some essential properties of quantum channels that is related to our discussion.
A. Choi state representation of quantum channels For a quantum system A, denote its Hilbert space as H A . The linear operations on A form a space L(H A ). Denote the quantum state subspace on L(H A ) as D(H A ). Suppose the systems A andĀ own the same dimension and are two orthonormal bases of them. The maximally entangled state (with respect to B A and BĀ) on systems A,Ā is defined to be and we denote the density matrix Φ AĀ is a quantum channel if and only if (iff) it is a completely positive and trace-preserving (CPTP) map. Denote I d the d-dimension identity map. On account of the state-channel duality, the (normalized) Choi state representation of a quantum linear map is defined to be that is, the output state of the map I A→A ⊗ EĀ →B with the maximally entangled state as the input state.
In this work, we focus on the case when the output dimension d B is the same as the input dimension d A . We denote d := d A = d B . Meanwhile, we omit the superscript of E A→B standing for the system in the case when no ambiguity occurs. Note that as the channel E being an unitary U , the Choi state is a maximally entangled (pure) state, and we denote the unitary channel as U(·) = U · U † .
The Choi state encodes all the information of the corresponding quantum channel, and we can get the output of the channel by the following relation, The state-channel duality is essential to our work, which indicates that verifying the quantum channel is equivalent to verifying the Choi state. We show in Sec. II that many results in the state verification can be applied to the current study.

B. Average gate fidelity and entanglement fidelity
In this work, we focus on benchmarking the quantum gate, say an unitary U on the Hilbert space H d . Due to the unavoidable noise, the actual operation realized in an experiment may be a noisy channel E. Here we use the average gate fidelity to characterize the difference between the ideal unitary gate U and the noisy channel E.
where the integration is over all the pure state under Haar measure. The average gate fidelity is widely used in the quantum gate benchmarking experiment.
For the corresponding Choi states, the entanglement fidelity is defined as, In fact, there is a direct relation between the average gate fidelity and the entanglement fidelity, As a result, one can investigate F (U, E), a practical figure of merit, with F E (U, E) which is related to the following theoretical derivation. We denote r E (U, E) := 1 − F E (U, E) as the entanglement infidelity.

II. GENERAL FRAMEWORK OF QUANTUM GATE VERIFICATION
In this section, we introduce a general framework of quantum gate verification. We first analyze the performance of verification strategies in non-adversarial scenario in Section II A. We then discuss the optimal verification protocol in Section II B, which can be realized in a quite experiment-friendly way. After that, in Section II C we extend the verification task to the adversarial scenario, which could be useful in the quantum communication tasks with untrusted quantum channels.

A. Non-adversarial scenario
We start from the i.i.d. (identical and independent distribution) scenario, where a device named Eve is going to produce N rounds of the same quantum channel E, which should be the unitary gate U in the ideal case. Similar as the state verification, as a user of the channel Alice would like to verify whether the underlying channel is close to the ideal unitary within some using N tests under some significance level δ.
On account of the state-channel duality introduced in Sec. I A, a natural method is to input maximally entangled state and verify the output Choi state directly. However, from a practical point of view, the verification with the maximally entangled state preparation is consumptive and also not robust to the state preparation error. Therefore, in the following discussion, we adopt the strategy that only employs single-partite input states and measurements without ancillaries, that is, in a prepare & measurement manner.
During each round, Alice prepares a state ρ l , lets it get through the channel E, and measures it using 2-outcome positive operator-valued measurement (POVM) operators {E l , 1 − E l }, with 0 ≤ E l ≤ 1. The state ρ l and POVM element E l satisfy We name the combination (ρ l , E l ) satisfying Eq. (7) as a verification pair for U. By Eq. (3) we can reformulate Eq. (7) as In different rounds, Alice may adopt different verification pairs (ρ l , E l ) for testing. Suppose she chooses the pairs with probability p l . The verification pairs (ρ l , E l ) as well as the probability p l are together called a strategy W := {p l , (ρ l , E l )} l . Define the verification operator being From this point of view, the verification scheme of a channel is (mathematically) closed related to the verification of the maximally entangled state [22]. The operator Ω from the strategy W is actually the corresponding verification operator. However, there are still differences between the maximally entangled state verification and the gate verification: 1. In the maximally-entangled state verification, the possible noisy objects are all the bipartite states; while in the gate verification, the possible noisy objects are all noisy quantum channels, which owns extra limitations than the bipartite states.
2. In the gate verification, the state is prepared deterministically, and the measurement is decided according to the state preparation. In a way, we are restricted to the one-way LOCC strategy, comparing to the former bipartite state analysis [23,24].
For the noisy channel with the entanglement infidelity r E (U, E) not smaller than , the maximal pass probability (corresponding to the type-II error of hypothesis testing) is, Here the first maximization is on all the possible channel E, and the Choi state should satisfy an additional constraint Tr B [Φ AB E ] = I A /d A than the quantum state verification. As a result, we have the last inequality which acts as an useful upper bound of the pass probability. Here ν(Ω) := 1 − β(Ω) is the spectral gap of Ω, with β(Ω) is the second largest eigenvalue. Note that, P ( , Ω) can be written as a semidefinite program, Given a verification operator Ω, for the significance level δ, i.e., P ( , Ω) N ≤ δ, the minimal number of the verification trial is, where the first inequality is due to the upper bound in Eq. (10). Thus, one can always find a upper bound on the trial number related to the spectral gap ν(Ω), but this bound may be a loose one generally.
To reduce the trial number, one should minimize the passing probability in Eq. (10), and the optimal one is where the operator Ω is from all verification strategy W given by Eq. (9). The optimal trial number is then N op ( , δ) = ln δ ln P op ( ) . In the following, we show some properties of P ( , Ω), which are helpful for the optimization of it in the next section.
In practice, it is more likely that the channels {E k } Eve prepares during different rounds in the experiment are different with each other. In this case, an well-defined estimation value would be the averaged infidelity over different roundsr Similar to the discussion in Ref. [25](cf. Proposition 1), one can bound the average infidelityr(U, {E k }) in this case.
To be more explicit, one can first solve the i.i.d. programming problem of P ( , Ω) in Eq. (11), and then substitute to the preset average infidelityr. The final number of trial to achieve the estimation ofr with significant level of δ can be bounded by Eq. (12).

B. Optimal verification with pure state inputs and projective measurements
In this section, we provide the optimal verification of any unitary channel U under pure state inputs and project measurements (PVM), which is easier for the experiment realization. Suppose one finds a verification strategy W := {p l , (ρ l , E l )} l for the identity channel I, it is not hard to see that any unitary U can be verified with W := {p l , (ρ l , U(E l ))} l . Consequently, without loss of generality we focus on the optimal verification of I in the following discussion.
To find the optimal verification of I, we have the following two lemmas to convert an arbitrary verification operator Ω to the corresponding Bell-diagonal form without reducing the efficiency.
where the verification operators Ω and Ω are from W and W respectively and Proof. First, note that Tr thus Ω is a valid verification. Suppose a state Φ E reaches the maximal value of P ( , Ω) according to Eq. (10), then one can find As a result, P ( , Ω ) ≥ P ( , Ω). Since the unitary is reversible, similarly one can also find that P ( , Ω ) ≤ P ( , Ω), and thus P ( , Ω ) = P ( , Ω).
Lemma 2. For a verification operator Ω of identity channel I, one can find the corresponding Bell-diagonal verification operator where W ( u, v) is the unitary channel of the Weyl operator introduced in Appendix A, such that the pass probability does not increase, i.e., P ( , Ω ) ≤ P ( , Ω).
The proof of Lemma 2 is in Appendix B.
Theorem 1. For any unitary U on H d , one can construct the optimal verification strategy with pure state inputs and projective measurements. The optimal verification operator shows and the optimal pass probability and the trial number are Proof. Without loss of generality, we consider identity channel I here. Based on Lemma 2, to find the optimal verification one only needs to investigate Ω in the Bell-diagonal form. In this case, the channel verification and the state verification become coincident, that is, the first inequality in Eq. (10) is saturated. To be specific, the maximization of Tr[Ωρ] = Tr[Ωρ diag ] is equivalent for the Bell-diagonal states, which are legal Choi states. At the same time, for the state verification, the optimal verification operator with separable measurements is which is clearly Bell-diagonal. Now we show that Ω op can be constructed in a preparation and measurement manner. The optimal operator Ω op can be realized by the so called conjugate-basis (CB) projector of an orthogonal basis B , That is, Ω op = 1 d+1 d+1 l=1 P (B l ), when B l are d + 1 mutually unbiased bases (MUBs). If the dimension is not a prime power, the verification operator can be realized by Ω op = α p α φ * α ⊗ φ α , with the weighted complex projective 2-design {p α , φ * α }. Finally, according to Eq. (3), the corresponding verification strategy of I shows, That is, we input ψ i l and measure ψ i l with equal probability. For the unitary U, the verification strategy is One can find the strategy of Ω constructed from 2-designs in a similar.
Practically, one may prefer to implement the verification with less MUBs, due to the reasons that there are no enough MUBs in the Hilbert space or to reduce the experiment resources. The verification can be built with less MUBs, Ω = 1 g g l=1 P (B l ), and the spectral gap is ν(Ω) = (g − 1)/g. According to Eq. (12), the trial number is upper bounded by, Note that the bound may be not tight, however it is economical. For example, one can finish the verification with only two bases with the trial number only about two times overhead than the optimal one.

C. Adversarial scenario
In the non-adversarial scenario, we suppose the channels are independent for different rounds, and the state preparation and measurement is performed by a single party Alice. In some practical quantum information tasks where quantum channels are held by some untrusted parties Eve, e.g. entangled state distribution and quantum key distribution [18], the adversarial Eve may be even more powerful so that he can take advantage of the correlations between different rounds [25]. In this case, Eve may produce a large composite quantum channel We will leave out the subscript (N + 1) in the later discussion in this section, i.e., E := E (N +1) .
In the adversarial scenario, we suppose that Alice prepares the state and Bob performs measurement. In the total (N + 1) rounds of experiments, Alice first randomly chooses N rounds to perform the verification test W , and leave one turn to perform the real quantum information task. After Alice emits the states, Bob stores the (N + 1) rounds of states received from channel E (N +1) into a quantum memory. Alice then announces the test location to Bob for channel verification. Here we assume that the classical channel is authenticated. Also, we suppose that Alice emits the same mixed state for real quantum information task as the test rounds, i.e., for a given strategy Ω, Alice emits the state Tr B (Ω AB )/d on average. In this case, Eve cannot discriminate the test rounds and the true task round, and it is equivalent to think that Alice and Bob randomly permutate the rounds afterwards. This is similar to the case in BB84 protocol [26], where the emitted Z-basis state should be the same as the emitted X-basis to ensure a random sampling. We leave the case when the states for test rounds and the task round are different for the future research.
The possibility that the N rounds of tests pass is Conditioning on that the N rounds of the tests pass, Alice would like to make sure that the reduced (N + 1)-th round quantum channel given by the reduced Choi state should be closed to the unitary U . The entanglement fidelity between Φ E and U is where The core task in adversarial scenario is to verify whether the channel used for the task round is the target unitary channel U. Similarly, following the state verification discussion in Ref. [25], one can define the estimated (entanglement) fidelity lower bound with respect to the number of test rounds N , a failure probability of δ, and the verification strategy Ω F (N, δ, Ω) := min where Φ E take values over all Choi states. The number of trials lower bound with respect to a precision of , a failure probability of δ, and the verification strategy Ω is defined to be For the convenience of later discussion, we also define the bipartite state verification parameters Here the optimization is taken over all the 2(N + 1)-qudit ( bipartite state ρ, and p ρ , f ρ is defined by replacing Φ E in Eq. (25) and Eq. (28) to ρ. It is obvious that F (N, δ, Ω) ≥ F S (N, δ, Ω) and N ( , δ, Ω) ≤ N S ( , δ, Ω). Therefore, the bipartite state verification parameter F S (N, δ, Ω) and N S ( , δ, Ω) are the lower bound and upper bound of F (N, δ, Ω) and N ( , δ, Ω) respectively. One can apply the analysis in Ref. [21,25] to estimate N S ( , δ, Ω) and F S (N, δ, Ω), which provides a useful bound for N ( , δ, Ω) and F (N, δ, Ω).
For a general strategy Ω, F (N, δ, Ω) can be expressed as a programming problem which is not easy to find a analytical solution in general. We would like to reduce the estimation of F (N, δ, Ω) and N ( , δ, Ω) to their corresponding state versions.
Observation 2. For a verification strategy Ω of gate U which is bell-diagonal under a local unitary transformation, i.e., where {Φ AB u,v } are the qudit Bell states {Φ AB u,v } under local unitary transformation on system A and B, andΦ AB Proof. We now try to simplify the expression of F (N, δ, Ω). Due to the random assignment of test rounds, it is not restrictive to consider the permutation-invariant Φ E only. Similar to the discussion in Ref. [25], one can define the permutation-invariant Bell basisΦ whereP S is the symmetrization operator, mixing all possible permutation with respect to different rounds, k := [k 0,0 , k 0,1 , ..., k d−1,d−1 ] is a sequence of nonnegative integer number with u,v k u,v = N + 1.
Since p E and f E in Eqs. (25), (28) only depend on the diagonal elements of Φ E in the Bell basis, without loss of generality, we may assume that the Choi state is diagonal in the product basis ofΦ u,v . We only need to consider the Choi state Φ E as the mixture ofΦ k where {c k } are the nonnegative mixing coefficients with k∈K c k = 1, and K is the set of all possible k. Note that, theΦ u,v -basis naturally meets the requirements of Choi states, i.e., Tr B [Φ AB u,v ] = I d /d. As a result, the optimization is over the whole convex hull made by {Φ k }, similar to the state case in Ref. [25]. Therefore, Note that, the homogeneous strategy is a specific case of bell-diagonal strategy. A strategy Ω for unitary U with the form is called homogeneous. The eigenvalues of such Ω except the largest one are all degenerated to be λ. It was shown in Ref. [25] that the following optimization can always be achieved by the homogeneous strategy for given N and δ. For a qudit homogeneous strategy Ω with d 2 × d 2 dimension, it is always possible to write it in the following form withΦ 0,0 = Φ U , λ 0,0 = 1, and λ u,v = λ for (u, v) = (0, 0). Now we discuss the optimal strategy Ω for given δ and N . We first introduce some notations. We call a strategy Ω useless under given δ and N if no Choi state Φ E meets the requirement By spectrum decomposition, a strategy Ω can be written in the following unique form where J < d is the number of different eigenvalues, λ 0 = 1 > λ 1 > ... > λ J−1 ≥ 0, and Π j is the projector onto the eigenspace with eigenvalue λ j , whose rank may be larger than 1. If there exists a maximally entangled state Φ e such that Φ e ⊆ Π j , we call the Π j space is Bell-supported. Denote the set of Bell-supported {Π j } of Ω as S(Ω). Obviously, Π 0 ⊆ S(Ω). If a strategy has Bell-supported projector set S(Ω) with at least one elements else than Π 0 , we call the strategy Ω is Bell-supported. The Bell-diagonal strategies are the extreme case of Bell-supported strategies, where S(Ω) span the whole operator space of Ω. For the Bell-supported strategies, we have the following observation.
Observation 3. For a Bell-supported strategy Ω, denote a subset of S(Ω) as S 0 (Ω) ⊆ S(Ω) which contains Π 0 and at least another element Π j . Denote the set of eigenvalues corresponding to the projects in S 0 (Ω) as λ(S 0 (Ω)). If we construct a new strategy Ω with the following form whereλ j can be any value in λ(S 0 (Ω)) except for λ 0 = 1, then if F (N, δ, Ω ) is not useless under given N and δ.
Proof. For the strategy Ω, we take a group of eigenvectors {Ψ j,l } corresponding to different eigenvalues {λ j }. If the rank of Π j is larger than 1, then l denotes the index in the degenerated space. We set Ψ j,0 to be (one of) the Bell state in Π j if Π j ∈ S 0 (Ω). Obviously, {Ψ j,l } are also the eigenvectors of Ω . We denote the set of maximally entangled basis in it as Θ(Ψ j,l ). Similar to the argument in the proof of Observation 2, we now introduce the permutation-invariant basis whereP S is the symmetrization operator, mixing all possible permutation with respect to different rounds, k := [k 0,0 , k 0,1 , ..., k J−1,L−1 ] is a sequence of nonnegative integer number with j,l k j,l = N + 1. If k is non-zero only on the set Θ(Ψ j,l ), the generated symmetric state Ψ k will also be the maximally entangled state. We denote the set of such Ψ k as the symmetric Bell basis Θ S (Ψ j,l , N ).
Since p E and f E in Eqs. (25), (28) only depend on the diagonal elements of Φ E in the basis of Ω, without loss of generality, we may assume that the Choi state is diagonal in the product basis of {Ψ j,l }. We only need to consider the Choi state Φ E as the mixture of Ψ k where c = {c k } are the nonnegative mixing coefficients with k∈K c k = 1, and K is the set of all possible k. Since Ψ k might not meet the requirement of Choi state, there is extra limitation on the coefficients: We denote the set of legal coefficients c satisfying Eq. (47) as C(Ψ k ), which is determined by {Ψ k }. Note that, due to the linearity of Eq. (47), C(Ψ k ) is a convex set. According to Eq. (25), (28), (45), and (46), one have (Eqs. (25) in [25]) where λ := (λ 0,0 , λ 0,1 , ..., λ J−1,L−1 ) is the eigenvalues of Ω or Ω , and Here λ 0 i is set to be 1, even if λ i = 0. Due to the degeneration of {λ j,l }, for different k, the values of η k ( λ) and ζ k ( λ) could be the same. The optimization value of F (N, δ, Ω) is determined by the 2-D region of (p E (c), f E (c)) with legal c ∈ C(Ψ k ).
Our main idea to prove F (N, δ, Ω ) ≥ F (N, δ, Ω) is to show that the optimizing area of Ω belongs to the optimizing area of Ω, that is, the point (p E (c), f E (c)) by coefficients c with Ω can always be achieved by the same coefficients c with Ω.
First, for the strategy Ω , all the value of (p E (c), f E (c)) with c ∈ C(Ψ k ) can be achieved even if we only consider the symmetric Bell basis Ψ k ∈ Θ S (Ψ j,l , N ). Since the symmetric bell basis terms {Ψ k } naturally satisfy Eq. (47), the Bell-coefficients {c k } can then be chosen freely, without any extra requirements than non-negative and normalization.
On the other hand, due to the degeneracy of eigenvalues, i.e.,λ j ∈ λ(S 0 (Ω)), all the values of η k ( λ) and ζ k ( λ) can be realized by the symmetric Bell basis set Θ S (Ψ j,l , N ).
Second, for each symmetric Bell strategy {c k } of Ω , one can realize it on Ω with the same value of (p E (c), f E (c)). Note that the feasible coefficients region C(Ψ k ) for Ω and Ω are the same. Moreover, all the values of η k ( λ) and ζ k ( λ) for the symmetric Bell basis are the same.
Observation 3 implies that, for the Bell-supported strategy Ω, one can always find a strategy with degenerated eigenvalue which is not worse than Ω. Therefore, for a given N and δ, and among all the Bell-supported strategies Ω, by applying the Observation 3, one can see that the optimal strategy can always be achieved by homogeneous strategy.
For the homogeneous strategy Ω, according to Observation 2, one can directly calculate F S (N, δ, Ω) and N S ( , δ, Ω). In the high precision limit, i.e., , δ → 0, the optimal homogeneous strategy to verify U is To realize this, based on the optimal CB-test strategy introduced in Section II, one may some "trivial test" into it. In the "trivial test", Alice and Bob perform no operation to realize the identity test. To realize the optimal homogeneous test in the high precision limit, one may perform the trivial test with probability p = d+1−e ed and original optimal CB-test with probability 1 − p. In this case, the required number of trials is [22] N ( , δ, λ) = N S ( , δ, λ) ≈ e −1 ln δ −1 . (51)

III. VERIFICATION OF SOME TYPICAL QUANTUM GATES
In the previous section, we give the general framework of the quantum gate verification. Especially, we have shown that any unitary channel U on H d can be efficiently verified with pure state inputs and projective measurements, in the (non)adversarial scenario. In this section, we apply the general protocol given above to several quantum gates involved in quantum computing, such as any single qubit gates, multiqubit Clifford gates and beyond.

A. Single qubit gates
Here we first focus on the qubit identity channel I, and latter directly extend to any single qubit gate U by unitary transformation. The Choi state of I is Φ + . According to Theorem 1, we can utilize 3 MUBs from the Pauli bases, which account for three subspaces, and |±i denote the eigenstates of the Y basis. Note that these three projectors can also be derived from the stabilizer of the Choi state, which is helpful for the derivation of multiqubit gates. The verification operator is Ω = 1 3 (P X + P Y + P Z ) [20]. By Theorem 1, the qubit gate can be verified with optimal trial number N op ( , δ) = which share equal probability 1/6. For example, (|+ , |+ ) means that one inputs the |+ and projects the output also on |+ , say the X-basis measurement.
(54) which share equal probability 1/6. In the same way, the non-Clifford T gate can also be verified. In addition, general qudit gate can be verified according to Sec. II B.

B. Clifford gates
In this and the next section, we consider the multiqubit gates, where the underlying Hilbert space is H d = H ⊗N 2 . In this case, the optimal strategy given in Sec. II B generally can not be applied, since the input states and the measurements could be entangled ones. Fortunately, we show in the following that one can verify Clifford and C n−1 Z(x) gates, inspired by the verification of stabilizer(-like) states. Let us first take the Controlled-Z (CZ) gate as an example, and the overall Choi state shows, Note that CZ gate operates on the final two qubits. The stabilizer generators of the initial Bell states are, and the generators of the state |Φ CZ is updated to g i = U(g i ), where U is the corresponding gate (CZ here).
on account the commuting relations, To verify the state, we can use the four stabilizer generators g i to construct the projection P i = g i +I 2 , and the verification operator is Ω = 1 2n i P i (here n = 2) with the gap being ν(Ω) = 1/2n. In fact, one can utilize all the non-trivial 2 2n − 1 stabilizers to enhance the gap to 2 2n−1 /(2 2n − 1) [20,21], but may cost more measurement settings. In some cases, the measurement settings can be reduced by the coloring of the corresponding graph states [27][28][29], which is equivalent to the stabilizer states under local Clifford gates [30].
Then we translate the strategy from the state to the channel as in Sec. III A. For the projector P i , the corresponding subspace is the +1 subspace of g i = A i ⊗B i , where A i , B i are two Pauli tensor operators. Thus the verification strategy (ρ l , E l ) is to input the eigenstate |ψ A in the +1(−1) subspace and project the eigenstate to the +1(−1) subspace of B i . Since A i , B i are Pauli operators, the verification can be accomplished with inputting product pure states in the Pauli basis and Pauli measurements. For instance, the verification pairs of projector P 1 and P 2 are, similarly for P 2 to P 4 . To be specific, here {|+ 1 , (X 3 Z 4 ) + } means that one inputs |+ on the first qubit (I/2 on the second qubit), and measure the result in the +1 basis of X 3 Z 4 . It is clear that (X 3 Z 4 ) ± can be finished by local X 3 and Z 4 measurements and classical post-processings. The above analysis can be generalized to the verification of any Clifford gates, and we summarize this in the following observation.
Observation 4. Any n-qubit Clifford gate can be verified under entanglement infidelity and significance level δ with at most verification trial number, and this number can be further reduced with more input states and measurement settings, where the input states are in the Pauli basis and the measurements are local Pauli ones.

C. Multi-qubit Control-Z and Control-X gates
In this section, we show the verification protocol of the C n−1 Z and C n−1 Z, i.e., and C n−1 X = H n C n−1 XH n . Similar as Sec. III B, we can find the updated "stabilizer" generators, however now the stabilizers are not in the Pauli tensor form since the C n−1 Z(x) gate is not a Clifford one. Since the C n−1 Z gate can generate the hypergraph state [31], in the following we adopt the verification operator for the hypergraph state [28]. As shown in Fig. 3, the Choi state of the C n−1 Z(x) state is equivalent to the hypergraph state under local unitary, i.e, the Hadamard.
where the hypergraph state |HG = n i=1 CZ {i,i+n} C n−1 Z |+ ⊗N . In this way, we can directly get the stabilizer generators of the Choi states from the ones of the hypergraph state. For example, for the |Φ C n−1 Z , the generator related to the 4-th qubit is g 4 = X 1 X 4 CZ 4,5 . On account of the result in, one can verify |Φ C n−1 Z and |Φ C n−1 X using verification operator constructed from the stabilizers, and the spectral gap is 1/(n + 1) according to the color protocol in [28]. In a similar way as in Sec. III B, we can transfer the state protocol to the verification strategy of the unitary gates, and the verification round is N E ≤ n+1 ln δ −1 . Note that we can still use local state inputs and Pauli basis measurements, since the C k Z operator on k-qubit can be measured with Z ⊗k with post-processings.

IV. APPLICATIONS IN CHANNEL PROPERTY TESTING
In this section, we show the application of the verification protocol to the property testing of the underlying quantum channel. Here we focus on channels' entanglement property, and claim that the following analysis could be generalized to other properties, such as the coherence generating power [32,33].
Here the entanglement property refers that whether the underlying channel is an entanglement-preserving (EP) or the contrary, entanglement breaking (EB) one. This kind of test is essential for quantum communications, such as the quantum memory and the quantum channel in quantum networks and distributed quantum computing. An EB channel can be described by a measurement-and-preparation channel, thus destroys any quantum correlation between the initial input state and other parties. In the following sections, we first discuss the verification of the entanglement property of the channel and further quantifies this kind of quantumness by estimating a lower bound of the (generalized) robustness of the quantum memory [34,35]. Here we transform the Choi states of C n−1 Z and C n−1 X to the hypergraph states |HG in (a) and (b) respectively. Here the hypergraph state |HG owns three (red) normal edge and one (green) 3-hyperedge.

A. Entanglement property detection
As a specific type of quantum channel, a good quantum memory can preserve the quantum information to some extent. In the ideal case, the quantum memory keeps all the information contained in the states and is reversible. The perfect memory is a known unitary U, e.g., the identity channel I. In the following discussion, we show that the verification protocol can help us reveal whether the noisy channel is EP. Without loss of generality, here we focus on the strategies to verify I.
It is known that a channel is EP iff the corresponding Choi state is an entangled state. The Choi state Φ E is entangled if the fidelity to the maximally entangled state Tr(Φ E Φ + ) ≥ 1/d, that is, by the violation of the following witness, where W ≥ 0 for all separable states [36]. As a result, here the error threshold is taken as = 1 − 1/d. From Theorem 1, we know that the optimal verification round is, Thus the EP can be verified with single round if d ≥ 2δ −1 − 1. Moreover, suppose we consider the verification protocol just with two MUBs, which is the easiest to realize in the experiment, the corresponding verification round is, .
Thus we can use two measurement settings, for example, X and Z bases states and measurements to detect the entanglement of quantum channel.

B. Quantumness quantification
In this section, we go further and apply the verification to the quantification of quantumness. Specifically, an operational measure called the robustness of the quantum memory can be lower bounded by the verification protocol.
We first introduce the robustness of entanglement [37], where S is the set of separable states. R(ρ) quantifies how much noise introduced to make the state separable. If one allows the noisy state σ to be any state, the definition becomes the generalized robustness R s G (ρ). By definition, In a similar way, the robustness of quantum channel is defined as [34,35], where F is the set of EB channels. If one allows the mixed channel M to be any channel, the definition becomes the generalized robustness R G (E). By definition, R G (E) ≤ R(E). The (generalized) robustness measure of quantum channel owns a few of significant operational meaning, such as the amount of classical simulation cost and the advantage in state discrimination-based quantum games.
where Φ E is the Choi state of the quantum channel E.
Proof. Here we prove the first inequality, and the second can be proved in the same way. If we write Eq. (68) in the Choi state form, we can see that the noisy Choi state Φ M is not only a separable state but also under the additional constraint-maximally mixed on the first subsystem. However, the minimization of R s (Φ E ) does not need this constraint thus serves as a lower bound.
From Observation 5, one has R s G (Φ E ) ≤ R G (E) ≤ R(E). Thus we can give a reliable lower bound of the robustness of quantum channel by estimating the corresponding measure on the Choi state. From Ref. [38], the generalized robustness of state entanglement can be lower bounded by the witness as, where λ max is the largest eigenvalue of the witness operator W. Inserting the witness in Eq. (64), we have As a result, to confirm R(E) ≥ r, the entanglement infidelity should satisfies ≤ d−r−1 d . And we have the trial number of the optimal strategy is upper bounded by, .
Note as r = 0, Eq. (72) becomes the result in Eq. (65) of the verification of entanglement. We can further reduce the measurement efforts by using less MUBs.

V. CONCLUSION AND OUTLOOK
In this work, we studied the verification of quantum gates. Based on the Choi representation of quantum channels, we analyze the verification strategies with local state inputs and local measurements without the assistance of extra ancillaries.
In the non-adversarial scenario, the verification performance characterized by the type-II error probability P ( , Ω) can be calculated by a semidefinite program. Due to the unitary invariance and convexity of the pass probability with respect to Ω, one can prove the optimality of a uniformly mixing strategy Ω op in Eq. (19), which can be realized by a CB test with (d + 1)-MUB when d is a prime power, or other mixing strategy based on quantum state 2-design. Moreover, we show that the performance of all the Bell-diagonal strategies can be exactly evaluated.
In the adversarial scenario, the verification performance characterized by the entanglement fidelity lower bound F (N, δ, Ω) and number of trials upper bound N ( , δ, Ω) is in general hard to solve, while the corresponding state parameters F S (N, δ, Ω) and N S ( , δ, Ω) can provide a useful bound. We prove that, for the Bell-diagonal strategies with the form in Eq. (33), the calculation of F (N, δ, Ω) and N ( , δ, Ω) can be reduced to its corresponding state version F S (N, δ, Ω) and N S ( , δ, Ω). Meanwhile, we prove that, among all the Bell-supported strategies Ω defined in Section II C, for given trial rounds N and significant level δ, the optimal F (N, δ, Ω) can always be achieved by the homogeneous strategies.
More specifically, we analyze the local verification strategies and their performance for some common quantum gates, such as single-qubit and qudit gates, multi-qubit Clifford gates, and multi-qubit controlled-Z and controlled-X gates. We also demonstrate the application of gate verification for channels' property testing. We show that gate verification can be used to test the entanglement-preserving property as well as the robustness of quantum memory.
To enhance the robustness of our work against state preparation and measurement error, we may consider the combination of channel verification with common robust methods, such as randomized benchmarking [15,17], robust tomographic information extraction [39], and gate set tomography [14]. On the other hand, it is important to make the gate verification protocol robust against few rounds of failure tests [40].
To characterize the quantumness in a channel is currently a hot topic [34,35,[41][42][43][44][45]. Here we analyze the application of gate verification to quantify the robustness of quantum memory [34,35], we believe that our method can be extended to quantify other properties of the channel, such as the coherence generating power [32,33], magic [47] and so on.
During the preparation of this manuscript, we notice two recent related works [48,49]. Comparing to Ref. [48], we analytically derive the optimal verification strategy for the general d-level unitary. Ref. [49] develops a very general framework for the quantum gate verification with local state inputs and local measurements, which is suitable for quite a few gates, especially for the multi-partite ones. Here we focus on the preparation and measurement strategies and directly relate them to channel's Choi representation. As a result, our performance (by the number of trials) on the multi-qubit Clifford gate in Eq. (61), N ≤ 2 2n −1 2 2n−1 −1 ln δ −1 is better than the one in Ref. [49], N ≤ 3 −1 ln δ −1 . Moreover, here we also consider the quantum gate verification in adversarial scenario and its application in channel property testing.