# Haar measure : trace of an operator squared and square of the trace of an operator

From doing numerical simulations, I seem to have the following results : $$\int d \rho \,\, \text{Tr}(\rho M^\dagger M) = \frac{1}{d} \text{Tr}(M^\dagger M)$$ and $$\int d \rho \,\, \left|\text{Tr}(\rho M)\right|^2 = \frac{1}{d(d+1)} \left(\text{Tr}(M^\dagger M) + |\text{Tr}(M)|^2 \right)$$

Where $$\int d\rho$$ is the normalized integral over the density matrices of pure states (Haar distribution) and $$M$$ a complex matrix.

However I am quite stumped as to how would one prove that ? Do any of you have any insights ?

Cheers and thanks.

• Weingarten calculus. arxiv.org/abs/2109.14890 In essence, it uses that representations of $U^{\otimes N}$ can be decomposed in terms of irreps of the permutation group -- Schur-Weyl duality. Dec 20, 2022 at 22:42

The first integral can be written as $$\int dU \, \operatorname{tr}(U \rho U^\dagger M^\dagger M) = \operatorname{tr}\left[\left( \int dU\, U\rho U^\dagger \right)M^\dagger M\right],$$ where the integration is performed over the uniform Haar measure in the space of unitaries. You then get the result using the identity $$\int dU\, UX U^\dagger = \frac{\operatorname{tr}(X) I}{d}$$ for any linear operator $$X$$, for the special case of $$\rho$$ pure. This has been discussed and proved multiple times on the site already, see e.g. Density matrices of multiples copies of a single Haar-Random state and links therein.
For the other identity, write the LHS as $$\int dU \operatorname{tr}(U\rho U^\dagger M)^2 = \sum\int dU\, U_{ij} U_{k\ell} \bar U_{mn} \bar U_{pq} \rho_{jn} \rho_{\ell q} M_{mi} M_{pk}$$ where I wrote expliciting the matrix components. Using the formulae to integrate polynomials of the unitary matrices, which you can find e.g. in the Wikipedia page, you have $$\int_{U_d} dU U_{ij} U_{k\ell} \bar U_{mn} \bar U_{pq}= \frac{1}{d^2-1}\left[ (\delta_{im}\delta_{jn} \delta_{kp}\delta_{\ell q} + \delta_{ip}\delta_{jq} \delta_{km}\delta_{\ell n} ) - \frac1d (\delta_{im} \delta_{jq} \delta_{kp}\delta_{\ell n} +\delta_{ip} \delta_{jn} \delta_{km}\delta_{\ell q}) \right]$$ which contracting the indices should give back your expression.
• I really appreciate your solution. Thank you ! I did see the second equation pop out on the website often, and felt like it must appear in the solution, but as I was not very familiar with the Haar measure, I didn't exactly know how to link $\int d\rho$ and $\int dU$, to which your first equation gives an answer to. So thank you again ! Dec 21, 2022 at 10:36