How are new probabilities computed when simulating measurement on a set of qubits?
Let 
$$P(0) = |a|^2 + |c|^2 + |e|^3 + |g|^2.$$
This is the probability of observing $0$. 

Then
\begin{eqnarray*}
w &amp;=&amp; a \big/ \sqrt{P(0)}, \\
x &amp;=&amp; c \big/ \sqrt{P(0)}, \\
y &amp;=&amp; e \big/ \sqrt{P(0)}, \\
z &amp;=&amp; g \big/ \sqrt{P(0)}.
\end{eqnarray*}