DeepPractise
DeepPractise

Circuit Diagrams & Notation

Track: Quantum Gates & Circuits · Difficulty: Beginner · Est: 13 min

Circuit Diagrams & Notation

Overview

Quantum circuits are easiest to understand visually. A circuit diagram is a picture of:

  • which qubits exist,
  • which gates act on which qubits,
  • and in what time order.

This notation is essential because it becomes the everyday language of quantum computation. Even before algorithms, it lets you reason about composition, entanglement, and measurement.

Intuition

A circuit diagram is like a timeline.

  • Each wire is one qubit.
  • Time flows from left to right.
  • When a gate symbol appears on a wire, that gate is applied to that qubit at that time.

The diagram doesn’t “show the state” explicitly. Instead, it tells you how to update the state step-by-step.

A useful habit:

  • Treat the diagram as instructions for transforming ψ|\psi\rangle.

Formal Description

Wires as qubits

If you have nn wires, you have an nn-qubit state:

ψC2n.|\psi\rangle \in \mathbb{C}^{2^n}.

The ordering of wires matters. For two qubits, the top wire is typically the “first” qubit and the bottom wire the “second,” corresponding to basis states 00,01,10,11|00\rangle,|01\rangle,|10\rangle,|11\rangle.

Time flows left to right

A diagram like

q0: ──H───
q1: ──────

means “apply H to qubit 0, do nothing to qubit 1.”

In algebra, that is

(HI)ψ.(H\otimes I)|\psi\rangle.

Single-qubit gate symbols

Common single-qubit gates are drawn as boxes on a wire:

q: ──[H]──

meaning ψHψ|\psi\rangle \mapsto H|\psi\rangle (for that qubit).

Controlled gate notation

Controlled operations connect two wires. The control is drawn as a filled dot, and the target shows the operation.

A CNOT is drawn as a dot connected to a plus sign:

control: ──●──

target : ──⊕──

Meaning:

  • if control is 0|0\rangle, target is unchanged,
  • if control is 1|1\rangle, apply X to the target.

A controlled-Z (CZ) is often drawn as a dot connected to a Z box:

control: ──●──

target : ──[Z]─

Meaning:

  • apply Z to the target only when the control is 1|1\rangle.

Measurement symbols (conceptual)

Measurement is usually drawn as a meter-like symbol, often with a classical output line. Conceptually, it means:

  • a quantum state is converted into a classical outcome (like 0 or 1),
  • and the post-measurement quantum state is updated accordingly.

In text form you might see something like:

q: ──[M]──  →  c

where cc is a classical bit storing the measurement result.

We are keeping this conceptual here. The important idea is that measurement is not just another unitary gate.

Worked Example

Consider this 2-qubit diagram:

q0: ──[H]──●──

q1: ───────⊕──

Step-by-step interpretation:

  1. Start from 00|00\rangle.

  2. Apply H on the first qubit:

0012(00+10).|00\rangle \mapsto \tfrac{1}{\sqrt{2}}(|00\rangle + |10\rangle).
  1. Apply CNOT (control = first wire, target = second wire):
12(00+10)12(00+11).\tfrac{1}{\sqrt{2}}(|00\rangle + |10\rangle) \mapsto \tfrac{1}{\sqrt{2}}(|00\rangle + |11\rangle).

So the diagram describes entanglement creation via conditional evolution.

Turtle Tip

Turtle Tip

When you see a controlled gate, pause and say out loud: “Control on 1, apply ___ to the target.” That one sentence prevents most confusion.

Common Pitfalls

Common Pitfalls
  • Don’t read a circuit left-to-right and apply algebra right-to-left without noticing. Pick one method and be consistent.
  • Don’t treat measurement as reversible. Measurement produces a classical outcome and generally cannot be undone.

Quick Check

Quick Check
  1. In a circuit diagram, what do wires represent and which direction does time flow?
  2. What is the meaning of the dot-and-connector in a controlled operation?

What’s Next

Now that we can read circuit diagrams, we can talk about how “big” a circuit is. Next we introduce circuit width and depth: simple structural metrics that help you reason about parallelism and execution cost without needing algorithms or heavy theory.