0
$\begingroup$

Reading through IBM's intro to quantum computing and gates and I'm confused about the Hadamard gate. When you use an H gate it appears to rotate the qubit along the X axis pi/4 putting it in a superposition.

If my base state was |0> and I pass it through an H gate it will be put into |>. Another H gate will put it back into |0>.

If my base state was |1> then the same happens, where two H gates will return to |1>.

I'd expect two H gates would be the same as a NOT gate and flip |0> to |1>.

I see what is happening but I don't know why. Why doesn't two H gates turn |0> to |1> ?

$\endgroup$
  • $\begingroup$ What do you mean by "|>"? $\endgroup$ – Nathaniel Oct 7 '17 at 6:04
  • 2
    $\begingroup$ If by rotations, you refer to the Bloch sphere representation, the Hadamard gate is a rotation of $\pi$ about the vector $\hat{x}+\hat{z}$, not $\pi/4$ about the vector $\hat{x}$ as you stated. $\endgroup$ – user154997 Oct 7 '17 at 6:39
1
$\begingroup$

In a nutshell, there are multiple ways of being in a superposition of |0> and |1>.

Take a look at the explanation of the Hadamard gate found here: https://developer.ibm.com/dwblog/2016/quantum-computing-everyone-programmers-perspective/

In the graphic representation, all states "reflect" across the same dotted line. When reflected twice, they go back where they came from. You can see that |0> and |1> are reflected to different places, but that both places have equal probability of measuring in each state.

The most clear mathematical representation is to look at the Hadamard gate as a 2x2 matrix 1/$\sqrt{2}$ [[1,1],[1,-1]]. Square it and you get unity. It might also help to look into the Bloch sphere: Understanding the Hadamard gate on the Bloch sphere

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.