Gates & Circuits
Quantum Circuit
A sequence of quantum gates applied to a set of qubits — the quantum equivalent of a program.
Definition
A quantum circuit is a model for quantum computation in which a fixed number of qubits are acted on by a sequence of quantum gates, followed by measurements. It is the standard way of describing and visualizing quantum algorithms — analogous to a classical program or flowchart, but for quantum operations.
Technical Definition
A quantum circuit is drawn as a set of horizontal wires (one per qubit, representing the passage of time from left to right) with gate symbols placed along the wires. Single-qubit gates appear as labeled boxes on a single wire; multi-qubit gates connect multiple wires. The 'depth' of a circuit (the longest path from input to output) determines how long the computation takes and how much decoherence it is exposed to.
Visual Explanation: An Analogy
A quantum circuit is like a musical score: the horizontal lines are the instruments (qubits), the notes along each line are the operations (gates) to be performed, and reading left to right tells you the order in which things happen.
Real-World Use Cases
- Representing and communicating quantum algorithms (Shor's, Grover's, etc.)
- Input format for quantum computing frameworks like Qiskit and Cirq
- Benchmarking hardware by measuring how deep a circuit can run before errors dominate