Hadamard Gate
Definition
The Hadamard gate is a single qubit gate that is used to create superposition. The Hadamard gate is named after the mathematician Jacques Hadamard. The Hadamard gate is used to change the state of the qubit in terms of the and axes of the Bloch sphere. The Hadamard gate is used to perform the bit-flip and phase-flip operations. The Hadamard gate is the most commonly used gate in quantum computing after the Pauli gates.
Effect on qubit
The Hadamard gate changes the state of the qubit from to and vice versa. The Hadamard gate changes the phase of the qubit from to and vice versa.
PS: you must be thinking that the operations performed by the Hadamard gate are similar to the Pauli gates. Well, you are right! The Hadamard gate is a combination of the Pauli-X and Pauli-Z gates. The Hadamard gate is the most versatile gate in quantum computing, as it can be used to create superposition, entanglement, and perform phase-flip and bit-flip operations.
Property
Psst... only hadamard has it!!
When a qubit is in the state |0⟩, it means that it is definitely in the state |0⟩ with probability amplitude 1 and in the state |1⟩ with probability amplitude 0.
This means that Hadamard gate transforms this |0⟩ state into an equal superposition of |0⟩ and |1⟩. This means that after applying the Hadamard gate to the |0⟩ state, the qubit is in a state where it has a 50% chance of being measured as |0⟩ and a 50% chance of being measured as |1⟩. Mathematically, this transformation can be represented as:
Similarly, when a qubit is in the state |1⟩, it is definitely in the state |1⟩ with probability amplitude 1 and in the state |0⟩ with probability amplitude 0.
The Hadamard gate also transforms this |1⟩ state into an equal superposition of |0⟩ and |1⟩. So, after applying the Hadamard gate to the |1⟩ state, the qubit is in a state where it has a 50% chance of being measured as |0⟩ and a 50% chance of being measured as |1⟩. This transformation can be represented as:
After applying the Hadamard gate to the state, you can observe that there is a negative sign in front of the state. This negative sign is the phase factor that is introduced by the Hadamard gate. This phase factor is responsible for the phase-flip operation performed by the Hadamard gate. The Hadamard gate changes the phase of the qubit from +1 to -1 and vice versa. In terms of the Bloch sphere, the Hadamard gate changes the state of the qubit in terms of the and axes of the Bloch sphere. Talking in radians, the Hadamard gate introduces a phase of radians to the qubit.
Types
The Hadamard gate has only one type.
Matrix representation
The matrix representation of the Hadamard gate is: * Hadamard gate
:
Circuit representation
The Hadamard gate is represented as ───H───
in the circuit.
Example
Let's take an example to demonstrate the Hadamard gate.
Suppose we have a qubit initially in the state , represented as:
The Hadamard gate is represented by the following matrix:
To apply the Hadamard gate to the qubit