# Recovering quantum gates from few average gate fidelities

Characterising quantum processes is a key task in and constitutes a challenge for the development of quantum technologies, especially at the noisy intermediate scale of today's devices. One method for characterising processes is randomised benchmarking, which is robust against state preparation and measurement (SPAM) errors, and can be used to benchmark Clifford gates. A complementing approach asks for full tomographic knowledge. Compressed sensing techniques achieve full tomography of quantum channels essentially at optimal resource efficiency. So far, guarantees for compressed sensing protocols rely on unstructured random measurements and can not be applied to the data acquired from randomised benchmarking experiments. It has been an open question whether or not the favourable features of both worlds can be combined. In this work, we give a positive answer to this question. For the important case of characterising multi-qubit unitary gates, we provide a rigorously guaranteed and practical reconstruction method that works with an essentially optimal number of average gate fidelities measured respect to random Clifford unitaries. Moreover, for general unital quantum channels we provide an explicit expansion into a unitary 2-design, allowing for a practical and guaranteed reconstruction also in that case. As a side result, we obtain a new statistical interpretation of the unitarity -- a figure of merit that characterises the coherence of a process. In our proofs we exploit recent representation theoretic insights on the Clifford group, develop a version of Collins' calculus with Weingarten functions for integration over the Clifford group, and combine this with proof techniques from compressed sensing.

## Authors

• 7 publications
• 10 publications
• 4 publications
• 6 publications
• 3 publications
• 8 publications
• 2 publications
• ### Do log factors matter? On optimal wavelet approximation and the foundations of compressed sensing

A signature result in compressed sensing is that Gaussian random samplin...
05/24/2019 ∙ by Ben Adcock, et al. ∙ 0

• ### Randomness and isometries in echo state networks and compressed sensing

Although largely different concepts, echo state networks and compressed ...
02/05/2018 ∙ by Ashley Prater-Bennette, et al. ∙ 0

• ### Dynamic Compressed Sensing for Real-Time Tomographic Reconstruction

Electron tomography has achieved higher resolution and quality at reduce...
05/04/2020 ∙ by Jonathan Schwartz, et al. ∙ 0

• ### Online Adaptive Statistical Compressed Sensing of Gaussian Mixture Models

A framework of online adaptive statistical compressed sensing is introdu...
12/26/2011 ∙ by Julio Duarte-Carvajalino, et al. ∙ 0

• ### Ring artifacts correction in compressed sensing tomographic reconstruction

We present a novel approach to handle ring artifacts correction in compr...
02/05/2015 ∙ by Pierre Paleo, et al. ∙ 0

• ### Semi-device-dependent blind quantum tomography

Extracting tomographic information about quantum states is a crucial tas...
06/04/2020 ∙ by Ingo Roth, et al. ∙ 0

• ### Derandomizing compressed sensing with combinatorial design

Compressed sensing is the art of reconstructing structured n-dimensional...
12/19/2018 ∙ by Peter Jung, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## I Introduction

As increasingly large and complex quantum devices are being built and the development of fault tolerant quantum computation is moving forward, it is critical to develop tools to refine our control of these devices. For this purpose, several improved methods for characterizing quantum processes have been developed in recent years.

These improvements can be grouped into two broad categories. The first category includes techniques such as randomised benchmarking (RB) Knill et al. (2008); Magesan et al. (2012, 2011); Wallman et al. (2015); Wallman (2017); Helsen et al. (2017); Wallman and Flammia (2014) and gate set tomography (GST) Blume-Kohout et al. (2013), which are more robust to state preparation and measurement (SPAM) errors. These techniques work by performing long sequences of random quantum operations, measuring their outcomes, and checking whether the resulting statistics are consistent with some physically-plausible model of the system. In this way, one can characterise a quantum gate in terms of other quantum gates, in a way that is insensitive to SPAM errors.

The second category Flammia et al. (2012); Baldwin et al. (2014); Kliesch et al. (2016, 2017); Holzäpfel et al. (2015) provides more detailed tomographic information. It includes techniques such as compressed sensing Gross et al. (2010); Gross (2011); Liu (2011); Shabani et al. (2011); Kalev et al. (2015); Kueng (2015); Kabanava et al. (2015), matrix product state tomography Cramer et al. (2010); Lanyon et al. (2017)

, and learning of local Hamiltonians and tensor network states

da Silva et al. (2011); Landon-Cardinal and Poulin (2012). These methods exploit the sparse, low-rank or low entanglement structure that is present in many of the physical states and processes that occur in nature. These techniques are less resource-intensive than conventional tomography, and therefore can be applied to larger numbers of qubits. Convex optimization techniques, such as semidefinite programming, are then used to reconstruct the underlying quantum state or process.

