Versioned N/M ML standard library
Use seven frozen QML circuits and observables through exact-version imports, fail-closed resolution, verified package identities, and Core/CLI/Worker semantic parity.
ML standard-library 0.1 contract
Seven curated QML helpers publish frozen identities, exports, minimum-qubit requirements, source templates, exact package versions, and deterministic expansion semantics.
v0.1Exact-version source imports
Registry imports accept an optional numeric @version suffix. Exact 0.1 imports are recommended for reproducible source; malformed or unavailable versions fail before execution. Workspace imports remain pinned by the workspace manifest and reject @version.
use ml.vqc_layer@0.1;use ml.vqc_layer; // compatible 0.1 aliasFrozen seven-entry catalog
The catalog covers two- and three-qubit VQC layers, data re-uploading, two linear entanglers, an IQP feature map, and a ZZ correlation observable.
vqc_layer
ml.vqc_layer@0.1Two-qubit hardware-efficient variational layer.
vqc_layer · ml.vqc_layer@0.1
use ml.vqc_layer@0.1; vqc_layer(q, t1, t2);vqc_layer3
ml.vqc_layer3@0.1Three-qubit hardware-efficient variational layer.
vqc_layer3 · ml.vqc_layer3@0.1
use ml.vqc_layer3@0.1; vqc_layer3(q, t1, t2, t3);reupload_block
ml.reupload_block@0.1Single-qubit data re-uploading block.
reupload_block · ml.reupload_block@0.1
use ml.reupload_block@0.1; reupload_block(q, x, w);entangle_linear2
ml.entangle_linear2@0.1Two-qubit linear entangler.
entangle_linear2 · ml.entangle_linear2@0.1
use ml.entangle_linear2@0.1; entangle_linear2(q);entangle_linear3
ml.entangle_linear3@0.1Three-qubit linear entangler.
entangle_linear3 · ml.entangle_linear3@0.1
use ml.entangle_linear3@0.1; entangle_linear3(q);iqp_map2
ml.iqp_map2@0.1Two-qubit depth-one IQP feature map.
iqp_map2 · ml.iqp_map2@0.1
use ml.iqp_map2@0.1; iqp_map2(q, x1, x2);ZZObservable
ml.zz_observable@0.1Two-qubit ZZ correlation observable.
ZZObservable · ml.zz_observable@0.1
use ml.zz_observable@0.1; expect ZZObservableCanonical identity invariant
Every source id@version equals its package manifest specifier; exported symbols, module source, integrity digest, and resolver result are checked together.
Expansion semantics
Legacy and exact imports expand to the same circuit or observable source. Every entry is parsed and executed against an identical semantic projection.
Clean package boundary
The packed @nm-lang/core surface exports the catalog and resolver, rejects future versions, and executes an exact-version ML program in a clean consumer installation.
Maximum-catalog ratchet
CI repeatedly resolves and parses all seven entries under explicit latency and RSS budgets on the supported runtime matrix.
Stable import diagnostics
Unknown ids, malformed specifiers, unsupported versions, and illegal versioned workspace imports are distinguishable without parsing localized prose.
NM-PARSE-018NM-PARSE-049NM-PARSE-050Contract 0.1 freezes these seven local templates, not a general dependency solver or arbitrary third-party code execution. New modules or breaking source changes require a new reviewed contract/version.
Exact and legacy semantics, hostile versions, package integrity, Core/CLI/Worker parity, clean tarball execution, mobile documentation, and the seven-entry performance ratchet are automated promotion evidence.