A quantum circuit is a sequence of quantum gates applied to a register of qubits, read left-to-right in time. Each horizontal wire represents a qubit, gates are boxes or symbols on those wires, and measurement is typically performed at the end. Circuit depth (number of time steps) and width (number of qubits) are the primary complexity measures. The quantum circuit model is the standard computational model for quantum algorithms, analogous to Boolean circuits in classical computing, and is polynomially equivalent to quantum Turing machines.
A quantum circuit is the standard way to specify a quantum algorithm. The diagram looks like a musical score: each horizontal line is a qubit (a wire carrying quantum information through time), and gates are placed on these wires in the order they are applied, reading left to right. Single-qubit gates appear as boxes on one wire; two-qubit gates like CNOT span two wires with a vertical connector. The circuit begins with qubits initialized to |0> (by convention) and typically ends with measurement symbols on some or all wires.
The two key complexity measures for quantum circuits are width and depth. Width is the number of qubits — the spatial resource. Depth is the number of sequential time steps — the temporal resource. Gates on disjoint qubits can execute in the same time step (they commute because they act on independent subsystems), so depth counts the longest chain of dependent operations. Total gate count is also important but less fundamental: a circuit with many gates but low depth may be more practical than a shallow circuit with fewer gates, because real qubits decohere over time and depth directly corresponds to how long coherence must be maintained.
The quantum circuit model is polynomially equivalent to the quantum Turing machine, meaning either can simulate the other with at most polynomial overhead. This is the quantum analog of the equivalence between Boolean circuits and classical Turing machines. In practice, nearly all quantum algorithms are described as circuits rather than Turing machines because the circuit representation is more intuitive and directly maps to how quantum hardware operates. When we say an algorithm is "efficient," we mean it uses polynomial depth and polynomial width in the input size.
A crucial principle governing circuit design is deferred measurement: any circuit with mid-circuit measurements followed by classically controlled gates can be transformed into an equivalent circuit where all measurements occur at the end, with the classically controlled gates replaced by quantum-controlled gates. This means measurement never adds computational power — it only extracts classical information. The practical consequence is that you can analyze a quantum circuit as pure unitary evolution followed by a single round of measurement, even if the physical implementation performs measurements earlier. Understanding this principle clarifies why quantum circuits are reversible up to the final measurement step: the unitary part loses no information, and measurement is the irreversible extraction of a classical outcome from the quantum state.