← Back to section · Quantum Computing

Qubits, Gates, and Circuits: The Minimal Language of Quantum Computing

Starting from a single qubit on the Bloch sphere, this article explains the Hadamard, CNOT, and phase gates as unitary matrices, how to read a circuit diagram, and why the set {H, T, CNOT} is universal.

Published 22 November 2026 · 6 min read · PQ Frontier

Qubits, Gates, and Circuits: The Minimal Language of Quantum Computing
AI-generated illustration by PQ Frontier
Video explainer · Quantum Gates & Circuits

The qubit: a point on the Bloch sphere

A classical bit is 0 or 1. A qubit’s state is a superposition:

∣ψ⟩=α∣0⟩+β∣1⟩,∣α∣2+∣β∣2=1|\psi\rangle = \alpha|0\rangle + \beta|1\rangle, \quad |\alpha|^2 + |\beta|^2 = 1

with complex amplitudes α,β\alpha, \beta. Measurement returns 0 with probability ∣α∣2|\alpha|^2 and 1 with probability ∣β∣2|\beta|^2, and the state collapses onto whichever outcome occurred. Discarding the physically irrelevant global phase, every single-qubit state can be written as ∣ψ⟩=cos⁡θ2∣0⟩+eiφsin⁡θ2∣1⟩|\psi\rangle = \cos\frac{\theta}{2}|0\rangle + e^{i\varphi}\sin\frac{\theta}{2}|1\rangle — exactly a point on a unit sphere, the Bloch sphere. The north pole is ∣0⟩|0\rangle, the south pole ∣1⟩|1\rangle, and points on the equator are equal superpositions, such as ∣+⟩=∣0⟩+∣1⟩2|+\rangle = \frac{|0\rangle+|1\rangle}{\sqrt{2}} on the +x+x axis. The Bloch sphere is the best mental picture for single-qubit dynamics: every gate is a rotation of this sphere, possibly with additional phase structure.

Gates are unitary matrices

A gate is a linear transformation of the state vector that must preserve total probability. That requirement is exactly unitarity, U†U=IU^\dagger U = I, and it has a sharp consequence: every gate is reversible. A quantum circuit contains no erasure until the moment of measurement.

The basic vocabulary:

Pauli gates X,Y,ZX, Y, Z are π rotations about the three Bloch axes; X=(0110)X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} is the quantum NOT.

The Hadamard gate H=12(111−1)H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} maps ∣0⟩|0\rangle to ∣+⟩|+\rangle and ∣1⟩|1\rangle to ∣−⟩=∣0⟩−∣1⟩2|-\rangle = \frac{|0\rangle-|1\rangle}{\sqrt{2}}. It is the first step of nearly every quantum algorithm: turn definite inputs into uniform superpositions so subsequent operations act on all components at once — the starting point of “quantum parallelism.” On the Bloch sphere it is a rotation about the diagonal xx–zz axis.

