PLAIN QUANTUM
Search

What is a quantum gate, and what is a circuit?

  • Level: Beginner
  • 3 min read
  • Quick answer
The short answer

A quantum gate is one step in a quantum program: an operation that changes the state of a few qubits, usually one or two, in a precise, reversible way. A quantum circuit is a sequence of gates, drawn as one line per qubit with the gates placed along the lines, read left to right, and usually ending with measurements that give ordinary 0s and 1s. Gates do the job that logic gates do in an ordinary computer, but instead of combining bits they adjust amplitudes and phases, so that wrong answers tend to cancel and right ones build up when the circuit is measured.

Gates you'll meet

Acts onWhat it does
X, the flipOne qubitTurns 0 into 1 and 1 into 0: the quantum version of NOT
Z, the sign flipOne qubitMakes the amplitude on 1 negative; the odds stay the same, the phase changes
H, the blendOne qubitTurns a plain 0 or 1 into an even 50/50 blend, and back again
T, a small turnOne qubitShifts the phase by an eighth of a full turn
CNOT, the controlled flipTwo qubitsFlips the second qubit where the first is 1; with the first in a blend, it ties the two together (entanglement)
H, CNOT and T together can build any quantum calculation, to whatever accuracy is needed.

How to read a circuit

Each horizontal line is one qubit, usually starting at 0. Boxes on a line are one-qubit gates; a dot joined to a ⊕ on another line is a controlled flip. A meter symbol at the end means measure. Because each measurement gives a random result, a circuit is normally run many times and the answers counted. Here "circuit" means the program and its diagram, not a piece of electronics. The quantum algorithm lesson walks through one, step by step.

first second a b c H blend flip a 1 00 01 10 11 b 0.71 00 01 0.71 10 11 c 0.71 00 01 10 0.71 11 first second a b c H blend flip a 1 00 01 10 11 b 0.71 00 01 0.71 10 11 c 0.71 00 01 10 0.71 11
A small circuit, read left to right: H blends the first qubit, then a controlled flip ties the second to it. Bars: the four amplitudes at each stage (a, b, c). At the end only 00 and 11 remain, each a 50% chance. Dashed outlines: the bar one stage earlier.

What a gate physically is

An ordinary logic gate is a piece of circuitry. A quantum gate isn't a part at all: it's an action, usually a precisely shaped pulse of microwaves, laser light or voltage aimed at the qubits. Each machine does a small set of native gates directly, and software called a compiler translates a program into them. Every pulse is slightly imperfect, and two-qubit gates usually have the higher error rates, which is why long circuits need error correction.

Common confusions

  • "A quantum gate tries every answer at once." No. A gate changes amplitudes; useful answers come from arranging gates so that interference favours them.
  • "Quantum gates work like AND and OR." Those throw information away. Quantum gates are reversible, so they can be undone.
  • "More gates means a better program." On today's hardware every gate adds a little noise, so shorter circuits are usually better.

Where this comes up

Sources and further reading

Tags show the kind of source (how sources are chosen and checked). Checked against these sources on 13 November 2026.

  1. BookQuantum Computation and Quantum Information (10th anniversary edition)Michael Nielsen and Isaac Chuang, Cambridge University Press, 2010
  2. CourseBasics of quantum information (free course)IBM Quantum Learning
  3. Vendor documentationPhaseGate (Qiskit API reference): the phase gate P(θ), with P(π) = Z, P(π/2) = S, P(π/4) = TIBM Quantum documentation
  4. Peer-reviewed paperElementary gates for quantum computationBarenco et al., Physical Review A, 1995

Written by Muhammad Atif · Reviewed 26 November 2026 · Report a correction