Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions docs/neutral_atom/benchmark_suite.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

A compact benchmark suite for reconfigurable neutral-atom QEC compiler work.
The suite makes compiler tradeoffs visible across QEC memory, logical
measurement, logical entanglement, and (placeholder) non-Clifford workloads.
measurement, logical entanglement, and non-Clifford (magic-state T/CCZ)
workloads.

## Assumptions

Expand All @@ -19,7 +20,8 @@ only** — not sampled data and not threshold claims (ADR-0020).
| Surface d=3 measure | `samples/neutral-atom/benchmarks/surface_d3_measure.qn` | One memory round then logical X measure |
| Surface d=3 CX | `samples/neutral-atom/benchmarks/surface_d3_cx.qn` | Lattice-surgery logical CX between two surface-code blocks |
| Surface d=3 GHZ | `samples/neutral-atom/benchmarks/surface_d3_ghz.qn` | Three-block GHZ-style prep-measure with two logical CX gates |
| Non-Clifford (placeholder) | `samples/neutral-atom/benchmarks/surface_d3_t_placeholder.qn` | Still a placeholder — #283 landed magic-state-consuming `logical_t`/`logical_ccz` at the QEC-workload IR / resource-report layer, but source-level `.qn` syntax for these ops isn't wired into the frontend yet (#311), so a source-driven T/CCZ benchmark can't compile through `quonc` yet |
| Surface d=3 T | `samples/neutral-atom/benchmarks/surface_d3_t.qn` | Magic-state-consuming logical T on one surface-code block (`t_count`) |
| Surface d=3 CCZ | `samples/neutral-atom/benchmarks/surface_d3_ccz.qn` | Magic-state-consuming logical CCZ on three surface-code blocks (`ccz_count`) |

## Compile commands

Expand All @@ -35,6 +37,11 @@ quonc samples/neutral-atom/benchmarks/surface_d3_memory.qn \
quonc samples/neutral-atom/benchmarks/surface_d3_cx.qn \
--target targets/neutral_atom/generic_rna_v0.json \
--emit-resource-report -

