# How to calculate the Haar measure for the middle SU(2), in an SU(3) factorization?

I read this blog https://pennylane.ai/qml/demos/tutorial_haar_measure#deguise2018 regarding a basic introduction to haar measure. In the "show me more math" section, they said $$SU(3)$$ can be decomposed into 3 $$SU(2)s$$ with the middle SU(2) having 2 parameters ($$\omega=\phi$$). I know that a 3-parameter SU(2) has haar measure as:

$$d\mu=\sin\theta \,d\theta \,d\omega \,d\phi$$

But I don't know how they can derive the haar measure of a 2-parameter SU(2) which has the following form:

$$d\mu = \sin\theta \sin^2(\frac{\theta}{2})d\theta d\omega$$

I've read this paper https://arxiv.org/pdf/physics/9708015.pdf about the geometry of SU(3). The invariant volume element or haar measure of SU(3) is calculated by taking the wedge product of 8 invariant one-forms or calculating the determinant of the matrix of coefficients. My unclear point is how to write that wedge product or what that matrix looks like?

Let us consider the $$SU(3)$$ decomposition as such:

Assuming the matrix we create is Haar-random, it means that when it is applied to $$|0\rangle$$ it should yield a Haar-random state. So let's see how this gate acts on $$|0\rangle=\begin{pmatrix}1\\0\\0\end{pmatrix}$$.

