Skip to main content
NM-RFC-0012

Typed collection and GF(2) artifacts

Design document · English reading edition

RFCs record designs and changes. A proposal appearing here does not mean its feature is ready to use. Explore current language support

Status recorded in the original: Proposed

Bound original source · SHA-256
55e1014748419ce68d4dcfb6398c36e16cc3a56c3fc4e71d849432c34d4bf584

Reading edition reviewed: 2026-10-02

Purpose and scope

Proposes retaining ordered classical rows from individual shots instead of only an aggregate histogram. GF(2) operations perform deterministic classical linear algebra over those rows.

Core design rules

  • collect<K> carries a result shaped as Array<BitVec<N>,K> with ordering and width information.
  • The measurement binding must be unique and final; a seed is explicit.
  • The GF(2) module supplies rank, null-space and linear-system operations; these are not reversible quantum gates.

Example from the original

This example illustrates the design recorded in the original. It is not by itself a claim of executable or stable support; check required options and the current version.

nm
@seed(41);

fn main() {
  let q: QReg<3> = qreg[3];
  collect<64> {
    H(q[0]);
    CNOT(q[0], q[1]);
    let rows: BitVec<2> = measure_all(q[0..1]);
  }
}

Limits and interpretation

  • The browser contract bounds K <= 4096; exceeding it is an error rather than a silent cap.
  • sample and collect cannot coexist in one program; this slice does not establish generic Simon readiness.

Status and implementation boundary

The source is proposed and records experimental negotiation rules. Keep current collection support separate from the additional resource boundaries needed for generic Simon.

Table 1
Review topicInformation to check
Source revisionSHA-256 digest bound to this reading edition
AvailabilityCurrent capability record and tool options
Evidence boundaryModel, size and interpretation limits above