# Non-Clifford (magic-state) benchmark
quonc samples/neutral-atom/benchmarks/surface_d3_t.qn \
--target targets/neutral_atom/generic_rna_v0.json \
--emit-resource-report -
```

## Emitted artifacts
Expand All @@ -50,6 +57,7 @@ Each benchmark produces a resource report with comparable metrics:
- **Idle time**: wait time
- **Estimated cycles**: schedule layer count
- **QEC-specific counts**: code family, distance, memory rounds, error budget
- **Magic-state counts** (T/CCZ only): `t_count`, `tdag_count`, `ccz_count`, `magic_state_demand`

## Interpreting results

Expand All @@ -58,12 +66,11 @@ the same code distance but different workload structure (e.g. memory vs CX)
will show different Rydberg stage counts, rearrangement steps, and estimated
cycles — these are the compiler tradeoffs the suite makes visible.

Non-Clifford benchmarks remain a placeholder. Issue #283 landed
magic-state-*consuming* logical T/CCZ as a QEC-workload IR / resource-report
model — see
[`docs/neutral_atom/magic_state_operations.md`](./magic_state_operations.md)
and `examples/na_qec/surface_d3_t.qn` / `surface_d3_ccz.qn` — but that work
did not wire `logical_t` / `logical_tdag` / `logical_ccz` into the frontend
typechecker, so those example programs do not yet compile through `quonc`
(`error: type checking failed: unbound variable`). A surface d=3 T/CCZ
benchmark will be added to this suite once #311 lands that frontend wiring.
The non-Clifford (T/CCZ) benchmarks are magic-state-*consuming* operations:
`logical_t` / `logical_tdag` / `logical_ccz` bind as source identifiers in the
frontend prelude (issue #311, landed via #354) and compile end-to-end through
`quonc`. They are a compiler model of magic-state consumption — not a validated
distillation factory or threshold claim. T/CCZ are recorded as resource-report
metadata (`t_count` / `ccz_count` / `magic_state_demand`) rather than expanded
to physical CNOT/measure/reset rounds; see
[`docs/neutral_atom/magic_state_operations.md`](./magic_state_operations.md).
11 changes: 4 additions & 7 deletions docs/neutral_atom/magic_state_operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ All three are surface-code only. Type checking enforces:
- Correct operation arity
- Distinct logical ids (for CCZ)

These operations bind as source identifiers in the frontend prelude (#311,
landed via #354) and compile end-to-end through `quonc`; see
`samples/neutral-atom/benchmarks/surface_d3_t.qn` and `surface_d3_ccz.qn`.

## Resource reports

Resource reports include:
Expand All @@ -42,10 +46,3 @@ distillation factory.
diagnostics.
- **Not a threshold claim**: magic-state consumption is modeled for resource
accounting, not for claiming fault-tolerant performance.
- **Not yet reachable from `.qn` source**: `logical_t`, `logical_tdag`, and
`logical_ccz` exist as `WorkloadBuilder` methods (`quon_qec/src/workload.rs`)
with expansion (`quon_qec/src/expand.rs`) and resource-report wiring, but
the frontend typechecker/prelude was not updated to bind them as source
identifiers. `examples/na_qec/surface_d3_t.qn` and `surface_d3_ccz.qn` sketch
the intended syntax but do not currently compile through `quonc`
(`unbound variable`); tracked in #311.
28 changes: 28 additions & 0 deletions samples/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,34 @@ entries:
artifacts: []
ci: smoke

- id: neutral-atom/bench-surface-d3-t
path: samples/neutral-atom/benchmarks/surface_d3_t.qn
tags: [neutral-atom, qec, benchmark, surface-code, magic-state, non-clifford, t, pack-284]
difficulty: advanced
quonc_args:
[
"--target",
"targets/neutral_atom/generic_rna_v0.json",
"--emit-resource-report",
"-",
]
artifacts: []
ci: smoke

- id: neutral-atom/bench-surface-d3-ccz
path: samples/neutral-atom/benchmarks/surface_d3_ccz.qn
tags: [neutral-atom, qec, benchmark, surface-code, magic-state, non-clifford, ccz, pack-284]
difficulty: advanced
quonc_args:
[
"--target",
"targets/neutral_atom/generic_rna_v0.json",
"--emit-resource-report",
"-",
]
artifacts: []
ci: smoke

# ── Creative / games pack (#200) ───────────────────────────────────────
- id: creative/quantum-dice
path: samples/creative/quantum_dice.qn
Expand Down
19 changes: 19 additions & 0 deletions samples/neutral-atom/benchmarks/surface_d3_ccz.qn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
-- Benchmark: non-Clifford logical CCZ on three surface-code blocks.
-- Three surface-code blocks, one memory round each, magic-state-consuming
-- logical CCZ, then logical Z measurement of all three blocks.
-- Tests the magic-state-consuming CCZ resource-report path (ccz_count).
-- Compiler model of magic-state consumption — not a distillation factory or
-- threshold claim.

fn surface_d3_ccz_bench(): Q<Bit> = run {
a <- surface_code<3>()
b <- surface_code<3>()
c <- surface_code<3>()
a <- memory_round(a)
b <- memory_round(b)
c <- memory_round(c)
(a, b, c) <- logical_ccz(a, b, c)
_ <- measure_logical_z(a)
_ <- measure_logical_z(b)
measure_logical_z(c)
}
14 changes: 14 additions & 0 deletions samples/neutral-atom/benchmarks/surface_d3_t.qn
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Benchmark: non-Clifford logical T on a surface-code block.
-- One surface-code block, one memory round, magic-state-consuming logical T,
-- then a second memory round and logical Z measurement.
-- Tests the magic-state-consuming T resource-report path (t_count).
-- Compiler model of magic-state consumption — not a distillation factory or
-- threshold claim.

fn surface_d3_t_bench(): Q<Bit> = run {
a <- surface_code<3>()
a <- memory_round(a)
a <- logical_t(a)
a <- memory_round(a)
measure_logical_z(a)
}
14 changes: 0 additions & 14 deletions samples/neutral-atom/benchmarks/surface_d3_t_placeholder.qn

This file was deleted.

21 changes: 9 additions & 12 deletions website/src/content/docs/guides/na-ft-demo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -318,18 +318,15 @@ This demo is deliberately scoped. What it does **not** do:
neutral-atom descriptor
[`generic_rna_v0.json`](https://github.com/arniber21/quon/blob/main/targets/neutral_atom/generic_rna_v0.json),
not any vendor's calibrated device model.
- **Non-Clifford logical operations are a resource-accounting model, not yet
compiler-reachable from source.** Magic-state-*consuming* logical `T`,
`T†`, and `CCZ` exist at the QEC-workload layer (issue #283): a
`WorkloadBuilder` API, expansion into magic-state rounds, resource-report
fields (`t_count`, `tdag_count`, `ccz_count`, `magic_state_demand`), and QEC
experiment / Stim-comment emission. This is strictly *consumption* — magic
states are assumed already available and are never produced. There is no
distillation factory, and T/CCZ are recorded as metadata rather than
expanded to physical gates. The frontend typechecker does not yet bind
`logical_t` / `logical_tdag` / `logical_ccz` as source identifiers, so
`quonc` cannot compile a `.qn` program that uses them end-to-end yet
(tracked in #311). The logical operation demonstrated on this page
- **Non-Clifford logical operations are a resource-accounting model.**
Magic-state-*consuming* logical `T`, `T†`, and `CCZ` compile end-to-end
from `.qn` source through `quonc` (issue #311, landed via #354; see
`samples/neutral-atom/benchmarks/surface_d3_t.qn` and `surface_d3_ccz.qn`).
This is strictly *consumption* — magic states are assumed already available
and are never produced. There is no distillation factory, and T/CCZ are
recorded as metadata (`t_count` / `tdag_count` / `ccz_count` /
`magic_state_demand` in the resource report) rather than expanded to
physical gates. The logical operation demonstrated on this page
(`logical_cx`) remains Clifford.

## Where this fits
Expand Down
Loading