QuantumAtlas

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.

In depth

A quantum circuit is a diagram of a quantum computation. Horizontal lines are qubits, time runs from left to right, boxes on the lines are gates, vertical lines link control and target qubits, and meter symbols at the end mark measurements. The circuit starts with all qubits in 0, applies a sequence of gates to build superpositions and entanglement, and ends with measurements that return classical bits. The circuit model is the standard way to describe algorithms, and every major software kit uses it.

A concrete example is the two-qubit circuit that makes a Bell pair: a Hadamard gate on the first qubit, followed by a CNOT from the first qubit to the second, then measurement of both. Running it many times gives 00 about half the time and 11 about half the time, with nearly no 01 or 10, which shows entanglement. Larger algorithms are built from such blocks. Grover's algorithm repeats an oracle and a diffusion step, and Shor's algorithm uses modular exponentiation followed by a quantum Fourier transform.

Circuits are characterized by their width, the number of qubits, and their depth, the number of sequential layers of gates. They are written in languages such as OpenQASM and in Python libraries, and compiled to the native gates and layout of a device. Circuits can include classical control, where later gates depend on earlier measurement results, which is essential for error correction and teleportation. Other models of computation, such as adiabatic and measurement-based, are equivalent in power but the circuit model remains the lingua franca.

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.

Key facts

ItemDetail
ElementsQubit wires, gates, controls, and measurements
MetricsWidth (qubits), depth (layers), and gate counts by type
LanguagesOpenQASM 3, Python libraries such as Qiskit and Cirq
ExampleHadamard plus CNOT creates a Bell pair
Classical controlGates can depend on earlier measurement outcomes

Where the idea comes from

The circuit model was defined by David Deutsch in 1989, and Yao showed its equivalence to the quantum Turing machine in 1993. It has been the standard formalism for quantum algorithms ever since.

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

How it differs from related ideas

  • A quantum circuit is a program for a gate-model computer, while an annealing schedule is a program for an annealer.
  • Circuit depth measures the length of the computation in layers, while gate count measures total operations.
  • Unlike classical circuits, quantum circuits cannot copy data or have feedback loops without measurement.

Frequently asked questions

What is a quantum circuit?

A sequence of quantum gates and measurements applied to qubits, drawn as a diagram, that defines a quantum computation.

How is a circuit different from a classical logic circuit?

Its gates are reversible, it can create superposition and entanglement, and its outputs are probabilistic.

What does circuit depth mean?

The number of layers of gates that must run one after another, which sets how long the computation takes and how much noise accumulates.

Related Terms

Keep exploring

← Back to the dictionary