1 · Hello, Quon
The smallest complete program: a typed circuit value, the Quantum Monad,
and measurement. Read the Circuit<2, 2, 2, Clifford> type before the gates.
The learning track is a short, ordered path from “what is a Quon program?” to
“recover a secret with a quantum oracle.” Each lesson is one small .qn program
under samples/learning/
that you can read, compile, and edit without opening the language specification.
The pages below teach the same material in prose, in order.
The track is deliberately Quon-native. It does not teach a circuit-building API
the way a Python framework would. It teaches quantum computing through the lens of
Quon’s two load-bearing ideas: a circuit is a typed value (Circuit<n, m, d, C>), and a qubit is a linear value that is consumed exactly once. Those two
ideas — not a matrix library — are what let the compiler catch width mismatches,
depth overruns, cloned qubits, and leaked ancillae before a single gate runs.
Build the compiler once from the repository root:
cargo build --release -p quoncThen compile any lesson to OpenQASM 3:
./target/release/quonc samples/learning/hello_quon.qn --emit-qasmEvery lesson compiles to a flat QASM program you can sample on any simulator. Two lessons ship a Python checker that runs the compiled program on Qiskit Aer and asserts the statistics.
1 · Hello, Quon
The smallest complete program: a typed circuit value, the Quantum Monad,
and measurement. Read the Circuit<2, 2, 2, Clifford> type before the gates.
2 · States & measurement
Computational basis versus superposition, and the Born rule — checked on
Aer. Why measure consumes a qubit and hands back a copyable Bit.
3 · Gates & composition
Sequential |> (depth adds) versus a parallel layer (depth = max). Depth as
a verified type-level bound, not an after-the-fact count.
4 · Linearity & ancilla
Why a qubit cannot be copied, what an ancilla owes you, and how the linear type system turns no-cloning into a compile-time fact.
5 · Entanglement
A Bell pair and a separable pair measured in one shot — correlation versus independence made visible in the histogram.
6 · Oracles & algorithms
The phase-kickback oracle seed that recovers a one-bit secret in a single query — the on-ramp to the textbook algorithm pack.
Read them in order. Each lesson links to the next, and the last hands off to the algorithm samples and the cookbook.
This track is the beginner on-ramp. For the formal language concepts once you finish it, read the Language guide — it covers the same ground (circuits, linearity, parallel composition, depth, measurement, borrow) at reference depth. The cookbook then walks complete end-to-end programs that the CI verifies on Aer.
→ Start with Lesson 1: Hello, Quon.