Compiler & ISA
v4.1 · pipeline · tri-QPUThe NWO-ASM compiler lowers a single source program into the Process-Matrix IR, then routes each block through the MetaState optimizer to its best substrate target. Multi-stage by design: parse, lower, optimize, schedule, emit. Targets are pluggable — and writing the language itself is free, MIT-licensed, with no platform lock-in.
qpu.ibm (Qiskit Runtime · SamplerV2), qpu.origin (Origin Wukong via QPanda3), and qpu.osaka (Osaka QIQB ¹⁷¹Yb⁺ ion trap via OQTOPUS Cloud — single-qubit-live @ 94% today, hybrid-routed for ≥ 2q). The EVM-target backend (so EVM chains can invoke NWO-ASM computations and receive verified results back) is design-complete, integration in progress; the cross-chain quantum-secured bridge is roadmap. Nothing here is claimed before it is shipped.
Compilation as a routed pipeline
Each stage produces a typed artifact handed to the next. The optimizer chooses substrate placement after IR lowering, using free-energy minimisation across substrate cost models.
Six pieces of the compiler
Multi-stage
Parse → AST → Process-Matrix IR → optimized IR → target emission. Each stage is inspectable and replaceable.
LiveMetaState routing
The optimizer evaluates a free-energy bound across substrate cost models to choose per-block placement.
LiveOptimization passes
Dead-code elimination, causal-coherence scheduling, kernel fusion, and substrate-aware tiling on the IR.
LivePost-quantum signing
Compiled artifacts can be signed with CRYSTALS-Dilithium so the binary's provenance is verifiable on-chain.
LiveMulti-backend
One source emits to LLVM (CPU), PTX/HIP (GPU), or QASM3 (QPU). ECG-hive backend is BETA. EVM-target is design-complete.
LiveAgent-native
Compile, sign, and dispatch from an autonomous agent loop. The terminal exposes the full pipeline as commands.
LiveFrom source to QASM3 + USDC settlement
A minimal NWO-ASM program that scores an anomaly signal with the symbolic regressor, then lifts the residual to a 2-qubit process matrix the optimizer can route to a QPU when present, with a classical fallback. Per-call settlement is automatic.
signal.nwo · source# anomaly score on a 1-D signal, fit symbolic residual, route best path module signal { input s : f32[8192] output r : pmx[2] # 2-qubit process matrix let v = anomaly.score(s) # free-energy bound let e = eml.regress(s, v) # closed-form residual r = pmx.lift(e) # causal-coherence channel route r via metastate { prefer: qpu # IBM · Origin Wukong · or Osaka ion-trap if available fallback: gpu # otherwise nwo-agi distributed GPU settle: usdc(base) # per-call, via splitter — no new contract } }terminal · compile and emit
# compile and inspect IR nwo-asm build signal.nwo --emit pmx,qasm3 → signal.pmx → signal.qasm3 # sign and dispatch (settles in USDC on Base) nwo-asm dispatch signal.qasm3 --backend qpu --wallet $WALLET → dispatched to backend = qpu.osaka(iontrap_yb171) · proof = 0xPOI… (optimizer weighed qpu.ibm · qpu.origin · qpu.osaka; picked lowest free-energy) → settled $0.0008 USDC · split 35/35/30 · affiliate (if set) +15%
Core instruction set (stable)
| Op | Signature | Notes |
|---|---|---|
| anomaly.score | f32[N] → f32 | Free-energy anomaly metric on a signal. |
| eml.regress | (f32[N], f32) → expr | Closed-form symbolic regression. |
| pmx.lift | expr → pmx[k] | Lift a symbolic expression into a k-qubit process matrix. |
| route | pmx, policy → handle | Defer placement to the MetaState optimizer. |
| poi.verify | handle → proof | Proof of Inference; signed (PQC) and optionally zk. |
| anchor | proof → tx | Prepare keccak256 calldata to settle on Base. |
What it's built on
| Layer | Tech | Status |
|---|---|---|
| Parser / IR | Rust · tree-sitter grammar · custom Process-Matrix IR | Live |
| Optimizer | MetaState kernel · free-energy bound across substrate cost models | Live |
| CPU target | LLVM 17 lowering · x86 / ARM / RISC-V | Live |
| GPU target | PTX (CUDA) · HIP (ROCm) · Metal · nwo-agi distributed mesh | Live |
| QPU · IBM | OpenQASM 3.0 → Qiskit Runtime · SamplerV2 | Live |
| QPU · Origin Wukong | OpenQASM 3.0 → QPanda3 · Origin Cloud (Wukong 72q, Wukong-180) | Live |
| QPU · Osaka QIQB | QURI Parts circuit → quri-parts-oqtopus → OQTOPUS Cloud (¹⁷¹Yb⁺ ion trap) | Live · 1q |
| Signing | CRYSTALS-Dilithium (PQC) · proof-of-inference attestation | Live |
| Settlement | Existing MetaStateSplitter on Base · 35/35/30 + 15% affiliate | Live · no new contract |
| EVM target | EVM bytecode emission for on-chain hooks · Solidity ABI surface | Design-complete |
| Cross-chain bridge | Quantum-secured message relay between chains and NWO-ASM | Roadmap |
| Photonic / neuromorphic / DNA / crystalline | Backend interfaces specified; pending hardware integration | Roadmap |