Further learning · needs an internet connection for the links
From browser demos to real quantum code
Everything in this series ran as a simulation in your browser. The next step is writing quantum programs yourself with Qiskit, the open-source toolkit from IBM, and running them on a simulator or on real quantum hardware.
01 · What is Qiskit?
A Python library for quantum circuits
Qiskit lets you build circuits out of the same gates you used in this series, simulate them, and send them to quantum computers. It's free, open source under the Apache 2.0 license, and the most widely used quantum programming toolkit.
released August 2026
Windows, macOS, Linux
02 · Install
Set up Qiskit in a few minutes
Use a virtual environment so Qiskit's packages stay separate from everything else on your machine.
1 · CHECK PYTHON (NEEDS 3.10 OR NEWER)
python --version
2 · CREATE A VIRTUAL ENVIRONMENT
python -m venv qenv
3a · ACTIVATE IT ON WINDOWS
qenv\Scripts\activate
3b · ACTIVATE IT ON macOS OR LINUX
source qenv/bin/activate
4 · INSTALL QISKIT
pip install qiskit
OPTIONAL · ADD PLOTTING SUPPORT FOR CIRCUIT DIAGRAMS AND HISTOGRAMS
pip install "qiskit[visualization]"
On some macOS and Linux systems the commands are python3 and pip3. Jupyter notebooks (pip install notebook) are a comfortable place to experiment.
03 · Your first circuit
Build the Bell state from Quantum 05
This program creates the entangled state |Φ⁺⟩ with the same two gates you used on page 05, then measures it 1,000 times on a simulator. No account or quantum hardware is needed.
BELL.PY
from qiskit import QuantumCircuit from qiskit.primitives import StatevectorSampler # Build the Bell state from Quantum 05: H on qubit 0, then CNOT from 0 to 1 qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) qc.measure_all() print(qc.draw()) # text drawing of the circuit # Run 1,000 shots on a simulator built into Qiskit sampler = StatevectorSampler() result = sampler.run([qc], shots=1000).result() print(result[0].data.meas.get_counts())
OUTPUT (YOUR COUNTS WILL VARY SLIGHTLY)
┌───┐ ░ ┌─┐
q_0: ┤ H ├──■───░─┤M├───
└───┘┌─┴─┐ ░ └╥┘┌─┐
q_1: ─────┤ X ├─░──╫─┤M├
└───┘ ░ ║ └╥┘
meas: 2/══════════════╩══╩═
0 1
{'00': 507, '11': 493}00 and 11 appear, each about half the time. The two qubits always agree, just like the "Measure 200 pairs" demo.
Peek at the amplitudes
On a simulator you can look at the state vector directly, something real hardware never allows. This checks the H-then-S result from the gate lab on page 04.
STATEVECTOR.PY
from qiskit import QuantumCircuit from qiskit.quantum_info import Statevector # Quantum 03-04: H then S on |0⟩ should land on |+i⟩ = (|0⟩ + i|1⟩)/√2 qc = QuantumCircuit(1) qc.h(0) qc.s(0) print(Statevector(qc))
OUTPUT
Statevector([0.70710678+0.j , 0. +0.70710678j],
dims=(2,))Python writes the imaginary unit as j, so 0.70710678j is 0.707i, matching (|0⟩ + i|1⟩)/√2.
04 · Series-to-Qiskit map
Every gate in the series has a one-line Qiskit command
| Concept | Qiskit code | Series page |
|---|---|---|
| Create n qubits, all starting at |0⟩ | qc = QuantumCircuit(n) | Q01 |
| See the amplitudes | Statevector(qc) | Q01–03 |
| Pauli-X, Y, Z | qc.x(0) qc.y(0) qc.z(0) | Q04 |
| Phase gates S and T | qc.s(0) qc.t(0) | Q04 |
| Hadamard | qc.h(0) | Q02, Q04 |
| CNOT (control 0, target 1) | qc.cx(0, 1) | Q04, Q05 |
| Toffoli (quantum AND) | qc.ccx(0, 1, 2) | reference |
| Measure every qubit | qc.measure_all() | Q02 |
| Draw the circuit | print(qc.draw()) | all |
Challenges: rebuild the series in code
- Verify the identity
HZH = Xfrom page 04: apply H, Z, H to |0⟩ and print theStatevector. You should get |1⟩. - Build all four Bell states from page 05. Hint: add
qc.x()gates before the H and CNOT to change the input. - Recreate the interference demo from page 02: H, then H again, then measure. Then add
qc.measure_all()between the two H gates and compare. - Write a one-qubit Deutsch algorithm (page 06 with n = 1) where the oracle is a CNOT. Is that function constant or balanced?
05 · Learn by video
The Qiskit YouTube channel
IBM's official Qiskit channel posts lectures, coding tutorials, and community updates. For a structured path, start with the Understanding Quantum Information & Computation series taught by John Watrous. It's a full university-level course, free, and covers this series' topics in more mathematical depth.
Which lessons match which pages
| Watrous lesson | Goes deeper on |
|---|---|
| 1 · Single Systems | Q01Q02Q03 qubits, measurement, unitary operations |
| 2 · Multiple Systems | Q01Q05 tensor products and entangled states |
| 3 · Quantum Circuits | Q04 gates and circuits, including the no-cloning theorem |
| 4 · Entanglement in Action | Q05Q07 teleportation, superdense coding, the CHSH game |
| 5 · Quantum Query Algorithms | Q06 Deutsch, Deutsch-Jozsa, and Simon's algorithm |
| 7 · Phase Estimation and Factoring | Q08 the full math behind Shor's algorithm |
| 8 · Grover's Algorithm | Q09 the search speedup that weakens symmetric keys |
Older "Coding with Qiskit" videos on the channel were recorded for Qiskit 1.x. Most code still works, but if something fails, compare it with the current documentation.
06 · Free courses and real hardware
Keep going with IBM Quantum Learning
The written version of the Watrous course lives on IBM Quantum Learning, alongside other free courses. One of them, Practical Introduction to Quantum-Safe Cryptography, picks up right where page 09 leaves off.
qiskit-ibm-runtime package. Check the platform for its current terms before assigning hardware runs.