A recent line of work Kimmel et al. (2014); Kimmel and Liu (2017a) has attempted to unify these two approaches to a quantum process tomography scheme, that is both robust to SPAM errors, and can handle large numbers of qubits (provided the quantum process has some suitable structure). To achieve this goal, it turns out that the proper design of the measurements is crucial. SPAM-robust methods such as randomised benchmarking are known to require some kind of computationally-tractable group structure, such as that found in the Clifford group. Clifford gates are motivated by their abundant appearance in many practical applications, such as fault-tolerant quantum computing Nielsen and Chuang (2010); Magesan et al. (2011).

In contrast, compressed sensing methods typically require measurements with less structure in this context, in that their

th-order moments are close to those of the uniform Haar measure. Thus, the key technical question is whether the seemingly conflicting requirements of sufficient randomness and desired structure in the measurements can be combined.

In this work, we show that the answer is indeed yes. In layman’s terms, we demonstrate that Clifford-group based measurements are also sufficiently unstructured that they can be used for compressed sensing. Thus, we develop methods for quantum process tomography that are resource efficient, robust with respect to SPAM and other errors, and use measurements that are already routinely acquired in many experiments.

In more detail, we provide procedures for the reconstruction from so-called average gate fidelities (AGFs), which are the quantities that are measured in randomised benchmarking. It was established that the unital part of general quantum channels can be reconstructed from AGFs relative to a maximal linearly independent subset of Clifford group operations Kimmel et al. (2014). We generalise this result by noting that the Clifford group can be replaced by an arbitrary unitary -design and also explicitly provide an analytic form of the reconstruction.

Our main result is a practical reconstruction procedure for quantum channels that are close to being unitary. Let be the Hilbert space dimension, so that a unitary quantum channel can be described by roughly scalar parameters. The protocol is rigorously guaranteed to succeed using essentially order of

AGFs with respect to randomly drawn Clifford gates, and we also prove it to be stable against errors in the AGF estimates. In this way we generalise a previous recovery guarantee

Kimmel and Liu (2017a) from AGFs with -designs to ones with the more relevant Clifford gates.

Conversely, we prove that the sample complexity of our reconstruction procedure is optimal in a simplified measurement setting. Here, we assume that independent copies of the channel’s Choi state are measured and use direct fidelity estimation Flammia and Liu (2011); da Silva et al. (2011) and information theoretic arguments Flammia et al. (2012) to show that the dimensional scaling of our reconstruction error is optimal up to log-factors. As a side result, we also find a new interpretation of the unitarity Wallman et al. (2015) – a figure of merit that captures the coherence of noise. We show that this quantity can be estimated directly from AGFs, rather than simulating purity measurements Wallman et al. (2015).

In summary, we provide a protocol for quantum process tomography that fulfils all of the following desiderata:

1. [label=()]

2. It should be based on physically reasonable and feasible measurements,

3. make use of them in a sample optimal fashion,

4. exploit structure of the expected/targeted channel (here low Kraus rank reflecting quantum gates), and

5. be stable against SPAM and other possible errors.

In this sense, we expect our scheme to be of high importance and practically useful in actual experimental settings in future quantum technologies Acin et al. (2017). It adds to the information obtained from mere randomised benchmarking in that it provides actionable advice, especially regarding coherent errors. Such advice is particularly relevant for fault tolerant quantum computation: Refs. Kueng et al. (2015a); Wallman (2015) indicate that it is coherent errors that lead to an enormous mismatch between average errors, which are estimated by randomised benchmarking, and worst-case errors, reflected by fault tolerance thresholds.

Our main technical contributions are results for the second and fourth moments of AGF measurements with random Clifford gates. For the second moment we provide an explicit formula improving over the previous lower bound Kimmel and Liu (2017a). In the case of trace-preserving and unital maps, our analysis gives rise to a tight frame condition. In order to prove a bound on the fourth moment, we derive – as a more universal new technical tool – a general integration formula for the fourth-order diagonal tensor representation of the Clifford group. The proof builds on recent results on the representation theory of the multi-qubit Clifford group Zhu et al. (2016); Helsen et al. (2016); Gross et al. (2017). Our result is the Clifford analogue to Collins’ integration formula for the unitary group Collins (2003); Collins and Sniady (2009) for fourth orders, which we expect to also be useful in other applications. In the following, we present the precise formulation of our results. The proofs and technical contributions are given in Section IV.

## Ii Main results