Note that each wire in the diagram corresponds to one coefficient of the input vector. For instance, the first gate of the circuit can be written as: $$\newcommand\ket[1]{\left|#1\right\rangle} \newcommand\phase[1]{\mathrm{e}^{\mathrm{i}#1}} \newcommand\negphase[1]{\mathrm{e}^{-\mathrm{i}#1}} \newcommand\halfcos[1]{\cos\left(\frac{#1}{2}\right)} \newcommand\sqhalfcos[1]{\cos^2\left(\frac{#1}{2}\right)} \newcommand\sqsqhalfcos[1]{\cos^4\left(\frac{#1}{2}\right)} \newcommand\halfsin[1]{\sin\left(\frac{#1}{2}\right)} \begin{pmatrix}1&0&0\\0&\negphase{\frac{\varphi_1+\omega_1}{2}}\halfcos{\theta_1}&-\phase{\frac{\varphi_1-\omega_1}{2}}\halfsin{\theta_1}\\0&\negphase{\frac{\varphi_1-\omega_1}{2}}\halfsin{\theta_1}&\phase{\frac{\varphi_1+\omega_1}{2}}\halfcos{\theta_1}\end{pmatrix}$$

Hence, the first gate does not act on the first mode. The second gate is: $$\begin{pmatrix}\negphase{\omega_2}\halfcos{\theta_2}&-\halfsin{\theta_2}&0\\\halfsin{\theta_2}&\phase{\omega_2}\halfcos{\theta_2}&0\\0&0&1\end{pmatrix}$$

Thus, it transforms $$\ket{0}$$ to: $$\negphase{\omega_2}\halfcos{\theta_2}\ket{0}+\halfsin{\theta_2}\ket{1}$$ where we've denoted $$\ket{1}=\begin{pmatrix}0\\1\\0\end{pmatrix}$$. The third gate transforms it to: $$\negphase{\omega_2}\halfcos{\theta_2}\ket{0}+\negphase{\frac{\varphi_3+\omega_3}{2}}\halfsin{\theta_2}\halfcos{\theta_3}\ket{1}+\negphase{\frac{\varphi_3-\omega_3}{2}}\halfsin{\theta_2}\halfsin{\theta_3}\ket{2}$$ where we've denoted $$\ket{2}=\begin{pmatrix}0\\0\\1\end{pmatrix}$$ (note that these notations are not used this way in photonics in general if I'm not mistaken).

The fact that this state is Haar-random means that it should behave like this random vector: $$\frac{1}{\sqrt{X_1^2+X_2^2+Y_1^2+Y_2^2+Z_1^2+Z_2^2}}\begin{pmatrix}X_1+\mathrm{i}X_2\\Y_1+\mathrm{i}Y_2\\Z_1+\mathrm{i}Z_2\end{pmatrix}$$ where all the random variables here are i.i.d. according to a standard normal centered distribution $$\mathcal{N}(0, 1)$$.

We now argue that we can afford to choose a density for the $$\theta_i$$ that is nonzero only on $$[0,\pi]$$. In order to do so, simply notice that if all the $$\halfsin{\theta_i}$$ and $$\halfcos{\theta_i}$$ are positive, then they can represent the modulus of a complex numbers, while the $$\phase{\varphi_i}$$ and $$\phase{\omega_i}$$ can be used to represent the argument of complex numbers.

For instance, in the expression above for the $$\ket{0}$$ mode, you can convince yourself, that for every complex value $$a+\mathrm{i}b$$ with $$a^2+b^2\leqslant1$$ a coefficient can take, it is possible to reach this value even if all the $$\theta_i$$ are limited to $$[0,\pi]$$. If you do the computations for the other modes, you will find that this still holds. It's now a matter of finding the right densities for these quantities.

First of all, note that the argument of $$\negphase{\omega_2}$$ must behave like that of $$\frac{X_1+\mathrm{i}X_2}{\sqrt{X_1^2+X_2^2}{X_1^2+X_2^2+Y_1^2+Y_2^2+Z_1^2+Z_2^2}}$$, which is the same as the argument of $$X_1+\mathrm{i}X_2$$, which is the same as the argument of $$\frac{X_1+\mathrm{i}X_2}{\sqrt{X_1^2+X_2^2}}$$. It is well-known that this represents a point chosen uniformly at random on the unit circle. Thus, $$\omega_2$$ is simply chosen according to the uniform distribution on $$[0,2\pi]$$.

Furthermore, $$\sqhalfcos{\theta_2}$$ behaves like $$\frac{X_1^2+X_2^2}{X_1^2+X_2^2+Y_1^2+Y_2^2+Z_1^2+Z_2^2}=\frac{S_1}{S_1+S_2}$$ where $$S_1\sim\chi^2(2)$$ and $$S_2\sim\chi^2(4)$$. Since a $$\chi^2(k)$$ law is in fact a $$\Gamma\left(\frac{k}{2}, 2\right)$$ law, and because of the link between the $$\Gamma$$ and $$\beta$$ distributions, it means that $$\sqhalfcos{\theta_2}\sim\beta(1, 2)$$. That is: $$f_{\sqhalfcos{\theta_2}}(x)=2(1-x)$$ for $$x\in[0,1]$$. Thus: \begin{align} &F_{\sqhalfcos{\theta_2}}(x)=2x-x^2\\ \iff&\mathbb{P}\left[\sqhalfcos{\theta_2}\leqslant x\right]=2x-x^2\\ \iff&\mathbb{P}\left[\halfcos{\theta_2}\leqslant \sqrt{x}\right]=2x-x^2 \end{align} The last line is where we've used the $$\theta\in[0,\pi]$$ assumption, which allows us to have $$\halfcos{\theta_2}$$ instead of $$\left|\halfcos{\theta_2}\right|$$. We thus have: \begin{align} &\mathbb{P}\left[\theta_2\geqslant2\arccos\left(\sqrt{x}\right)\right]=2x-x^2\\ \iff&\mathbb{P}\left[\theta_2\leqslant2\arccos\left(\sqrt{x}\right)\right]=1-2x+x^2 \end{align} Note that every $$x\in[0, 1]$$ can be written as $$\sqhalfcos{y}$$ for $$y\in[0,\pi]$$. Thus, for all $$y\in[0,\pi]$$: \begin{align} &\mathbb{P}\left[\theta_2\leqslant2\arccos\left(\sqrt{\sqhalfcos{y}}\right)\right]=1-2\sqhalfcos{y}+\sqsqhalfcos{y}\\ \iff&\mathbb{P}\left[\theta_2\leqslant y\right]=1-2\sqhalfcos{y}+\sqsqhalfcos{y}\\ \iff&\mathbb{P}\left[\theta_2\leqslant y\right]=\left(1-\sqhalfcos{y}\right)^2\\ \iff&\mathbb{P}\left[\theta_2\leqslant y\right]=\sin^4\left(\frac{y}{2}\right) \end{align} The density of $$\theta_2$$ is thus given by the derivative of $$x\mapsto\sin^4\left(\frac{x}{2}\right)$$, which is $$x\mapsto2\halfcos{x}\sin^3\left(\frac{x}{2}\right)=x\mapsto\sin(x)\sin^2\left(\frac{x}{2}\right)$$.

All in all, this is clearly not an elegant proof: the computations are cumbersome, we have to argue that we can take $$\theta_i\in[0,\pi]$$ which greatly simplifies the computations, etc... This is the only proof I could come up with, but I'm certain there is a more elegant way to compute this density.

Indeed, this proof essentially shows that if this construction works, then it has to be with this density. It is likely that showing that this construction works gives you either the density, or the fact that we can assume $$\theta_i\in[0,\pi]$$.

The positive thing with this proof however is that it also allows you to compute the density for higher $$N$$. Consider the transformation:

The previous proof used nothing but the expected distribution of the amplitude of the $$\ket{0}$$ mode, when this gate is applied on the $$\ket{0}$$ mode. That is, the amplitude is unchanged with respect to the previous case: $$\negphase{\omega}\halfcos{\theta}$$ What does change however is the distribution of $$\sqhalfcos{\theta}$$, which is now a $$\beta(1, N-1)$$ one. Thus, we have: $$f_{\sqhalfcos{\theta}}(x)=(N-1)(1-x)^{N-2}$$ Performing similar computations, we find that: $$\mathbb{P}[\theta\leqslant y]=\sin^{2N-2}\left(\frac{y}{2}\right)$$ The derivative of this fonction is $$x\mapsto\frac{N-1}{2}\sin(x)\sin^{2N-4}\left(\frac{x}{2}\right)$$, which is the expression given in the Pennylane demo, up to the normalisation constant.

• First of all, thank you so much for such a brilliant proof based on probability of parameters. I read papers and people usually find their left invariant forms to take wedge product together. However I'm sorry that I dont understand the term first mode here (is it first qubit?) and if so how you can calculate the state of single qubit and why after third transformatin is there the state $| 2 \rangle$?. Moreover, i think $\theta_i$ have to be in the presumed ranged because you need it to be a random variable but the general U may not need that condition. Overall, it is a really great proof! Commented Aug 24, 2023 at 17:53
• @ViệtNguyễn Thanks! Concerning your questions, we can't talk about qubits here, because we're in a 3-dimensional vector space. It works just like the qubits though: the first mode is $|0\rangle=\begin{pmatrix}1\\0\\0\end{pmatrix}$. Basically, on the first figure, each wire represents one component of the 3-dimensional state. Since the last gate acts on $|1\rangle$ and $|2\rangle$, we get some $|2\rangle$ term. I'm not sure I understand your last comment, can you elaborate on that please? Commented Aug 24, 2023 at 21:35
• (By the way, I'm really not familiar with photonics and qumodes, so it may just be that these notations are complete non-sense to that regard but hey, it works. For instance, I think that $|2\rangle$ is supposed to represent 2 photons in the first mode, so I should have written $|100\rangle$, $|010\rangle$ and $|001\rangle$ instead of $|0\rangle$, $|1\rangle$ and $|2\rangle$ respectively I think) Commented Aug 24, 2023 at 21:39
• Oh, don't worry about my last comment! but There is one thing I can't get my head around which is how you calculate the resulting state after transformations. Do you use the representation of qubits like $|100\rangle$, $|010\rangle$, $|001\rangle$ as you mentioned? Can you show me for example the first transformation? I really appreciate it. thank you! Commented Aug 25, 2023 at 3:34