Quantum Computing Gates
A quantum gate changes the state of one or more qubits in a controlled way. Gates act as the building blocks of every quantum algorithm. This topic introduces the most common gates using plain descriptions.
What a Gate Actually Does
A classical logic gate flips bits using fixed rules, such as AND or OR. A quantum gate rotates a qubit's state across the simplified sphere introduced in the qubits topic. This rotation changes the probability of measuring 0 or 1 later. Engineers chain several gates together to build a full algorithm.
The Hadamard Gate
The Hadamard gate takes a qubit sitting cleanly at 0 and spreads it evenly between 0 and 1. This gate creates the superposition state described in an earlier topic. Many quantum algorithms start with a row of Hadamard gates applied to every qubit at once.
The Pauli Gates
Three related gates named X, Y, and Z each rotate a qubit along a different direction. The X gate works like a classical NOT gate, flipping 0 to 1 and 1 to 0. The Z gate flips the sign of the 1 state without changing 0. The Y gate combines both effects. Engineers use these gates to fine-tune a qubit's exact position.
Diagram: A Simple Gate Sequence
Each box represents a gate applied in sequence along the line. The qubit enters from the left and reaches measurement on the right after passing through every gate.
The CNOT Gate: Linking Two Qubits
The CNOT gate, short for controlled NOT, involves two qubits called the control and the target. If the control qubit reads 1, the gate flips the target qubit. If the control qubit reads 0, the target qubit stays unchanged. This gate creates entanglement when applied to a qubit already in superposition, connecting it directly to the entanglement topic covered earlier.
Why Gates Must Be Reversible
Every quantum gate must work backward as well as forward, a property called reversibility. This rule comes from the underlying physics of quantum mechanics rather than a design choice by engineers. Classical computers allow irreversible operations, such as erasing a bit permanently, but quantum circuits cannot include this kind of step in the middle of a calculation.
Building Bigger Operations from Small Gates
Engineers combine small gates such as Hadamard, Pauli, and CNOT to build larger, more useful operations. A handful of these basic gates can recreate almost any quantum operation through careful combination. This approach mirrors how classical computers build complex software from simple logic gates at the hardware level.
Key Takeaways
Quantum gates rotate qubit states rather than flipping fixed values. The Hadamard gate creates superposition, and the CNOT gate creates entanglement between two qubits. Every quantum gate must be reversible. Complex algorithms emerge from chaining together a small set of basic gates.