A linear map from the set of Hermitian operators on a -dimensional Hilbert space to itself is referred to as map. A quantum channel is a completely positive map that in addition preserves the trace of a Hermitian operator and, thus, maps quantum states to quantum states. A map is unital if the identity operator (equivalently, the maximally mixed state) is a fixed point of the map. We define the average gate fidelity (AGF) between a map and a quantum gate (i.e. a unitary quantum channel)

associated with a unitary matrix

as

 Favg(U,X)=∫dψ⟨ψ|U†X(|ψ⟩⟨ψ|)U|ψ⟩, (1)

where the integral is taken according to the uniform (Haar) measure on state vectors.

The Clifford group constitutes a particularly important family of unitary gates that feature prominently in state-of-the-art quantum architectures. Moreover, it was shown that for many-qubit systems (i.e. ), any unital and trace-preserving map is fully characterised by its AGFs (1) with respect to the Clifford group Kimmel et al. (2014). A detailed analysis of the geometry of unital channels was previously given in Ref. Mendl and Wolf (2009). There, it was shown that a quantum channel is unital if and only if it can be written as an affine combination of unitary gates. (Affine here means that the expansion coefficients sum to . Unlike convex combinations, they are however not restrict to being non-negative.) Motivated by the result for Clifford gates, one can ask more generally: What are the sets of unitary gates that span the set of unital and trace-preserving maps?

A general answer to this question can be given using the notion of unitary -designs. Unitary -designs Dankert et al. (2009); Gross et al. (and their state-cousins, spherical -designs Delsarte et al. (1977); Renes et al. (2004), respectively) are discrete subsets of the unitary group (resp. complex unit sphere) that are evenly distributed in the sense that their average reproduces the Haar (resp. uniform) measure over the full unitary group (resp. complex unit sphere) up to the -th moment. The multi-qubit Clifford group, for example, forms a unitary -design Zhu (2015); Webb (2015); Kueng and Gross (2015). For spherical designs, a close connection between informational completeness for quantum state estimation and the notion of a -design has been established in Ref. Renes et al. (2004), see also Refs. Scott (2006); Appleby (2005); Gross et al. (2015). A similar result holds for quantum process estimation, and is the starting point of our work. Indeed, the following is essentially due to Ref. Scott (2008). We give a concise proof in form of the slightly more general Theorem 39 in Section IV.6.

###### Proposition 1 (Informational completeness and unitary designs).

Let be the gate set of a unitary -design, represented as channels. Every unital and trace-preserving map can be written as an affine combination of the ’s. The coefficients are given by , where .

Hence, every unital and trace-preserving map is uniquely determined by the AGFs with respect to an arbitrary unitary -design.

Clifford gates are a particularly prominent gate set with this 2-design feature. However, its cardinality scales super-polynomially in the dimension . For explicit characterisations, this is far from optimal. However, in certain dimensions there exist subgroups of the Clifford group with cardinality proportional to that also form a 2-design Chau (2004); Gross et al. . More generally, order of Clifford gates drawn i.i.d. uniformly at random are an approximate -design Ambainis et al. (2009). From Proposition 1, we expect that such randomly generated approximate -designs yield approximate reconstruction schemes for unital channels.

Our main result focuses on the particular task of reconstructing multi-qubit unital channels that are close to being unitary, i.e. well-approximated by a channel of Kraus rank equal to one. Techniques from low-rank matrix reconstruction Fazel et al. (2001); Gross et al. (2010); Gross (2011); Flammia et al. (2012); Kabanava et al. (2015); Baldwin et al. (2014) allow for exploiting this additional piece of information in order to reduce the number of AGFs required to uniquely reconstruct an unknown unitary gate.

Suppose we are given a list of AGFs

 fi=Favg(Ci,X)+ϵi (2)

– possibly corrupted by additive noise – between the unknown unitary gate and Clifford gates that are chosen uniformly at random. In order to reconstruct from these observations, we propose to perform a least-squares fit over the set of unital quantum channels, i.e.

 minimisem∑i=1(Favg(Ci,Z)−fi)2subject toZ is a % unital quantum channel. (3)

We emphasise that this is an efficiently solvable convex optimisation problem. The feasible set is convex since it is the intersection of an affine subspace (unital and trace-preserving maps) and a convex cone (completely positive maps).

Valid for multi-qubit gates (

), our second main result states that this reconstruction procedure is guaranteed to succeed with (exponentially) high probability, provided that the number

of AGFs is proportional (up to a

-factor) to the number of degrees of freedom in a general unitary gate. The error of the reconstructed channel is measured with the Frobenius norm in Choi representation

, see Section IV for details. Here, we give a concise statement for the case of unitary gates. A more general version – Theorem 19 in Section IV – shows that the result can be extended to cover approximately unitary channels.

