Solution (source code)

= Solution

For positive trace-class covariance operators $C_i=L_iL_i^*$, their <Procrustes distance between covariance operators> is
$$
d_P(C_1,C_2)
=\inf_{R\in\mathcal O(H)}\lVert L_1-L_2R\rVert_{\mathrm{HS}},
$$
where $\mathcal O(H)$ is the group of <unitary operators> on the real Hilbert space $H=L^2[0,1]$. Expanding the square gives the equivalent formula
$$
d_P(C_1,C_2)^2
=\lVert L_1\rVert_{\mathrm{HS}}^2+\lVert L_2\rVert_{\mathrm{HS}}^2
-2\sup_{R\in\mathcal O(H)}\operatorname{tr}(R^*L_2^*L_1).
$$