Solution (source code)

= Solution

Measuring the first <qubit> applies $P_0=|0\rangle\langle0|\otimes I$ or $P_1=|1\rangle\langle1|\otimes I$. The <Born rule> gives
$$
\boxed{p_0=|\alpha|^2+|\beta|^2,\qquad p_1=|\gamma|^2+|\delta|^2=1-p_0.}
$$
The normalized conditional <quantum states> are
$$
\boxed{|\psi_0\rangle=\frac{\alpha|00\rangle+\beta|01\rangle}{\sqrt{p_0}},\qquad
|\psi_1\rangle=\frac{\gamma|10\rangle+\delta|11\rangle}{\sqrt{p_1}}.}
$$
Each expression applies only when its denominator is nonzero; an impossible outcome has no defined conditional state.