###### Theorem 2 (Recovery guarantee for unitary gates).

Fix the dimension . Then,

 m≥cd2log(d) (4)

noisy AGFs with randomly chosen Clifford gates suffice with high probability (of at least ) to reconstruct any unitary quantum channel via (3). This reconstruction is stable in the sense that the minimiser of (3) is guaranteed to obey

 ∥∥Z♯−X∥∥≤~Cd2√m∥ϵ∥ℓ2. (5)

The constants are independent of .

We note the following:

1. [nosep,leftmargin=0em,labelwidth=*,align=left,label=()]

2. Eq. (5) shows the protocol’s inherent stability to additive noise. This stability, combined with the robustness of randomised benchmarking against SPAM errors, results in an estimation procedure that is potentially more resource-intensive, but considerably less susceptible to experimental imperfections and systematic errors than many other reconstruction protocols Flammia and Liu (2011); Flammia et al. (2012); Kliesch et al. (2017).

3. The proof can be verbatim adapted to an optimisation of the -norm instead of the -norm in Eq. (3), resulting in a slightly stronger error bound.

4. The theorem achieves a quadratic improvement (up to a -factor) over the minimal number of AGFs required for a naive reconstruction via linear inversion for the case of noiseless measurements. But what is the number of measurements required to obtain the AGFs and to suppress the effect of the measurement noise in the reconstruction error (5)? For randomised benchmarking setups a fair accounting of all involved errors is beyond the scope of the current work. But in order to show that the scaling of the noise term in our reconstruction error (5) is essentially optimal, we consider the conceptually simpler measurement setting where the channel’s Choi state is measured directly. In Section IV.5 we prove upper and lower bounds to the minimum number of channel uses sufficient for a reconstruction via Algorithm (3) with reconstruction error (5) bounded by . This number of channel uses scales as up to log-factors. The upper bound relies on direct fidelity estimation Flammia and Liu (2011). In order to establish a lower bound we extend information theoretic arguments from Ref. Flammia et al. (2012) to rank- measurements.

5. Finally, we note that the reconstruction (3) can be practically calculated using standard convex optimization packages. A numerical demonstration is shown in Figure 1 and discussed in more detail in Section IV.8. There we also show that measuring AGFs with respect to Clifford unitaries seems to be comparable to Haar-random measurements, even in the presence of noise. This confirms an observation that was already mentioned in Ref. Kimmel and Liu (2017a).

The proof of Theorem 2 is presented in Section IV.4. The AGFs can be interpreted as expectation values of certain observables, which are unit rank projectors onto directions that correspond to elements of the Clifford group. In contrast, most previous work on tomography via compressed sensing feature observables that have full rank, e.g. tensor products of Pauli operators. Since we now want to utilize observables that have unit rank, a different approach is needed. One approach, developed by a subset of the authors in Kimmel and Liu (2017a) is to use strong results from low rank matrix reconstruction and phase retrieval Candès et al. (2013); Candès and Li (2014); Gross et al. (2015); Kueng et al. (2015b); Kabanava et al. (2015). These methods Kueng et al. (2015b); Kabanava et al. (2015) require measurements that look sufficiently random and unstructured, in that their th-order moments are close to those of the uniform Haar measure. The multi-qubit Clifford group, however, does constitute a 3-design, but not a 4-design. In Ref. Kimmel and Liu (2017a) this discrepancy is partially remedied by imposing additional constraints (a “non-spikiness condition”, see also Ref. Krahmer and Liu (2018)) on the unitary channels to be reconstructed. In turn, their result also required these constraints to be included in the algorithmic reconstruction which renders the algorithm impractical 111The cardinality of the Clifford group grows superpolynomially in the Hilbert space dimension . Therefore, the non-spikiness with respect to the Clifford group quickly corresponds to a demanding number of constraints. In fact, about and constraints are already required for -qubits and -qubits, respectively.. Moreover, important classes of channels, e.g. Pauli channels, do in general not satisfy this condition. Here, we overcome these issues by appealing to recent works that fully characterise the fourth moments of the Clifford group Zhu et al. (2016); Helsen et al. (2016). In order to apply these results, we develop an integration formula for fourth moments over the Clifford group. This formula is analogous to the integration over the unitary group know as Collins’ calculus with Weingarten functions Collins (2003); see Section IV.1. Equipped with this new representation theoretic technique we show in Section IV.3 that the deviation of the Clifford group from a unitary 4-design is – in a precise sense – mild enough for the task at hand.

