0
$\begingroup$

I am reading the Qiskit textbook(beta) and they have explained Hadamard gate using an amplitude tree. To show how two H-gates on a qubit give the output as 0 everytime they said to consider that it reverses the direction of the qubit when the input and output state of the qubit is 1.(as shown in the image below) Amplitude tree given for H-gate

Following this, if we apply 2 H-gates on a qubit in state 1, the output they said would similarly always be 1 but when I made that tree, it again came out as 0 as shown below. Derived tree for input state 1

Please help me understand this. I am absolutely new to quantum computing(with no physics background).

Edit: My conclusion about the H-gate stated as "it reverses the direction of the qubit when the input and output state of the qubit is 1" was the wrong idea that led to the incorrect amplitude tree. You can find the correction pointed out in the answer marked correct.

$\endgroup$
2
  • $\begingroup$ In the future, please include a link to the page you are referencing so that anyone trying to help does not have to go search it out for themselves! I have included the link in my response by putting [square brackets around the words that will be the link](with the website in round brackets beside it). Hope this helps! $\endgroup$
    – PGibbon
    Commented Oct 6, 2022 at 15:03
  • $\begingroup$ Got it. And thanks! $\endgroup$
    – Rai
    Commented Oct 6, 2022 at 15:12

1 Answer 1

0
$\begingroup$

Edit: Starting with $|1\rangle$ The mistake is in the bottom right of your diagram. After your first Hadamard gate, the structure of the diagram leaving the $|1\rangle$ must be identical to what you did in the first Hadamard of your diagram. (Hadamard acts on $|1\rangle$ the same every time, so the diagram is the same.) With this change you should get the amplitude 1 for $|1\rangle$ and 0 for $|0\rangle$

Corrections

If you make the bottom right red box identical to the first red box, your answers will work out!

$\endgroup$
4
  • $\begingroup$ What I understood is that the amplitude of state |1> is coming out to be 0. But shouldn't it be 1 because the final state will always be |1> if we started with |1>? $\endgroup$
    – Rai
    Commented Oct 6, 2022 at 15:09
  • $\begingroup$ When you applied the second Hadamard you were not in a pure |1> state, you were in a superposition of |0> and |1>. $\endgroup$
    – PGibbon
    Commented Oct 6, 2022 at 15:13
  • $\begingroup$ I confess, I may have lost my mind. I thought you had started with the |0> state for some reason. Will ammend answer shortly. $\endgroup$
    – PGibbon
    Commented Oct 6, 2022 at 15:21
  • $\begingroup$ Ok got it! Now that you pointed it out, it makes sense . Thanks! $\endgroup$
    – Rai
    Commented Oct 6, 2022 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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