If I denote by $U^c$ the controlled version of the quantum operation $U$ $$U^c=|0\rangle \langle 0|\otimes \mathbb{1}+|1\rangle \langle 1|\otimes U$$
- I can first apply $U^c$ and afterward measure the control qubit.
- Or I can first measure the control qubit and then apply $U$ only if the measurement outcome was 1.
This is a trick to save qubits when performing quantum phase estimation. I tried to sketch this with quantum logic gates - I am not sure if I did it right.
Now I want to show that these two methods give the same result.
\begin{align*} &\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)U^c|\Psi\rangle\\ &= \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)(|0\rangle \langle 0|\otimes \mathbb{1}+|1\rangle \langle 1|\otimes U)|\Psi\rangle\\ &=\frac{1}{\sqrt{2}}(|0\rangle \langle 0|0\rangle\otimes 1 + |1\rangle \langle 1|0\rangle \otimes U +|0\rangle \langle 0|1\rangle\otimes 1 +|1\rangle \langle 1|1\rangle \otimes U)|\Psi\rangle\\ &=\frac{1}{\sqrt{2}}(|0\rangle \otimes 1 + |1\rangle \otimes U)|\Psi\rangle \end{align*}
I hope my calculations are correct.
Now I can say, this is the same as measuring the control qubit and if it is $|1\rangle $ I calculate $|1\rangle \otimes U |\Psi\rangle$