Quantum Computing for Beginners: Understanding Double Hadamard Gates

In summary, the rule for adding vectors is that you add them component by component, and this rule still holds when the vectors have the same label (0 or 1).
  • #1
Quark Effect
9
4
TL;DR Summary
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
  • #2
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
  • #3
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
 

1. What is a double Hadamard gate?

A double Hadamard gate is a quantum logic gate that is used in quantum computing to manipulate qubits (quantum bits). It is composed of two Hadamard gates, which are single-qubit gates that rotate the qubit's state around the X and Z axes.

2. How does a double Hadamard gate work?

A double Hadamard gate works by applying two Hadamard gates in succession to a qubit. The first Hadamard gate rotates the qubit's state around the X axis, and the second Hadamard gate rotates the qubit's state around the Z axis. This results in a rotation of the qubit's state in a 2-dimensional space, which can be represented as a point on the Bloch sphere.

3. What is the purpose of a double Hadamard gate?

The purpose of a double Hadamard gate is to prepare a qubit in a superposition state, which is a state that exists in multiple states simultaneously. This is a crucial step in many quantum algorithms, as it allows for more complex calculations and operations to be performed on the qubit.

4. Can a double Hadamard gate be reversed?

Yes, a double Hadamard gate can be reversed by applying two Hadamard gates in the reverse order. This will return the qubit to its original state.

5. How is a double Hadamard gate different from other quantum gates?

A double Hadamard gate is different from other quantum gates in that it is a composite gate, meaning it is made up of two or more simpler gates. It is also a universal gate, meaning it can be used to perform any quantum computation. Additionally, the double Hadamard gate is reversible, meaning the original input can be retrieved from the output.

Similar threads

Replies
8
Views
1K
Replies
7
Views
1K
Replies
4
Views
2K
  • Advanced Physics Homework Help
Replies
12
Views
2K
Replies
8
Views
910
Replies
4
Views
6K
  • Quantum Physics
Replies
2
Views
1K
Replies
6
Views
416
Replies
2
Views
2K
  • Quantum Physics
Replies
1
Views
795
Back
Top