Our final result addresses the unitarity of a quantum channel. Introduced by Wallman et al. Wallman et al. (2015), the unitarity is a measure for the coherence of a (noise) channel . It is defined to be the average purity of the output states of a slightly altered channel 222 is defined so that and for all traceless .

 u(E)=∫dψTr(E′(|ψ⟩⟨ψ|)†E′(|ψ⟩⟨ψ|)) (6)

that flags the absence of trace-preservation and unitality. The unitarity can be estimated efficiently by using techniques similar to randomised benchmarking Feng et al. (2016). It is also an important figure of merit when one aims to compare the AGF of a noisy gate implementation to its diamond distance Kueng et al. (2015a); Wallman (2015) – a task that is important for certifying fault tolerance capabilities of quantum devices.

Although useful, the existing definition of the unitarity (6) is arguably not very intuitive. Here, we try to (partially) amend this situation by providing a simple statistical interpretation:

###### Theorem 3 (Operational interpretation of unitarity).

Let be the gate set of a unitary 2-design. Then, for all hermicity preserving maps

 (7)

where the variance is computed with respect to

drawn randomly from the unitary 2-design.

The proof of the theorem is given in Section IV.6. Note that the variance is taken with respect to unitaries drawn from the unitary 2-design and not the variance of the average fidelity with respect to the input state as calculated, e.g. in Ref. Magesan et al. (2011).

## Iii Conclusion and outlook

In this work we address the crucial task of characterising quantum channels. We do so by relying on AGFs of the quantum channel of interest with simple-to-implement Cliffords. More specifically, we start by noting that (i) the unital part of any quantum channel can be written in terms of a unitary -design with expansion coefficients given by AGFs. As a consequence, for certain Hilbert space dimensions , the unital part can be reconstructed from AGFs with Clifford group operations by a straight-forward and stable expansion formula. (ii) As the main result, we prove for the case of unitary gates that the reconstruction can be practically done using only essentially order of random AGFs with Clifford gates. In a simplified measurement setting, we show that this setting is provably resource optimal in terms of the number of channel invocations. For the proof, we derive a formula for the integration of fourth moments over the Clifford group, which is similar to Collins’ calculus with Weingarten functions. This integration formula might also be useful for other purposes. (iii) We prove that the unitarity of a quantum channel, which is a measure for the coherence of noise Wallman et al. (2015), has a simple statistical interpretation: It corresponds to the variance of the AGF with unitaries sampled from a unitary -design.

The focus of this work is on the reconstruction of quantum gates. Here, the assumption of unitarity considerably simplifies the representation-theoretic effort for establishing the fourth moment bounds required for applying strong existing proof techniques from low rank matrix recovery. These extend naturally to higher Kraus ranks and we leave this generalisation to future work. Existing results Kueng et al. (2016a, b) indicate that the deviation of the Clifford group from a unitary 4-design may become more pronounced when the rank of the states/channels in question increases. This may lead to a non-optimal rank-scaling of the required number of observations . In fact, a straightforward extension of Theorem 2 to the Kraus rank- case already yields a recovery guarantee with a scaling of .

Practically, it is important to explore how this protocol behaves when applied to data obtained from interleaved randomised benchmarking experiments. In Ref. Kimmel et al. (2014), the authors show how to use interleaved randomised benchmarking experiments to measure the AGF between a known Clifford and the combined process of an unknown gate concatenated with the average Clifford error process. In order to obtain tomographic information about the isolated unknown gate, the authors had to do a linear inversion of the average Clifford error. However, in most cases, we expect the average Clifford error to be close to a depolarizing channel which has very high rank. Thus, building on our intuition obtained for quantum states Riofrio et al. (2017) and using our techniques, we could obtain a low-rank approximation to the combined unknown gate and average Clifford error, which under the assumption of a high rank Clifford error, would naturally pick out the coherent part of the unknown gate.

## Iv Details and proofs

In this section we provide proofs and further details of the results of the work. Section IV.1IV.3 develop the prerequisites to prove the recovery guarantee, Theorem 2, in Section IV.4. The optimality of this result is addressed in Section IV.5. The expansion of unital maps in terms of a unitary -design, Proposition 1, is derived in Section IV.6. In Section IV.7, we show that the unitarity of a hermiticity preserving map can be expressed as the variance of its average gate fidelity with respect to a unitary -design. We also discuss possible implications. Finally, Section IV.8 provides further details of the numerical demonstration of the protocol.

We start by specifying the notation that is used subsequently. For a vector space we denote the space of its endomorphisms by . In particular, let denote the space of hermitian operators on a -dimensional complex Hilbert space. We label the vector space of endomorphisms on by and denote its elements with calligraphic letters. For every map , we define its adjoint with respect to the Hilbert-Schmidt inner product on . We denote the subset of completely positive maps by . Quantum channels are elements of that are trace preserving (TP), i.e.  for all

