Skip to main content
Language v0.2.0 · Preview

Fail-closed target capability constraints

Negotiate an exact target profile, native gate set, connectivity topology, and bounded reference error budget with deterministic compiler evidence.

Make target assumptions executable

NM-RFC-0006 turns a backend assumption into a bounded, fail-closed contract. Stable N/M 0.1 stays unchanged until every active surface explicitly negotiates the feature.

NM-RFC-0006experimental0.2.0-runtime-experimental
2048
annotation bytes
32
gate-set entries
1
max error

Exact target profile

The capability profile must be registered and must equal @target when both annotations exist. Unknown or drifting profiles stop compilation.

exact-known-profile

Closed native gate set

Every source gate must appear in gate_set and must be native to the selected profile. This evidence is produced before lowering can hide an incompatibility.

closed-world-native-source-gates

Exact connectivity

line, grid, and all-to-all are compared exactly. The first contract does not infer that a stronger topology satisfies a weaker request.

exact-no-topology-inference

Bounded reference error

max_error is checked against a versioned educational reference model. It is deterministic evidence, not a claim about live device calibration.

bounded-reference-profile-not-live-calibration

Superconducting Bell capability contract

module target_capability_bell;@target("superconducting");@target_capabilities(profile: "superconducting", gate_set: ["H", "CNOT"], connectivity: "line", max_error: 0.08); fn main() {  let q: QReg<2> = qreg[2];  H(q[0]);  CNOT(q[0], q[1]);  return q;}

Deterministic evidence

Core, CLI, Worker, IR, QASM 3 sidecar, and Playground expose the same required, missing, and undeclared gates, topology result, error estimate, and pass/fail decision.

{ requiredGates, missingGates, undeclaredProgramGates, connectivity, errorBudget, passed }

Explicit negotiation

experimental.targetCapabilityConstraints = truenm run main.nm --experimental-target-capability-constraints --jsonnm.experimental.targetCapabilityConstraints = true

Reference model

browser-statevector1q 0 · 2q 0 · readout 0
browser-mps1q 0 · 2q 0 · readout 0
browser-stabilizer1q 0 · 2q 0 · readout 0
ion-trap1q 0.0005 · 2q 0.005 · readout 0.01
superconducting1q 0.002 · 2q 0.025 · readout 0.02
neutral-atom1q 0.003 · 2q 0.02 · readout 0.015

Stable fail-closed diagnostics

NM-PARSE-064NM-PARSE-065NM-TARGET-040NM-TARGET-041NM-TARGET-042NM-TARGET-043

This experimental slice does not fetch live calibration, rank providers, infer topology subsumption, or promise successful hardware execution. Calibrated placement and scheduling remain separate compilation stages.