# Approximating the average of a rational function with respect to the Haar measure

Suppose I have a state $$|\psi\rangle = U|0\rangle$$ where $$U$$ is a $$d$$-dimensional unitary sampled uniformly with respect the Haar measure. I'm interested in computing or approximating analytically an average quantity of the form

$$\mathbb{E}_{U \sim U(d)} \left[ \frac{|\psi_i|^2}{|\psi_i|^2 + |\psi_j|^2} \right] = \int_{U(d)} \frac{|U_{i0}|^2}{|U_{i0}|^2 + |U_{j0}|^2} \mu(dU) \tag{1}$$ for some $$0 \leq i,j \leq d-1$$ and $$\mu(dU)$$ denotes the Haar measure. What are possible ways to compute or approximate this?

I figured one possibility is to take the limit $$d \rightarrow \infty$$ and then use a Gaussian approximation for $$\psi_j$$ (as explained in the answer to this question, for example). However I am a bit concerned about singularities in this polynomial making it an ill-defined computation somehow.

Are there other approaches? Alternatively a reference for explicit computation of rational polynomials of the form of (1) would be appreciated.

• Assuming $\sum_i|\psi_i|^2 = 1 \implies |\psi_i|^2>0 \forall i$. Where do you expect to observe a singularity? May 12 at 20:24
• That implication is not necessarily true when $d > 1$ May 12 at 21:35

The integrand in the above equation corresponds to an observable. Representing that observable in the Pauli basis can, in general, be performed by $$\mathcal{O} \mapsto \frac{1}{2^n}\sum_{i}Tr(\mathcal{O}P_i^n)P_i^n$$

Where $$P_i^n \in \{I, X, Y, Z\}^n$$. Once you've found the set of $$P_{\mathcal{O}} = \{P_i^n | Tr(P_i^n\mathcal{O}) \neq 0\}$$, then you need to find a set of unitary transformations that map commuting subgroups of $$P_G \subset P_{\mathcal{O}}$$ to a set of single qubit Z measurements, i.e. $$UP_GU^{\dagger} = \{ZI\cdots I,IZI\cdots I,\cdots, I\cdots Z\}$$.

For the measure, this corresponds to state preparation choice. You can find circuits that are prepared by a Haar random unitary in qiskit, to perform the expectation value, simple append the state prep circuit with the above unitary transformation and repeatedly measure and gather statistics!

• "The integrand in the above equation corresponds to an observable. " - it does? I thought that observables $\text{Tr}( O | \psi\rangle\langle \psi|^{\otimes k})$ were $k$-th order polynomial in $\psi_i,\bar{\psi}_i$, not rational. May 12 at 18:12
• Good question. Maybe my reply was too hasty. I have also a question about the form of the rational integrand. If $U_i$ are unitary, then wouldn't $|U_i|^2 = U_i^\dagger U_i = I$? May 12 at 20:26
• the $U_{i0}$ is the $i$-th element of the first column of $U$, $U_{i0}$ could be zero for some choices of $i$ May 12 at 21:37