Skip to main content
N/M v0.2.0 · Preview

The Native Language of Quantum Mechanics

A preview quantum programming language with a stable 0.1 parser and statevector core, a usable workspace and tooling spine, and explicitly opt-in experimental N/M 0.2 capabilities.

First experiment: run, inspect, compare

  1. 01 / Open the Bell example in Playground and run the local simulation.
  2. 02 / Inspect the measurements, state probabilities, and execution trace.
  3. 03 / Select the Bell preset in Experiment Studio and compare noise effects with the same seed.
Start with the Bell example

Explore the N/M toolchain

NM-RFC-0014 · Proposed experimental slice

Reuse folded structural dimensions without runtime sizing

Closed const Int expressions now cover registers, Angle vectors, bounded loops, sample/collect counts, BitVec widths, and inclusive slices while preserving source and folded metadata.

The structural-position set is closed; runtime-sized values and higher backend ceilings remain unsupported.

NM-RFC-0015 · Proposed experimental slice

Specialize reusable circuits before runtime

Compile exact-width, disjoint register views into concrete circuits and generate checked QFT or inverse-QFT specializations from Algorithm Pack 0.5.

QFT/IQFT supports N=1..5; generic circuits stay opt-in and do not raise simulator or hardware ceilings.

Playground Runtime

The browser simulator runs a small, documented subset for learning: qreg, supported gates, measurement, and return.

Language Spec

The broader design covers typing, hybrid functions, modules, diagnostics, and quantum-classical boundaries.

Platform Roadmap

Compiler, runtime scheduling, backend targeting, and hardware-aware workflows are treated as staged product work.

Playground-ready

// Playground Runtime: executable N/M subset
module bell_state;

fn main() {
  let q = qreg[2];

  H(q[0]);
  CNOT(q[0], q[1]);

  let a = measure(q[0]);
  let b = measure(q[1]);

  return (a, b);
}

Expected result: both measured bits agree: 00 or 11.

Run this example in Playground
Quick Start

Current executable subset

Start with the subset that actually runs in the playground, then follow docs and Learn lessons into the larger spec preview.

moduleconstQReg<n>H/X/Y/Z/S/TCNOT/CZ/SWAP/CCNOTRy/RzCRy/CRz/CPifsampleassert@noise@seedmeasure

Platform Capabilities

Planned language capabilities are shown as spec preview until the playground/runtime supports them.

Hybrid Runtime

Spec preview

Planned support for quantum functions coordinated with classical control and optimizer loops.

Type Safety

Spec preview

Planned resource tracking for measured qubits, no-cloning constraints, and safer quantum state handling.

Auto-Correction

Spec preview

A future QEC layer for logical qubits, stabilizer workflows, and runtime telemetry, not a current playground feature.

Backends

Spec preview

Backend targeting is a roadmap area for simulator and hardware-specific constraints.

Quantum Flow

Spec preview

Control flow beyond the current subset is documented as spec preview before it becomes executable.

Optimization

Spec preview

Hardware-aware optimization is positioned as compiler research and staged platform work.

Learn the runnable subset first

The most reliable starting point is the N/M Fundamentals path, then the docs reference and playground examples.

Start N/M Fundamentals