= Solution
The computational-basis projectors on the first <qubit> are
$$
\Pi_0=|0\rangle\langle0|\otimes I^{\otimes(n-1)},\qquad
\Pi_1=|1\rangle\langle1|\otimes I^{\otimes(n-1)}.
$$
The <Pauli Z gate> acts as $+1$ on the first subspace and $-1$ on the second, so $Z_1=\Pi_0-\Pi_1$. By the <Born rule>, $p_b=\langle\psi|\Pi_b|\psi\rangle$. Therefore \b[the expectation determines the output probabilities]:
$$
\boxed{\langle\psi|Z_1|\psi\rangle=p_0-p_1,\qquad
p_0=\frac{1+\langle Z_1\rangle}{2},\quad p_1=\frac{1-\langle Z_1\rangle}{2}.}
$$
The normalization supplies $p_0+p_1=1$; no product-state assumption is needed for this identity.
Back to article page