Define the Hadamard basis states . The initial two Hadamard gates prepare . For one bracket, the two control branches give
Using the Pauli X gate , unitary conjugation by the Hadamard gate gives , so . Keeping every sign, the target states along the control-one branch, in the exact gate order, are
The last column also includes the final target Hadamard gate, which lies outside the bracket. Writing , applying the final top Hadamard gate gives the exact normalized two-qubit quantum state
Thus the complete outputs, in top-then-bottom computational basis order, are
For the first qubit, the Pauli matrix has expectation value by the Born rule. The two cases each have , while the and cases are deterministic. Equivalently, this Hadamard test measures
This explains the approximate quantum counting interpretation: repeated preparations estimate the expectation value, and hence . A single top-qubit computational-basis measurement need not identify .

Articles by others on the same topic (0)

There are currently no matching articles.