Background
Conjugating an operator by a unitary, the map \(A \mapsto U A U^\dagger\), rotates it inside the space of matrices without changing its eigenvalues. The first moment asks what is left of this operator after we average the rotation over every unitary with equal weight, which is what the Haar measure prescribes. Because the average treats all directions alike, it cannot retain any information that singles out a basis, and the only quantity that survives an arbitrary rotation is the trace.
This forces the answer to be a multiple of the identity, and matching traces on both sides fixes the multiple. The result is \(\mathbb{E}_U[U A U^\dagger] = \frac{\mathrm{Tr}(A)}{D}\,I\), where \(D\) is the dimension. Read as a physical process this is complete depolarization, where the averaged rotation drives any input toward the maximally mixed state while keeping its normalization. Read through representation theory it is Schur’s lemma, since an operator commuting with every unitary must be proportional to the identity.
In the language of the Weingarten calculus this is the \(k=1\) case, the simplest instance of a general rule that turns Haar averages into sums over permutations. Here there is only one permutation to sum, so the combinatorics stays invisible, yet the same logic organizes every higher moment that follows. The identity also names the operation called twirling, which recurs whenever one averages a fixed observable against a randomly chosen frame.
The notebook puts the formula to work on \(\mathbb{E}_U[\mathrm{Tr}(U A U^\dagger B)]\), a contraction of the rotated operator against a second fixed matrix \(B\). Pulling the average inside the trace and applying the identity collapses the expression to a product of two traces divided by \(D\), so all correlation between \(A\) and \(B\) is washed out.
Mathematical background
The first moment is the simplest Weingarten average. Averaging a single conjugation over the Haar measure gives
\[
\int_{U(D)} U X U^\dagger\, d\mu(U) = \frac{\mathrm{Tr}(X)}{D}\,\mathbb{I}
\]
for any operator \(X\). The reason is Schur’s lemma. Replacing \(U \to VU\) leaves the Haar measure unchanged, so the left-hand side commutes with every \(V \in U(D)\) and must be a multiple of the identity on the irreducible defining representation. Taking the trace of both sides fixes the constant to \(\mathrm{Tr}(X)/D\). Equivalently, the map \(\mathcal{T}(X) = \int U X U^\dagger\, d\mu(U)\) is the projector onto the commutant of the group action, which at first order is one-dimensional and spanned by \(\mathbb{I}\). This is the \(t = 1\) case of the general pattern, where the \(t\)-fold twirl \(\int U^{\otimes t} X\, U^{\dagger\otimes t}\, d\mu\) projects onto the algebra of permutation operators through Schur-Weyl duality. Here that algebra is trivial, so a single Haar average erases everything about \(X\) except its trace.
Solution
Step 2: Evaluate the trace
\[
\mathrm{Tr}\!\left(\frac{\mathrm{Tr}(A)}{D}\, I \cdot B\right) = \frac{\mathrm{Tr}(A)}{D}\, \mathrm{Tr}(B).
\]
Result
\[
\boxed{\mathbb{E}_U\bigl[\mathrm{Tr}(U A U^\dagger B)\bigr] = \frac{\mathrm{Tr}(A)\,\mathrm{Tr}(B)}{D}.}
\]
Interpretation: The Haar average factorizes the product into individual traces, all correlations between \(A\) and \(B\) are erased. Only the “scalar content” (traces) of each operator survives the random rotation. This factorization is the trace-level manifestation of depolarization.