. This condition is equivalent to the identity matrix

being a fixed point of the adjoint channel, . Similarly, a map (or channel) that itself has the identity as a fixed-point, , is called unital. The affine subspace of TP and unital maps is denoted by . We further denote the linear hull of by .

Most of our results feature a norm on , which is naturally induced on by the average gate fidelity (AGF) (1) in the following way. We define the inner product on as

 (X,Y)=d+1dFavg(X,Y)−1d2(X(Id),Y(Id)) (8)

and denote the induced norm on by . The pre-factors are chosen such that unitary channels have unit norm.

Note that this inner product is proportional to the previously defined Hilbert-Schmidt inner product applied to the Choi and Liouville representations:

 (X,Y)=(J(X),J(Y))=1d2(L(X),L(Y)), (9)

see Refs. Horodecki et al. (1999); Nielsen (2002) and also (Kueng et al., 2015a, Proposition 1). We choose the convention that Choi matrices of quantum channels have unit trace, i.e. . Furthermore, for we will encounter the Schatten norms , and , where

denotes the maximum eigenvalue of a Hermitian matrix

. For a vector and the -norm is defined by .

For a map

we define the random variable

 ST=d2(T,U) (10)

where is a unitary channel with either chosen uniformly at random from the full unitary group , or the Clifford group , depending on the context. The main technical ingredients for the the proofs of our main results are an expression for the second and fourth moment of . To this end, an integration formula for the first four moments over the Clifford group is developed in Section IV.1. We then derive an explicit expression for the second moment of in Section IV.2 and an upper bound on the fourth moment of in Section IV.3. These bounds are essential prerequisites for applying strong techniques from low-rank matrix reconstruction to prove our recovery guarantee, Theorem 2, for unitary gates in Section IV.4.

### iv.1 An integration formula for the Clifford group

One of the main technical ingredients of the proof is an explicit formula for integrals of the diagonal action of the Clifford group . More precisely, for a unitary representation of a subgroup carried by a vector space , we define (“twirling”) as

 ER(A)=∫GR(g)AR(g)†dμ(g), (11)

where is the invariant measure induced by the Haar measure on .

For we denote the diagonal action of a subgroup of by , i.e.

 ΔnG:U↦U⊗…⊗Un times. (12)

Note that if is a subgroup of the unitary group then is a unitary representation. The main result of this chapter is an explicit expression for for arbitrary .

For , where the integration is carried out over the entire unitary group, an explicit formula was derived in Refs. Collins (2003); Collins and Sniady (2009). It is instructive to review the result of Ref. Collins and Sniady (2009) and its proof first. Our derivation of the analogous expression for the Clifford group follows the same strategy and makes use of many of the intermediate results.

#### iv.1.1 Integration over the unitary group U(d)

To state the result we have to introduce notions from the representation theory of which can be found, e.g., in Refs. Collins and Sniady (2009); Goodman and Wallach (2009); Fulton and Harris (1991); Collins (2003). Schur-Weyl duality relates the irreducible representations of the diagonal action of to the irreducible representations of the natural action of the symmetric group on . Recall that the representation decomposes into irreducible representations labelled by partitions of into integers, i.e. . For short, we denote a partition of by and dimensions of the Weyl-modules by .

Let be an orthonormal basis of . We define the representation by linearly extending

 πdSn(τ):|i1⟩⊗…⊗|ik⟩↦∣∣iτ−1(1)⟩⊗…⊗∣∣iτ−1(k)⟩. (13)

The irreducible representations of , are also labelled by partitions . The dimensions of the Specht-modules are denoted by . Since the actions of and commute, they induce a representation of on that decomposes into irreducible representations as follows:

###### Theorem 4 (Schur-Weyl decomposition).

The action of on is multiplicity free and decomposes into irreducible components as

 (Cd)⊗n≅⨁λ⊢n,l(λ)≤dWλ⊗Sλ (14)

on which acts as .

We denote the orthogonal projections on by and the character on the irreducible representation of by . The orthogonal projectors can be written as

 Pλ=dλn!∑σ∈Snχλ(σ)πdSn(σ), (15)

see, e.g. Ref. (Wigner, 1959, Eq. (12.10)). In terms of these projectors can be calculated using the following theorem.

###### Theorem 5 (Integration over the unitary group U(d)).

Let . Then, for and ,

 EΔnU(d)(A)=1n!∑τ∈SnTr(AπdSn(τ))πdSn(τ−1)∑λ⊢n, l(λ)≤ddλDλPλ. (16)