Phase gates S=(100i)S = \begin{pmatrix} 1 & 0 \\ 0 & i \end{pmatrix} and T=(100eiπ/4)T = \begin{pmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{pmatrix} change no measurement probabilities; they only attach a relative phase to the ∣1⟩|1\rangle component. Phases look invisible, but interference can amplify them into visible probability differences — phase is where quantum algorithms actually do their work. Note the chain S=T2S = T^2 and Z=S2Z = S^2: the TT gate is the irreducible quarter-phase at the end of it.

The CNOT gate acts on two qubits, applying XX to the target when the control is 1. Applied to ∣+⟩∣0⟩|+\rangle|0\rangle it produces the Bell state ∣00⟩+∣11⟩2\frac{|00\rangle+|11\rangle}{\sqrt{2}}, after which the two qubits can no longer be described independently. This is how entanglement enters a circuit.

Reading a circuit diagram

Circuits are read left to right in time. Each horizontal line is one qubit (double lines denote classical bits), boxes are gates, vertical lines join the participants of a multi-qubit gate, and the meter symbol at the end is measurement. A recurring skeleton appears across algorithms: preparation (usually from ∣0⟩|0\rangle), a Hadamard layer laying down superposition, a middle section of controlled operations and phase gates (oracle or evolution), an interference section — often another Hadamard layer converting phase differences into probability differences — and finally measurement. Shor, Grover, and phase estimation are all variations on this skeleton. When reading a diagram, track two things: where entanglement is created (which CNOT does it), and where phases are written and later read out. The rest is preparation and cleanup.

One mechanism deserves a name because it appears everywhere: phase kickback. When a controlled-UU gate acts on a control in superposition and a target sitting in an eigenstate of UU with eigenvalue eiϕe^{i\phi}, the phase does not stay on the target — it is “kicked back” onto the control qubit, where a subsequent Hadamard layer can convert it into a measurable probability. Phase estimation, the engine inside Shor’s factoring algorithm, is essentially phase kickback industrialized: eigenvalues of a unitary are written into a register of control qubits and read out by interference. Many circuit diagrams that look mysterious become transparent once you spot which eigenphase is being kicked back, and where.

From mathematical gates to physical pulses

Matrices are the ideal; in the laboratory a gate is a physical process. On superconducting platforms a single-qubit gate is a microwave pulse lasting tens of nanoseconds, and two-qubit gates are driven through tunable couplers or cross-resonance; in ion traps the pulses are laser light. Real pulses carry amplitude and phase errors, leakage, and crosstalk, so every gate must be calibrated — and calibrations drift, requiring periodic renewal. One charming exception is the phase gate: on many platforms a ZZ rotation fires no physical pulse at all. It is implemented as a virtual gate, by shifting the reference phase of subsequent pulses in software, with essentially zero error — the cheapest gate in any circuit. Typical fidelities today: single-qubit gates reach 99.9% and above, while two-qubit gates struggle between 99% and 99.9% — and the error-correction threshold (around 99%) sits squarely in that interval, which is why every fraction of a percent of two-qubit fidelity is watched so closely.

Universal gate sets: why these three

Not every gate set supports universal quantum computation. The classical result is that {H,T,CNOT}\{H, T, \mathrm{CNOT}\} is approximately universal: any unitary on nn qubits can be approximated to accuracy ε\varepsilon by a circuit over these gates, and the Solovay–Kitaev theorem guarantees the gate count grows only polynomially in log⁡(1/ε)\log(1/\varepsilon). Remove the TT gate and keep only {H,S,CNOT}\{H, S, \mathrm{CNOT}\} — the Clifford group — and the Gottesman–Knill theorem says the resulting circuits are efficiently simulable classically. That one small phase gate is the step across the classical-simulability boundary. It is also why TT gates, implemented through magic-state distillation, are the most expensive resource in fault-tolerant quantum computing: non-Clifford operations are the hard currency of quantum advantage.

Measurement and reset: waypoints, not just endpoints

Measurement is the only non-unitary, irreversible operation in a circuit, and the only channel through which classical information leaves the quantum system. Traditionally it appeared once, at the very end. Modern circuits increasingly depend on mid-circuit measurement: syndrome extraction in error correction is repeated mid-circuit measurement, dynamic circuits use outcomes to steer later operations in real time (feed-forward), and phase estimation has a semi-classical variant that replaces the quantum Fourier transform with mid-circuit measurement plus classical feedback. After measuring, reusing the qubit requires reset — re-preparing it in |0⟩. Neither step is free: readout carries its own error rate, on many platforms the worst single figure in the spec sheet, and reset leaves residual excitation behind. Readout fidelity and gate fidelity together decide whether an error-correction demonstration succeeds — when reading a diagram, count the meter symbols as carefully as the gate boxes.

Summary

The circuit model compresses quantum computing into a small language: the Bloch sphere gives the geometry of states, unitarity constrains the operations, and HH, the phase gates, and CNOT form the minimal expressive units. Everything else on this site — period finding in Shor’s algorithm, stabilizer measurements in error correction — is written in this language, and it repays learning first.

References

  1. Nielsen, M. A. & Chuang, I. L., Quantum Computation and Quantum Information, Cambridge University Press, 2010. https://www.cambridge.org/9780521635035
  2. Barenco, A. et al., Elementary Gates for Quantum Computation, Phys. Rev. A 52, 3457 (1995). https://arxiv.org/abs/quant-ph/9503016
  3. IBM Quantum Documentation (quantum circuits and common gates reference). https://docs.quantum.ibm.com

Tags: QubitQuantum GatesQuantum CircuitsBloch Sphere