Verified N/M target-native lowering
Lower every supported gate to a published target basis, verify unitary semantics where bounded, and fail closed when no complete decomposition exists.
Target-native lowering 0.1 contract
A successful result contains only gates from the selected target profile and never carries a failed equivalence check. Unsupported rules remain explicit issues instead of being presented as native output.
Success invariant
Every emitted gate is native, unsupportedGates and loweringIssues are empty, and verification is passed or explicitly skipped for a documented boundary.
Verification boundary
Pure unitary programs up to five qubits are compared amplitude-by-amplitude up to global phase with a maximum delta of 1e-8. Target annotations are stripped so both sides use identical statevector semantics.
Published target bases
browser-statevectorall-to-all · 14 qubitsHXYZSTSdgTdgPUGPhaseRxRyRzCNOTCZSWAPiSWAPCCNOTCSWAPCYCHRXXRYYRZZCRyCRzCPbrowser-mpsall-to-all · 100 qubitsHXYZSTSdgTdgPUGPhaseRxRyRzCNOTCZCYCHSWAPiSWAPCCNOTCSWAPCRyCRzCPbrowser-stabilizerall-to-all · 100 qubitsHXYZSSdgCNOTCZSWAPiSWAPCYGPhaseopenqasm3-stdgatesall-to-all · 5 qubitsHXYZSTSdgTdgPUGPhaseRxRyRzCNOTCZCYCHSWAPCCNOTCSWAPCRyCRzCPion-trapall-to-all · 5 qubitsHXYZSSdgPURxRyRzRXXRYYCNOTCRyCRzsuperconductingline · 5 qubitsHXYZSTSdgTdgPURxRyRzRZZCNOTCZCPneutral-atomgrid · 5 qubitsHXYZPRyRzCZCCNOTCSWAPCLI workflow
nm transpile main.nm --target superconducting --jsonnm transpile main.nm --target ion-trapStable lowering diagnostics
Consumers branch on machine-readable target, source, unsupported, verification, and native-invariant codes rather than error prose.
NM-LOWERING-001NM-LOWERING-002NM-LOWERING-003NM-LOWERING-004NM-LOWERING-005Measurement, reset, noise, and classical-control programs can be lowered, but pure-state equivalence is explicitly skipped. verify: false is visible as skipped and never represented as proof.
The matrix executes all 28 gate forms against all six published targets: 152 combinations produce verified native output and 16 non-Clifford browser-stabilizer combinations fail closed.