This formula differs slightly from the original statement presented in Ref. Collins and Sniady (2009). The more common formulation presented there follows from evaluating the expression of Theorem 5 using a standard tensor basis of 333This way of stating the result of Ref. Collins and Sniady (2009) was brought to our attention by study notes of K. Audenaert. However, here we have opted for a presentation of Theorem 5 that is easier to generalise beyond the full unitary group.

In the remainder of this section, we present a proof of Theorem 5 following the strategy of Ref. Collins and Sniady (2009). The commutant of a subset is the subset of defined by

 Comm(A)={B∈L(V)∣BA=AB∀A∈A}. (17)

It is straight-forward to verify the following well-known properties of :

###### Lemma 6 (Properties of Er).

Let be a unitary representation of a subgroup . Then, for all and , the map (defined in Eq. (11)) fulfils

 Tr(ER(A))= Tr(A), (18) ER(AB)= ER(A)B, (19) ER(A)∈ Comm(R(G)). (20)

The last statement of Lemma 6 implies that is in the commutant of for all . Using the decomposition of Theorem 4 and Schur’s Lemma we therefore conclude that acts as the identity on the Weyl-modules,

 EΔnU(d)(A)=∑λ⊢n,l(λ)≤dIdDλ⊗Eλ (21)

with . In general, the direct sum of endomorphisms acting on the irreducible representations of a group is isomorphic to the group ring which consists of formal (complex) linear combinations of the group elements (Fulton and Harris, 1991, Propositon 3.29). We denote the group ring of by .

To derive an explicit expression of the coefficient of the expansion of in , we introduce the map

 Φ(A)=∑σ∈SnTr(AπdSn(σ−1))πdSn(σ). (22)

We will make use of the following properties of the map .

###### Lemma 7 (Properties of Φ).

For all and

 Φ(A)= Φ(EΔnU(d)(A)), (23) Φ(B)= BΦ(Id), (24) Φ(Id)−1= 1n!∑λ⊢n,l(λ)≤ddλDλPλ. (25)
###### Proof.
1. Since is in for all , we can apply Lemma 6 to get

 Tr(EΔnU(d)(A)πdSn(σ−1)) =Tr(EΔnU(d)(AπdSn(σ−1))) (26) =Tr(AπdSn(σ−1)),

which establishes the first statement.

2. Since the commutant is isomorphic to the group ring, it suffices to proof the statement for all with . In this case, using the cyclicity of the trace for the first equality, we find

 Φ(πdSn(τ)) =∑σ∈SnTr(πdSn(σ−1)πdSn(τ))πdSn(σ) (27) =∑σ∈SnTr(πdSn(τσ−1))πdSn(σ) =∑σ∈SnTr(πdSn(σ−1))πdSn(στ) =πdSn(τ)∑σ∈SnTr(πdSn(σ−1))πdSn(σ).

Here we have used that for all .

3. Using Theorem 4 (Schur-Weyl duality), we can rewrite as

 Φ(Id) =∑σ∈SnTr(πdSn(σ−1))πdSn(σ) (28) =∑σ∈Sn∑λ⊢n,l(λ)≤dDλTr(πλ(σ−1))πdSn(σ) =∑λ⊢n,l(λ)≤dDλ∑σ∈Snχλ(σ)πdSn(σ).

The explicit expression (15) for the projectors identifies as

 Φ(Id)=n!∑λ⊢n,l(λ)≤dDλdλPλ. (29)

Since the are a complete set of orthogonal projectors, the inverse of is given by

 Φ(Id)−1=1n!∑λ⊢n,l(λ)≤ddλDλPλ. (30)

We are now in position to give a concise proof of Theorem 5:

###### Proof of Theorem 5.

From Eqns. (23) and (24) we conclude and, thus, . Inserting the expression (25) for and the definition (22) of yields the expression of the theorem. ∎

#### iv.1.2 Integration over the Clifford group

We now turn our attention to the Clifford group and aim at an analogous result to Theorem 5 for with . As the former result for the unitary group, the result for the Clifford group heavily relies on a characterisation of the commutant of . The required results for the Clifford group were derived in Ref. Zhu et al. (2016) and apply to multi-qubit dimensions . This paper introduces the orthogonal projection

 Q=1d2d2∑k=1W⊗4k (31)

