Quantum Computing Asked on December 22, 2020
Why 2 $H$ gates in series create a probability of 100% for one value of the qubit and 0% of the second value of the qubit since an $H$ gate acts like a superposition generator?
The reason for this is because the inverse of Hadamard gate is itself. That is, giving that
$$ H = dfrac{1}{sqrt{2}} begin{pmatrix} 1& 1 1 & -1 end{pmatrix}$$
then
$$ H^{-1} = dfrac{1}{sqrt{2}} begin{pmatrix} 1& 1 1 & -1 end{pmatrix} $$
so therefore, $$HH|psirangle = H H^{-1} |psi rangle = I |psi rangle = |psirangle textrm{where $I$ is the Identity operator.}$$
Now when $|psi rangle = |0 rangle$, which is the starting state of your quantum circuit, then applying two consecutive Hadamard gates is the same as doing nothing... hence the qubit stayed at the state $|0rangle$. Thus giving you a 100% probability is it the state $|0rangle$.
To see this in the geometric sense, applying two consecutive Hadamard gates to the qubit in the state $|0rangle$ is like doing the following rotations:
The first Hadamard gate rotate the qubit in the red trajectory to the state $|+rangle = dfrac{|0 rangle + |1 rangle}{sqrt{2}} $. Then the second Hadamard gate rotate the qubit in the blue trajectory, back to the state $|0rangle$ again.
Answered by KAJ226 on December 22, 2020
Simply speaking, $H^2 = HH = I$ which is identity (you can verify this by direct matrix multiplication). As a result, such operator does not change anything in a quantum state.
Answered by Martin Vesely on December 22, 2020
The answers above noting that $H^2=I$ neatly capture this. If you want an alternative way of seeing this, you can look at what $H$ does to each of the computational basis states if applied twice. (Since any state will be a superposition of the basis states, understanding how the operator acts on each basis state will tell you what it does to a general state.)
To apply $H$ to each of the computational basis states a second time, we can just re-use the results from above: $$HH |0 rangle = Hfrac{1}{sqrt{2}}(|0rangle + |1rangle) = frac{1}{2}((|0rangle + |1rangle)+(|0rangle - |1rangle)) =frac{1}{2}(2|0rangle)=|0rangle,$$ $$HH |1 rangle = Hfrac{1}{sqrt{2}}(|0rangle - |1rangle) = frac{1}{2}((|0rangle + |1rangle)-(|0rangle - |1rangle)) =frac{1}{2}(2|1rangle)=|1rangle.$$ Since applying $H$ twice to both computational basis states results in no change, applying $H$ to any state results in no change, i.e., $H^2=I$.
Answered by nosuchthingasmagic on December 22, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP