0
$\begingroup$

I've been studying Quantum Computing and one thing that intrigued me is:

given a qubit q1 with an initial value x, when I apply a Hadamard gate on it, then it goes to superposition, so the probability of it collapsing to 1 or 0 is 50%.

So, does it mean that I just don't care about the previous value x at all anymore? Also, if that's in the middle of a circuit, that kind of cancels everything that happened before... For example, in the circuit for teleportation, we have a H gate on Qubit one before measuring it: enter image description here

In this case, the first qubit goes to superposition, meaning that now it has a 50/50 chance of being 0 or 1. Is this the right interpretation of this concept?

Same thing happens for Deutsch-Jozsa:

enter image description here

We measure on the "H basis", as explained in the example. So, both qubits go in superposition, making their outcome depend on a probability. I didn't get it how these gates help on the calculation.

$\endgroup$
2
  • 1
    $\begingroup$ I'm not sure I understand your question, you seem to think that creating a superposition will immediately cause the wavefunction to collapse afterwards? That's not the case, that will only happen if you also measure the qubit $\endgroup$
    – Johan
    Jun 23 at 17:11
  • $\begingroup$ I'm voting to not close this question because a single answer will clarify all of the confusion raised in this question (that the Hadamard gate does not always create the same output regardless of input, but rather that the Hadamard gate yields different outputs depending on the inputs; it's true that each of the computational basis states get transformed to equal-magnitude superpositions of the computational basis states, but other initial superpositions get transformed into non-equal-magnitude superposition states) $\endgroup$ Jun 24 at 1:58

1 Answer 1

2
$\begingroup$

I think you might just be misunderstanding the Hadamard gate slightly. In the computational basis, $H= \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1\end{pmatrix}$ maps $|0\rangle \leftrightarrow |+\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ and $|1\rangle \leftrightarrow |-\rangle = \frac{1}{\sqrt{2}}(|0\rangle - |1\rangle)$ since the Hadamard gate is its own inverse.

In words, the Hadamard gate sends computational basis states to equal superposition states (with phase/sign determined by the input state), and sends superposition states back to the computational basis depending on the phase between $|0\rangle$ and $|1\rangle$.

Finally, to clarify, the Hadamard gate is unitary, you can always undo it to get "x" back.

$\endgroup$

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