Gates & Circuits
Quantum Gate
A basic operation applied to qubits that transforms their quantum state — the quantum equivalent of a classical logic gate.
Definition
A quantum gate is a mathematical operation — represented as a unitary matrix — that transforms the state of one or more qubits. Quantum gates are the building blocks of quantum circuits and quantum algorithms, analogous to logic gates (AND, OR, NOT) in classical computing. Unlike most classical gates, all quantum gates are reversible.
In depth
A quantum gate is a basic operation on qubits, the quantum counterpart of a logic gate. Mathematically, every gate is a unitary matrix: a one-qubit gate is a 2 by 2 matrix, a two-qubit gate is 4 by 4, and an n-qubit gate is 2^n by 2^n. Because the matrix is unitary, every gate is reversible, and it preserves total probability. Familiar examples are the Pauli gates X, Y, and Z, the Hadamard gate that creates superposition, rotation gates with adjustable angles, and the two-qubit CNOT that creates entanglement.
Physically, a gate is a controlled interaction applied for a controlled time. On a superconducting chip, a single-qubit gate is a microwave pulse of tens of nanoseconds, and a two-qubit gate uses a tuned coupling between neighbors for tens to hundreds of nanoseconds. Trapped-ion gates use laser pulses lasting microseconds to hundreds of microseconds, and neutral atom entangling gates use Rydberg excitation lasting a fraction of a microsecond. Each platform has a native gate set, and the compiler translates a circuit into those gates.
How good a gate is determines everything else. Gate fidelity, the closeness of the real operation to the ideal one, is typically 99.9 percent or better for single-qubit gates, and 99 to 99.9 percent for two-qubit gates on leading devices. Errors compound over thousands of gates, which is why circuit depth is limited on noisy hardware. A small set of gates, such as Hadamard, T, and CNOT, is universal, meaning that any computation can be built from them to any accuracy.
Technical Definition
A single-qubit gate is a 2×2 unitary matrix U applied to a qubit's state vector. A two-qubit gate is a 4×4 unitary matrix. The Hadamard gate H = (1/√2)[[1,1],[1,-1]] puts a qubit into equal superposition. The CNOT gate flips a target qubit if and only if the control qubit is |1⟩, and is the primary way entanglement is created in quantum circuits.
Visual Explanation: An Analogy
Think of a quantum gate like a precise physical transformation — similar to how rotating a compass needle by exactly 90 degrees changes where it points. The gate specifies exactly how the qubit's 'direction' in an abstract mathematical space changes.
Key facts
| Item | Detail |
|---|---|
| Mathematical form | A unitary matrix: 2x2 for one qubit, 4x4 for two |
| Reversibility | Every gate has an inverse, its conjugate transpose |
| Typical times | Tens of nanoseconds on superconducting chips; microseconds to hundreds of microseconds on ions |
| Typical fidelities | Single-qubit about 99.9 percent or better; two-qubit about 99 to 99.9 percent |
| Universal set | Hadamard, T, and CNOT, or rotations plus an entangling gate |
Where the idea comes from
The idea of quantum logic gates came from Deutsch's 1985 and 1989 papers, which defined the quantum circuit model, and DiVincenzo and Barenco and colleagues in 1995 showed that one- and two-qubit gates suffice. Experimental two-qubit gates were demonstrated with trapped ions in 1995.
Real-World Use Cases
- Creating superposition with the Hadamard gate
- Creating entanglement with the CNOT gate
- Building quantum circuits and algorithms from sequences of gates
How it differs from related ideas
- Classical gates such as AND discard information and are irreversible, while quantum gates are reversible.
- Single-qubit gates rotate a state and cannot create entanglement, while two-qubit gates can.
- A native gate is what hardware performs directly, and other gates are built from native ones.
Common Misconceptions
- Quantum gates are not like classical logic gates in one key way: all quantum gates are reversible — you can always 'undo' a gate by applying its inverse.
Frequently asked questions
What is a quantum gate?
A reversible operation on one or more qubits, described by a unitary matrix, that is the building block of quantum circuits.
Which gates create entanglement?
Two-qubit gates such as CNOT, CZ, and iSWAP, when applied to qubits in superposition.
How accurate are quantum gates?
The best single-qubit gates have errors around one in a thousand or much lower, and the best two-qubit gates around one in a thousand to ten thousand, depending on the platform.
Related Terms
- Quantum Circuit
- Superposition
- Entanglement
- Unitary Operator
- Universal Gate Set
- Rotation Gate
- Pulse-Level Control
Keep exploring
- Algorithm: Quantum Fourier Transform (QFT)
- Algorithm: Deutsch-Jozsa Algorithm
- Hardware: IBM Heron (r1, r2, and r3)
- Hardware: IonQ Forte (and Forte Enterprise)