Suppose we have a single qubit operator $U$ with eigenvalues $±1$, so that $U$ is both Hermitian and unitary, so it can be regarded both as an observable and a quantum gate. Suppose we wish to measure the observable $U$. That is, we desire to obtain a measurement result indicating one of the two eigenvalues, and leaving a post-measurement state which is the corresponding eigenvector. How can this be implemented by a quantum circuit? Show that the following circuit implements a measurement of $U$:
Ref. to Exercise 4.34 in QC and QI by Nelsen and Chuang
$$ |\psi_0\rangle =|0\rangle\otimes|\psi_{in}\rangle\\ |\psi_1\rangle =\frac{|0\rangle+|1\rangle}{\sqrt{2}}\otimes|\psi_{in}\rangle\\ |\psi_2\rangle=\frac{1}{\sqrt{2}}[|0\rangle\otimes |\psi_{in}\rangle+|1\rangle\otimes U|\psi_{in}\rangle]\\ |\psi_3\rangle=\frac{1}{2}[|0\rangle\otimes(I+U)|\psi_{in}\rangle+|1\rangle\otimes(I-U)|\psi_{in}\rangle] $$ Note that,
$U(I+U)|\psi_{in}\rangle=(U+U^2)|\psi_{in}\rangle=(U+I)|\psi_{in}\rangle=1(I+U)|\psi_{in}\rangle$ and $U(I-U)|\psi_{in}\rangle=-1(I-U)|\psi_{in}\rangle$
$\implies (I+U)|\psi_{in}\rangle$ and $(I-U)|\psi_{in}\rangle$ are eigenvectors of the operator $U$ with corresponding eigenvalues $+1$ and $-1$, respectively.
And by projecting the first qubit the second qubit is projected to either $(I+U)|\psi_{in}\rangle$ or $(I-U)|\psi_{in}\rangle$, therefore this circuit implements a measurement of $U$.
It is proved that projective measurements together with unitary dynamics are sufficient to implement a general measurement, by introducing an ancilla system having an orthonormal basis $|m\rangle$ in one-to-one correspondence with the possible outcomes of the measurement we wish to implement.
Please check Page 94, QC and QI by Nelsen and Chuang for the proof of this statement.
Are we using this statement to implement the circuit above ?
Can't we have a circuit like :
with $U'=\sum |m \rangle\langle\psi_m |=|0\rangle\langle \psi|(I+U)+|1\rangle\langle \psi|(I-U)$ where $|\psi_i\rangle$ are the eigenvectors of the operator $U$ ?