Consider a uniform distribution over a unit circle. If written in polar coordinates, the pdf of the angle would be $$ p(\theta)=\frac{1}{2\pi}. $$ I want to find an encoder $\Theta\to Z$ and a decoder $Z\to \hat X$ such that $H(Z)=1$ bits (a binary representation) with minimum MSE defined as $$ d(\theta,\hat\theta)=1−\cos(\hat\theta−\theta)=1−x^Tx= \frac{1}{2}\|\hat x−x\|^2, $$ where x is the coordinates in planar.
One possible encoder-decoder pair I can come up with is that for $\theta\in [-\frac{\pi}{2},\frac{\pi}{2}]$ it will be encoded to $z=0$ and $\theta\in [\frac{\pi}{2},\frac{3\pi}{2}]$ it will be encoded to $z=1$ (to divide the circle into to part).
Then we simply decode the $\hat\theta$ as $\pi z$.
Is it optimal in the sense of minimizing MSE? Any help would be appreciated.
This is indeed optimal. For a fixed decoder, the optimal encoder is the one that assigns each point to the closer of the two points in the range of the decoder. Without loss of generality, let one of those two points be at $\theta_0=0$ and the other at $\theta_1$. Then $[\frac{\theta_1}2,\frac{\theta_1}2+\pi]$ should be encoded to $1$ and the rest to $0$. Since an interval of length $\pi$ is encoded to each value, the mean square error is clearly minimized if $\theta_0,\theta_1$ are at the centres of their respective intervals. That’s the case when $\theta_1=\pi$.