A quantum circuit is an ordered program for transforming qubits. It combines quantum gates and related operations, then represents their execution visually as gates placed from left to right on qubit wires. section 3.0 section 3.3.3
For one qubit, a circuit is a sequence of gates such as RY, X, phase, and H. The same sequence can be written in Python and inspected through a resulting state table. section 3.3.3
A single-qubit circuit
Initialize a state, apply RY(2π/3), X, phase(π/3), and H, then print the transformed amplitudes and probabilities. The circuit diagram shows the operations in application order, while the algebraic expression lists them in reverse order. section 3.3.3
With multiple qubits, circuits act on registers and evolve multi-qubit state vectors. Controlled gates use control qubits, while multi-qubit unitary transformations recombine groups of amplitudes. section 4.6 section 5.2.1
Building reusable circuits
A uniform-distribution circuit applies H to every qubit in a register. Reusable circuits can then be appended to another circuit, or appended with additional control qubits. section 4.5.3 section 5.2.1
Circuits support reusable algorithmic patterns: preparing distributions, encoding register data, amplifying marked-state amplitudes, and constructing search or optimization procedures. Measurement is needed to extract an advantage from amplitude changes in search. section 6.2 section 11.3.1
Figure 3.33 A circuit diagram representation of the gate sequence HP(π/3}) XRY(2π/3)
Use the circuit diagram to trace gate order visually across a qubit wire. section 3.3.3

