First-time learner
Learn typed quantum programming from first principles — no prerequisite. Start the learning track ->
Quon is a typed quantum compiler. Programs carry depth bounds, Clifford classifications, and linear resource ownership in their types — not as comments, not as runtime checks, as types the compiler verifies before a single gate is lowered.
A circuit is a value with a four-parameter type: Circuit<n, m, d, C>. The
type says this transformation takes n qubits in, produces m qubits out,
completes in d steps, and belongs to the Clifford class C. The typechecker
enforces every one of those claims. Compose two circuits with |> and the
depths add; run them in par and the depth is the maximum. Break the depth
budget, mis-count the qubits, use a qubit twice, or forget to measure — and the
program does not compile.
This is what a typed Bell pair looks like:
fn bell_state(): Circuit<2, 2, 2, Clifford> = circuit { H @0 |> CNOT @(0, 1)}The return type Circuit<2, 2, 2, Clifford> is a contract: two qubits in,
two out, depth exactly two, Clifford class — all four checked before a single
gate is lowered. The language guide unpacks the
types from first principles; the cookbook verifies the
circuit end to end.
Route yourself by what you want to do. Each path states its prerequisite, expected outcome, and next page on the orientation page.
The docs are organized in three depths, each linking to the next in both
directions: Language guide (concepts) explains what a .qn program
means and why; Reference (contract) is stable lookup of what each
pipeline stage and quonc flag guarantees; Architecture (rationale)
explains where each stage lives in the compiler source and why the ADRs
shaped it that way.
First-time learner
Learn typed quantum programming from first principles — no prerequisite. Start the learning track ->
Algorithm researcher
Run complete, Aer-verified algorithms with checked resource bounds. Open the cookbook ->
Backend / neutral-atom user
Compile to OpenQASM 3 or a neutral-atom schedule and resource report. Target a backend ->
Install Quon
Set up the Rust toolchain, LLVM/MLIR 22, and Z3 with Devbox or system
packages, then build the quonc compiler.
Install ->
Run the quickstart
Compile a checked-in Bell pair to OpenQASM 3. Aer sampling and neutral-atom emission are optional follow-ons with their own prerequisites. Run it ->
Your second program
Teleportation with QReg destructuring, the Quantum Monad,
measurement, and classical feed-forward control.
Read it ->
Learn the language
(concepts) Linear qubit types, the Circuit<n, m, d, C> contract,
the Quantum Monad, classical control, and parametric circuits —
explained from first principles.
Start the guide ->
Read the architecture
The compiler pipeline from source text to backend artifact: parsing, typechecking, MLIR lowering, optimization passes, and target-specific emission. See the pipeline ->
Language author
Extend the compiler or build the LSP, formatter, and linter. Read the architecture ->
Contributor
Improve the codebase or docs against the pre-PR gate. Set up a checkout ->
The same typed program lowers to different backends without source changes. A fixed gate-model target receives OpenQASM 3; a reconfigurable neutral-atom target receives a movement schedule and a resource report. The types survive the entire pipeline — depth bounds and Clifford classifications inform optimization passes, not just the frontend.
Compile the Bell program for a fixed gate-model target:
cargo run -p quonc -- test/verify/bell.qn --emit-qasmCompile it for a reconfigurable neutral-atom target:
cargo run -p quonc -- test/na/bell.qn \ --target targets/neutral_atom/generic_rna_v0.json \ --emit-na-schedule \ --emit-resource-reportThe quickstart walks both targets end to end — compilation, Aer sampling, and artifact inspection.