where are the multi-qubit Pauli matrices. In fact, the -dimensional range of forms a particular stabiliser code. We denote by the orthogonal projection onto the complement of this stabiliser code. The orthogonal projection commutes with every , . Thus, acts trivially on the Specht modules in the Schur-Weyl decomposition (14). Following the notation conventions from Ref. Zhu et al. (2016), we denote the subspace of the Weyl module that intersects with the range of by and its dimension as . Analogously, the orthogonal complement of shall be with dimension . We are now ready to state the main result of this section.

###### Theorem 8 (Integration over the Clifford group Cl(d)).

Let . Then,

 EΔ4Cl(d)(A)=14!∑λ⊢4,l(λ)≤ddλ∑σ∈S4×[1D+λTr(AQπdS4(σ−1))Q+1D−λTr(AQ⊥πdS4(σ−1))Q⊥]×πdS4(σ)Pλ. (32)

To set-up the proof we summarise the necessary results of Ref. Zhu et al. (2016) in the following theorem:

###### Theorem 9 (Representation theory of the Clifford group Zhu et al. (2016)).

Whenever are non-trivial, the action of on is multiplicity free and decomposes into irreducible components

 (Cd)⊗4≅⨁λ⊢4,l(λ)≤d(W+λ⊗Sλ)⊕(W−λ⊗Sλ), (33)

on which acts as .

The dimensions of are of polynomials in of degree and the dimensions of are either vanishing or polynomials in of degree .

From Theorem 9 we learn that an element of the commutant of the diagonal action of the Clifford group can be written in the form

 B=Q⨁λ⊢4,l(λ)≤d(IdDλ⊗B+λ)+Q⊥⨁λ⊢4,l(λ)≤d(IdDλ⊗B−λ), (34)

where are linear operators acting on the Specht modules .

To expand elements of , we define the map , with from (22). The map has properties comparable to the map , but is adapted to the diagonal representation of the Clifford group.

###### Lemma 10.

For all and

 ~Φ(A)= ~Φ(EΔ4Cl(d)(A)), (35) ~Φ(B)= B~Φ(Id), (36) ~Φ(Id)−1= 14!∑λ⊢4,l(λ)≤ddλPλ[1D+λQ+1D−λQ⊥]. (37)
###### Proof.
1. Since and are in for all , we can again apply Lemma 6 to get and likewise for instead of . Inserting this in the definition of yields the first statement.

2. From the expansion of elements in (34), we conclude that can be expressed as , where and are in the group ring . Hence, it suffices to show the statement, , for and . In the first case, we find

 ~Φ(QπdS4(σ)) =Φ(QπdS4(σ))Q (38) =Φ(QId)QπdS4(σ) =~Φ(Id)QπdS4(σ),

where property (19) from Lemma 6 has been used in the second step. The proof of is analogous.

3. Using the decomposition (33) of Theorem 9, we can calculate

 ~Φ(Id)=∑λ⊢4,l(λ)≤d∑σ∈S4χπdS4(σ−1)πdS4(σ)×[D+λQ+D−λQ⊥λ]=4!∑λ1dλPλ[D+λQ+D−λQ⊥], (39)

where the last line follows again from the expression (15) for the projectors. Inverting this expression yields

 ~Φ(Id)−1=14!∑λdλPλ[1D+λQ+1D−λQ⊥]. (40)

With these statements for the Clifford group at hand, we can proceed to prove Theorem 8.

###### Proof of Theorem 8.

Eq. (35) in Lemma 10 and 36 in Lemma 10 can be combined to conclude and, thus, . The expression for was derived in Lemma 10, Eq. (37). Together with the definition of the expression of the theorem follows after some simplification. ∎

### iv.2 The second moment

The main result of this section is the following expression for the second moment of defined in Eq. (10). We shall use this statement multiple times in the proofs of our main results.

###### Lemma 11 (The 2-nd moment for U(d)).

Let be a map. Then

 EU∼Haar(U(d))[S2T] (41) =1d2−1{d2∥T∥2+Tr(T(Id))2 −1d(∥T(Id)∥22+∥∥T†(Id)∥∥22)},

for defined in Eq. (10).

For trace-annihilating and -annihilating maps, one arrives at a much simpler expression:

###### Corollary 12 (Expression for trace-annihilating and Id-annihilating maps).

Let be a map that is trace-annihilating and -annihilating. Then the second moment of is

 EU∼Haar(U(d))[S2T]=d2d2−1∥T∥2. (42)
###### Proof.

This follows directly from Lemma 11 and the observation that being trace-annihilating translates to and and being -annihilating further requires . ∎

Before proving Lemma 11, we derive a general expression for the -th moment of . To this end, recall that by Choi’s theorem an endomorphism of (i.e. a hermiticity preserving map) can be decomposed as

 T(X)=r∑i=1λiTiXT†i, (43)

where and