I'm trying to understand this problem. Alice I attempting to send a 2 classical bit message to Bob using 1 qubit such that there are 4 states $\varphi_{00}$ $\varphi_{01}$ $\varphi_{10}$ $\varphi_{11}$ that represent $\varphi_{xy}$ and their values respectively are $|0\rangle$ $|+\rangle$ $|1\rangle$ $|-\rangle$.
This explains the basis that will let Eve measure $x$ from the given state $\varphi_{xy}$ with a probability of $\cos^{2}\left ( \frac{\pi}{8} \right )$, but I can't seem to conclude the same mathematically.

Here's what I have derived so far using $P[|\phi_0\rangle when |\varphi_{xy}\rangle is|\varphi\rangle ] = |\langle\phi_0|\varphi\rangle|^{2}$.
- $P[|\phi_0\rangle when |\varphi_{xy}\rangle is|0\rangle ] = \cos^{2}\left ( \frac{\pi}{8} \right )$
- $P[|\phi_0\rangle when |\varphi_{xy}\rangle is|+\rangle ] = \frac{1}{2}(\cos\frac{\pi}{8}+\sin\frac{\pi }{8})^{2}$
- $P[|\phi_0\rangle when |\varphi_{xy}\rangle is|1\rangle ] = \sin^{2}\left ( \frac{\pi}{8} \right )$
- $P[|\phi_0\rangle when |\varphi_{xy}\rangle is|-\rangle ] = \frac{1}{2}(\cos\frac{\pi}{8}-\sin\frac{\pi }{8})^{2}$
- $P[|\phi_1\rangle when |\varphi_{xy}\rangle is|0\rangle ] = \sin^{2}\left ( \frac{\pi}{8} \right )$
- $P[|\phi_1\rangle when |\varphi_{xy}\rangle is|+\rangle ] = \frac{1}{2}(\cos\frac{\pi}{8}-\sin\frac{\pi }{8})^{2}$
- $P[|\phi_1\rangle when |\varphi_{xy}\rangle is|1\rangle ] = \cos^{2}\left ( \frac{\pi}{8} \right )$
- $P[|\phi_1\rangle when |\varphi_{xy}\rangle is|-\rangle ] = \frac{1}{2}(\cos\frac{\pi}{8}+\sin\frac{\pi }{8})^{2}$
How do we conclude that the probability of learning $x$ is $\cos^{2}\left ( \frac{\pi}{8} \right )$?
Thanks in advance.
The context for this can be found on pp. $111$–$113$ of these lecture notes.
I’m assuming that wherever you wrote $\varphi$ you meant $\psi$. (Also you forgot to change the two $0$s in items $3$ and $7$ to $1$s.)
What you’re missing is that $\frac12\left(\cos\frac\pi8+\sin\frac\pi8\right)^2=\cos^2\frac\pi8$ and $\frac12\left(\cos\frac\pi8-\sin\frac\pi8\right)^2=\sin^2\frac\pi8$. Rather than figuring that out algebraically or trigonometrically, it’s easier to just look at the angles between the states. The angle between $\phi_0$ and both $\psi_{00}$ and $\psi_{01}$ (corresponding to $x=0$) is $\frac\pi8$, as is the angle between $\phi_1$ and both $\psi_{10}$ and $-\psi_{11}$ (corresponding to $x=1$), so all the corresponding squared projections are $\cos^2\frac\pi8$, and thus independent of $y$, if Eve measures in this basis, her result will be $x$ with that probability.