Skip to main content
NM-RFC-0010

Typed oracles and generic algorithms

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
0a106dfb18705e7641f4ce7e52681853d5d9a1e4a1505ce3dca2d9c05f82a06c

Reading edition reviewed: 2026-10-02

Purpose and scope

Distinguishes oracle types and compile-time specialized algorithms from ordinary circuit names. Phase/XOR behavior, verification conditions and auxiliary-qubit ownership become visible source contracts.

Core design rules

  • PhaseOracle<N> and XorOracle<N,M> express different effects; silently coercing one into the other is not accepted.
  • Generic source is lowered to a concrete circuit before execution while retaining source and specialization provenance.
  • Tier A/Tier B verification, clean auxiliary-resource conditions and algorithm preconditions are checked separately.

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
xor_oracle parity_101(x: QReg<3>, out: QReg<1>) {
  CNOT(x[0], out[0]);
  CNOT(x[2], out[0]);
}

Limits and interpretation

  • Generic Grover support does not imply generic Simon, QPE or Shor support.
  • Qubit, expansion and verification budgets remain bounded; an oracle type is not scalability or hardware-advantage evidence.

Status and implementation boundary

The original records both proposed status and an experimental reference implementation. An implementation record is not promotion to a stable feature; check the capability center for current availability.

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