Solution (source code)

= Solution

Conditional on Alice and Bob using the same <basis>, Eve chooses the wrong <basis> with probability $2/3$, then Bob disagrees with probability $1/2$, so the conditional error is $1/3$. Alice and Bob match with probability $1/3$, hence the per-transmission detection probability is $1/9$.