B Quantum Computing for Beginners: Understanding Double Hadamard Gates

Click For Summary
In quantum computing, the symbols |0⟩ and |1⟩ represent basis vectors, not numerical values. When applying double Hadamard gates, the cancellation of |1⟩ occurs due to vector addition rules, where components are summed separately. The resulting expression simplifies to |0⟩, demonstrating that |0⟩ remains unchanged while |1⟩ cancels out. This understanding clarifies the mechanics behind the operations of quantum gates. The discussion highlights the importance of grasping vector space concepts in quantum computing.
Quark Effect
Messages
9
Reaction score
4
TL;DR
Cannot entirely understand why some of the terms cancel each other out while double Hadamard gates are applied.
Hi guys, I am an absolute beginner in quantum computing. I am really curious about its mechanics but my lack of knowledge in mathematics makes me struggle. I cannot entirely understand why numbers |1> cancel each other out while double Hadamard gates are applied. If the rule is to cancel out the same numbers, why then |0> stays the same, as well as the √2? Thanks

cancelling out0.png
 
Physics news on Phys.org
Quark Effect said:
I cannot entirely understand why numbers |1> cancel each other out while double Hadamard gates are applied.

The ##0## and ##1## inside the kets ##|0\rangle## and ##|1\rangle## are not numbers; they're labels for basis vectors in a vector space. You could just as well call them ##|A\rangle## and ##|B\rangle##, or ##|\text{Laurel}\rangle## and ##|\text{Hardy}\rangle## for that matter, and everything would be the same.

The rule for adding vectors is that you add them component by component, i.e., you add up all the terms involving each basis vector separately. So you have:

$$
\frac{1}{\sqrt{2}} \left( \frac{|0\rangle + |1\rangle}{\sqrt{2}} + \frac{|0\rangle - |1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( \frac{|0\rangle}{\sqrt{2}} + \frac{|1\rangle}{\sqrt{2}} + \frac{|0\rangle}{\sqrt{2}} - \frac{|1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( (1 + 1) \frac{|0\rangle}{\sqrt{2}} + (1 - 1) \frac{|1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( 2 \frac{|0\rangle}{\sqrt{2}} \right)
$$

equals

$$
|0\rangle
$$
 
  • Like
  • Love
Likes Quark Effect and vanhees71
PeterDonis said:
The ##0## and ##1## inside the kets ##|0\rangle## and ##|1\rangle## are not numbers; they're labels for basis vectors in a vector space. You could just as well call them ##|A\rangle## and ##|B\rangle##, or ##|\text{Laurel}\rangle## and ##|\text{Hardy}\rangle## for that matter, and everything would be the same.

The rule for adding vectors is that you add them component by component, i.e., you add up all the terms involving each basis vector separately. So you have:

$$
\frac{1}{\sqrt{2}} \left( \frac{|0\rangle + |1\rangle}{\sqrt{2}} + \frac{|0\rangle - |1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( \frac{|0\rangle}{\sqrt{2}} + \frac{|1\rangle}{\sqrt{2}} + \frac{|0\rangle}{\sqrt{2}} - \frac{|1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( (1 + 1) \frac{|0\rangle}{\sqrt{2}} + (1 - 1) \frac{|1\rangle}{\sqrt{2}} \right)
$$

equals

$$
\frac{1}{\sqrt{2}} \left( 2 \frac{|0\rangle}{\sqrt{2}} \right)
$$

equals

$$
|0\rangle
$$
Ahh, I see! I really appreciate your help, it's not the first time you are spending your time and patiently explaining me things. Thanks a lot man
 
We often see discussions about what QM and QFT mean, but hardly anything on just how fundamental they are to much of physics. To rectify that, see the following; https://www.cambridge.org/engage/api-gateway/coe/assets/orp/resource/item/66a6a6005101a2ffa86cdd48/original/a-derivation-of-maxwell-s-equations-from-first-principles.pdf 'Somewhat magically, if one then applies local gauge invariance to the Dirac Lagrangian, a field appears, and from this field it is possible to derive Maxwell’s...
I read Hanbury Brown and Twiss's experiment is using one beam but split into two to test their correlation. It said the traditional correlation test were using two beams........ This confused me, sorry. All the correlation tests I learnt such as Stern-Gerlash are using one beam? (Sorry if I am wrong) I was also told traditional interferometers are concerning about amplitude but Hanbury Brown and Twiss were concerning about intensity? Isn't the square of amplitude is the intensity? Please...
First, I need to check that I have the 3 notations correct for an inner product in finite vector spaces over a complex field; v* means: given the isomorphism V to V* then: (a) physicists and others: (u,v)=v*u ; linear in the second argument (b) some mathematicians: (u,v)=u*v; linear in the first argument. (c) bra-ket: <v|u>= (u,v) from (a), so v*u . <v|u> is linear in the second argument. If these are correct, then it would seem that <v|u> being linear in the second...

Similar threads