# Tag Info

1

@Durd3nT answered the question nicely. But here is another way to see it, and hopefully it will be useful for future purposes... All you need to know is the identity $X = HZH$. Then now you can see that $CNOT (CX)$ can be rewritten as $$CX = \big( I \otimes H \big) CZ \big( I \otimes H \big)$$ This is because when the controlled-qubit is in the state $|0\... 3 You can check that the following is equal to a CNOT gate The first Hadamard gate rotates$q_1$to the$X$-basis. In that basis, the$Z$-gate acts like a bit flip (the same way the$X$-gate acts in the$Z$-basis). The second Hadamard rotates$q_1$back to$Z$-basis. 6 You can use a single step of amplitude amplification, with a less-than-N oracle, to get to a uniform distribution. Example Quirk Circuit Source: https://arxiv.org/abs/1805.03662 5 Suppose$\langle\phi|\psi\rangle = re^{i\theta}$. As you have noticed, if we have access to multiple copies of the state, then we can measure$r$using the SWAP test. Now, consider the state$|\psi'\rangle = e^{-i\theta}|\psi\rangle$and note that $$\langle\phi|\psi'\rangle = e^{-i\theta}\langle\phi|\psi\rangle = e^{-i\theta}re^{i\theta} = r.$$ Since$|\...

1