Stage 2 · Lesson 5 of 17

Simple quantum instructions and circuits

40 minutesNo coding required10-question quiz

1 · Big question

How do we read and test a simple one-qubit circuit?

  • Read circuit time from left to right.
  • Identify preparation, wire, X instruction, measurement and classical output.
  • Predict X on |0⟩ and |1⟩ in computational-basis examples.
  • Build and step through a one-qubit circuit using keyboard controls.

2 · Before we begin

Ideas to bring with you

  • |0⟩ and |1⟩ label reference states.
  • Measurement creates a classical result.

3 · New words

Meet the words before we use them

circuit
An ordered set of instructions applied to qubits.
gate
A controlled quantum instruction represented by a box on a circuit wire.
X gate
A gate that exchanges |0⟩ and |1⟩ in the reference-state examples.

4 · Simple explanation

Build one idea at a time

A quantum circuit is an ordered list of instructions. A horizontal qubit wire helps us read what happens over time from left to right.

The starting state appears at the left. Gate boxes show operations, a measurement symbol produces a classical result, and a classical wire carries that record.

For the introductory basis-state cases, X changes |0⟩ to |1⟩ and |1⟩ to |0⟩. Two X gates return either reference state to where it started.

Watch it happen

One-qubit X circuit builder

Calculated teaching model

Add or remove X and measurement, predict the output, then step from left to right.

Ready. Use Step or Play to begin.
Text description of the animation

A q0 wire starts in |0⟩. Keyboard buttons add X or measurement, move or remove an instruction, and reveal calculated state checkpoints.

  1. Build |0⟩ → X → measurement.
  2. Record a predicted result before running.
  3. Step through the state checkpoints, then add a second X and predict again.

Evidence to calculate or record: The first circuit predicts 1; adding a second X makes the ideal prediction 0.

Predict

Commit to an idea before the reveal

Starting from |0⟩, what result do you predict for X followed by measurement?

Choose a prediction to enable the experiment.

Try it

Build, predict, step

Teaching model

Build |0⟩ → X → measurement.

Make and lock a prediction first.

Detailed activity results will appear here.

Built-in circuit lab

Build from left to right

Ideal simulator

Choose the number of qubits, add instructions with the buttons, then predict before you run. Every drag action has a keyboard button alternative.

  1. No instructions yet.
Initial state: every qubit is prepared as |0⟩.

Circuit results

Simulator
Exact probabilities and sampled results
ResultExact chanceCountSample percent
0100%

Run the simulator to create a text summary of the chart.

Bit-order legend

Pi Leo labels wires q0, q1 and q2 from top to bottom. In displayed result strings, the highest-numbered bit is written on the left, so a two-qubit result is shown as q1q0. This matches the convention used in the Pi Leo simulator and common Qiskit count strings.

Gate definitions
X
Exchanges the |0⟩ and |1⟩ reference states in these examples.
H
Changes the state direction and can create equal 0/1 measurement probabilities from |0⟩.
Z
Changes relative phase. Its effect may appear only after a later analysing gate.
CX
Applies X to a target when its control is in the |1⟩ reference state.
Measurement
Produces a classical bit result.

8 · Observe

What did the result actually show?

Look at the displayed values before reading the explanation. Record a pattern, an exception or something that changed.

The state label changes at each X checkpoint. Measurement records the final basis-state prediction as a classical bit.

9 · Explain the result

Connect the evidence to the idea

Instruction order defines the computation. In these selected reference-state examples, X exchanges the two labels; later lessons add gates whose effects cannot be described as classical switching.

10 · Model and limitation

Useful model, honest boundary

What this model shows

The wire diagram makes instruction order and measurement placement easy to follow.

What this model does not show

A wire is not a physical track carrying a visible object, and a gate box is not a tiny door inside the processor.

11 · Common mix-ups

Careful wording prevents big mistakes

Circuit wires are paths drawn through physical space.

They are time-ordered information lines in a diagram.

Every quantum gate is just a classical NOT switch.

X has a NOT-like basis action, but quantum gates also act on general quantum states and phase.

Measurement can be silently moved anywhere without changing the experiment.

Measurement placement can change what information remains for later gates.

12 · Real quantum-computing connection

Where this appears in circuit work

Quantum software builds circuits as ordered operations and measurements before a simulator or processor executes an adapted version.

13 · Show me moreOptional deeper explanation

Show me more

Where this analogy stops: on a general quantum state, X exchanges the two state components as well as exchanging the reference states, so its action is broader than an ordinary switch.

Try this

Explain the deeper idea in your own words, including one limitation.

14 · Quick summary

Keep these ideas

  • Read circuits from left to right.
  • Gate boxes are ordered instructions.
  • X exchanges |0⟩ and |1⟩ in the basis examples.
  • Measurement produces classical output.

Ten-question quiz

Check the ideas—not decorative details

Feedback appears after submission. Retry whenever you like; 8/10 or above means “Topic understood”.

1How is time normally read in the course circuit diagrams?

Concept · Easy

2What does X do to |0⟩ in the introductory basis example?

Concept · Easy

3What is the role of the measurement symbol at the end of the circuit?

Concept · Medium

4Which meaning of ‘circuit’ is used here?

Vocabulary · Easy

5What is a quantum gate in a circuit diagram?

Vocabulary · Easy

6Starting in |0⟩, what is the ideal result of X then measurement?

Prediction · Easy

7What is the ideal result of |0⟩ → X → X → measurement?

Prediction · Medium

8Which claim overextends the switch analogy?

Misconception · Medium

9Which evidence best checks a learner’s two-X prediction?

Evidence · Medium

10A learner cannot drag gates. How should the circuit lab remain usable?

Application · Medium

Sources and accuracy notes3 checked references · reviewed 2026-08-15

These records identify the claim each source supports. External documentation can change; dated platform claims were checked on the shown access date.

  1. CircuitsIBM Quantum Learning · Quantum circuits — Circuits · accessed 2026-08-15

    Supports quiz questions ql-05-q-01, ql-05-q-02, ql-05-q-03, ql-05-q-04, ql-05-q-06, ql-05-q-07, ql-05-q-09, ql-05-q-10 and their related lesson explanations about classical and quantum circuit models; gates and wires; standard-basis measurement.

  2. Basics of Quantum InformationIBM Quantum Learning · Course overview and units · accessed 2026-08-15

    Supports the simple explanation, activity and model boundaries about classical and quantum information; quantum circuits; entanglement and teleportation.

  3. Quantum Computing for EveryoneMIT Press · 2019 · Parts II–III · accessed 2026-08-15

    Supports quiz questions ql-05-q-05, ql-05-q-08 and their related lesson explanations about school-accessible circuit explanations; measurement, entanglement and algorithms; limits of everyday analogies.

Lesson accuracy notes
  • This model is deliberately limited: A wire is not a physical track carrying a visible object, and a gate box is not a tiny door inside the processor.
  • Predictions, simulations and physical-hardware evidence are labelled separately.