KnowledgeCookies logo Understanding the language of quantum science
QPicDepict / Quantum computing

Quantum gates and circuits

A circuit transforms quantum amplitudes with gates and converts them into classical samples with measurements.

Quantum gates and circuits infographic. A reading guide and explanation follow.
Prepare a Bell pair. q0q_{0}, q1q_{1}. H, ., ●, ⊕, M, M. Open full-size image Download PNG

How it works

  1. Prepare

    Start both wires in ∣0⟩\lvert 0\rangle. The Hadamard on q0q_{0} creates two equal, coherent branches.

  2. Entangle

    CNOT flips q1q_{1} only on the q0=1q_{0} = 1 branch. The output amplitudes are on 00 and 11.

  3. Read

    Z measurements produce correlated bits. X-basis correlation can help distinguish this Bell state from a dephased mixture.

Equation and quantities

∣Φ+⟩=CNOT⁡(H⊗I)∣00⟩\lvert\Phi^+\rangle=\operatorname{CNOT}(H\otimes I)\lvert 00\rangle

Worked example

The ideal circuit returns 00 or 11 with probability one half each. Seeing 01 or 10 in a real run can reflect gate or readout errors.

Why it matters

Circuits are a common language for programming qubits and reasoning about composition, debugging and hardware compilation.

Limits and assumptions

Wires denote quantum systems, and a gate box specifies a transformation. Measurement requires separate statistical interpretation.

How would the output change if CNOT were removed?

The second qubit would stay 0, giving 00 and 10 with equal probability in q0q_{0}q1q_{1} order.

Related reading