Given measures $\mu_0, \mu_1$ on $X,Y \subset \mathbb R$ with densitites $f_0:X\to \mathbb R $ and $f_1:Y \to \mathbb R$ and a measurable map $T:X \to Y$ that pushes $\mu_0$ onto $\mu_1$ such that $$\int_{T^{-1}(A)}d\mu_0=\int_Ad\mu_1 \quad$$ for any Lebesgue-measurable $A \subset Y$. Through Lebesgue integration we get $$\int_{\inf X}^x f_0(\tau)d\tau=\int_{\inf Y}^{T(x)} f_1(\tau)d\tau. \quad (*)$$ One can then define the Cumulative Distribution Transform (CDT) of $f_1$ w.r.t the reference $f_0$ which we denote by $\hat{f_1}:X \to \mathbb R$ given by $$\hat{f_1}(x)=(T(x)-x)\sqrt{f_0(x)} \quad (**)$$ where $T$ satisfies $(*).$
I now want to compute the CDT in the $L_2$-norm explicitly for the example $X=[0,1], Y=\mathbb R$ and $f_0(x)=1$ and $f_1(x)=\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}}$.
So in order to compute the CDT, we need to solve for $T:[0,1] \to \mathbb R$ by plugging into $(*)$:
$$\int_{-\infty}^{T(x)}f_1(\tau)d\tau =\int_{-\infty}^{T(x)}\frac{1}{\sqrt{2\pi}}e^{-\frac{\tau^2}{2}} d\tau = \int_0^1 1 d\tau = x.$$ By setting $\phi(x):=\int_{-\infty}^{x}\frac{1}{\sqrt{2\pi}}e^{-\frac{\tau^2}{2}} d\tau$ we can formulate it as $$\phi(T(x))=x$$ where $\phi$ is monotonically increasing with an existing inverse, hence $T(x)=\phi^{-1}(x)$. Finally plugging it into $(**)$ yields $$\hat{f_1}(x)=(T(x)-x)\sqrt{f_0(x)}=\phi^{-1}(x)-x.$$
My question now is, how can I compute $$\Vert\hat{f_1}\Vert_{L^2}^2=\int_0^1(\phi^{-1}(x)-x)^2 dx?$$ I am on the one hand unsure how to take the inverse of $\phi$ and also wouldn't know how to then evaluate the integral. Any online tools for that?
The answer by Tobsn seems correct. There are known results for the inverse of error function (https://mathworld.wolfram.com/InverseErf.html), but I don't know about the OT cost between a Gaussian and uniform distribution. There is also python code for numerically approximating the CDT, and hence its norm, numerically in Python: https://github.com/rohdelab/PyTransKit