What's wrong
Issue #283 / PR #288 ("QEC: magic-state-consuming logical T and CCZ operations") landed the QEC workload IR layer for logical T/T†/CCZ:
quon_qec/src/workload.rs: WorkloadBuilder::logical_t / logical_tdag / logical_ccz with validation
quon_qec/src/expand.rs: RoundKind::MagicT / MagicTdag / MagicCcz expansion + counters
quon_qec/src/experiment.rs: ExperimentRoundKind variants + Stim comment emission
quon_na/src/report.rs + quon_na/src/qec_schedule.rs: t_count / tdag_count / ccz_count / magic_state_demand resource-report fields
But the PR did not touch frontend/src/ at all. logical_t, logical_tdag, and logical_ccz are not registered in:
frontend/src/analysis/prelude_names.rs (quantum_builtins() — has logical_cx but not the new ops)
frontend/src/typecheck/builtins.rs / frontend/src/typecheck/mod.rs
frontend/src/lower.rs
As a result, the example programs added by that same PR do not compile:
$ cargo run -p quonc --release -- examples/na_qec/surface_d3_t.qn --target targets/neutral_atom/generic_rna_v0.json --emit-resource-report -
Error: type checking failed: unbound variable `logical_t`
$ cargo run -p quonc --release -- examples/na_qec/surface_d3_ccz.qn --target targets/neutral_atom/generic_rna_v0.json --emit-resource-report -
Error: type checking failed: unbound variable `logical_ccz`
This contradicts issue #283's acceptance criteria, which were checked off in the PR description:
- "Source-level syntax, intrinsic calls, or standard-library functions exist for logical T/Tdag." (unmet — no frontend binding)
- "At least one T example and one CCZ example compile through the neutral-atom target and emit schedule, QEC experiment, and resource artifacts." (unmet — both examples fail to compile)
What to build
Wire logical_t, logical_tdag, logical_ccz into the frontend the same way logical_cx is wired (prelude registration, type synthesis in typecheck/mod.rs, lowering in lower.rs) so that examples/na_qec/surface_d3_t.qn and examples/na_qec/surface_d3_ccz.qn actually compile through quonc end-to-end, matching #283's original acceptance criteria.
Found while
Verifying doc claims for a docs PR (na-ft-demo.mdx / benchmark_suite.md) — the docs are being written to accurately state that non-Clifford ops exist at the QEC-workload/resource-report layer but are not yet reachable from .qn source via quonc.
Blocked by
None - can start immediately; scoped extension of #283's frontend wiring.
What's wrong
Issue #283 / PR #288 ("QEC: magic-state-consuming logical T and CCZ operations") landed the QEC workload IR layer for logical T/T†/CCZ:
quon_qec/src/workload.rs:WorkloadBuilder::logical_t/logical_tdag/logical_cczwith validationquon_qec/src/expand.rs:RoundKind::MagicT/MagicTdag/MagicCczexpansion + countersquon_qec/src/experiment.rs:ExperimentRoundKindvariants + Stim comment emissionquon_na/src/report.rs+quon_na/src/qec_schedule.rs:t_count/tdag_count/ccz_count/magic_state_demandresource-report fieldsBut the PR did not touch
frontend/src/at all.logical_t,logical_tdag, andlogical_cczare not registered in:frontend/src/analysis/prelude_names.rs(quantum_builtins()— haslogical_cxbut not the new ops)frontend/src/typecheck/builtins.rs/frontend/src/typecheck/mod.rsfrontend/src/lower.rsAs a result, the example programs added by that same PR do not compile:
This contradicts issue #283's acceptance criteria, which were checked off in the PR description:
What to build
Wire
logical_t,logical_tdag,logical_cczinto the frontend the same waylogical_cxis wired (prelude registration, type synthesis intypecheck/mod.rs, lowering inlower.rs) so thatexamples/na_qec/surface_d3_t.qnandexamples/na_qec/surface_d3_ccz.qnactually compile throughquoncend-to-end, matching #283's original acceptance criteria.Found while
Verifying doc claims for a docs PR (na-ft-demo.mdx / benchmark_suite.md) — the docs are being written to accurately state that non-Clifford ops exist at the QEC-workload/resource-report layer but are not yet reachable from
.qnsource viaquonc.Blocked by
None - can start immediately; scoped extension of #283's frontend wiring.