Common Quantum Gates
Common Quantum Gates
Quantum gates are the basic building blocks of quantum circuits, similar to how logic gates like AND or OR work in classical computers. However, unlike classical gates that manipulate bits (0 or 1), quantum gates operate on qubits, which can exist in super-positions of 0 and 1. These gates perform reversible operations and enable phenomena like entanglement, making quantum computing powerful.
Quantum Gates
- Hadamard Gate (H)
- Pauli Gates (X, Y, Z)
- CNOT Gate
- Toffoli Gate
Hadamard Gate (H)
The Hadamard Gate creates superposition, transforming a qubit from a definite state (0 or 1) into a 50/50 probability of being 0 or 1. It’s often used to initialize qubits at the start of quantum algorithms.
Pauli Gates (X, Y, Z)
These gates rotate qubits around axes on a quantum state sphere (Bloch sphere):
- X Gate: Flips the qubit state (like a quantum NOT gate).
- Y Gate: Combines X and Z rotations (with a phase change).
- Z Gate: Flips the phase of the qubit (no state change for |0⟩ or |1⟩).
CNOT Gate
The Controlled-NOT (CNOT) Gate acts on two qubits: a control and a target. If the control qubit is |1⟩, it flips the target qubit. This gate is essential for creating entangled states like the Bell states.
Toffoli Gate
Also called the CCNOT Gate, the Toffoli Gate uses two control qubits and one target qubit. It flips the target qubit only if both controls are |1⟩. This gate is key for reversible computing and error correction.