Skip to main content
NM-RFC-0035

Bounded classical functions

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: Local experimental candidate · product promotion pending

Bound original source · SHA-256
ad912072a547523b38ee5fbdde0ae43bcb91c8725fc009f3697efcd198422ce6

Reading edition reviewed: 2026-10-02

Purpose and scope

Connects named, type-checked, bounded classical helpers to quantum programs. The original contains historical slices and later additions, so restrictions in its first example are not the whole current scope.

Core design rules

  • Helpers include numeric values, fixed arrays, Bool branches and documented Result-recovery scopes; main behavior retains separate limits.
  • Explicit let mut Int/Float, literal 0..256 end-exclusive helper loops and checked Int indices belong to the later T08 scope.
  • Nested calls and loops share 4096 evaluation steps; arrays, parameters and ordinary let values stay immutable.

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
module classical_demo;

fn square(x: Float) -> Float {
  return x * x;
}

fn energy(theta: Float, weight: Float) -> Float {
  let scaled: Float = weight * square(theta);
  return scaled + 0.5;
}

Limits and interpretation

  • Analytic gradient/training paths reject loops, mutation and dynamic indices.
  • Float operations enforce domain and overflow rules; derivatives at discontinuities are not silently invented. The historical first slice is not general language support or publication evidence.

Status and implementation boundary

The source records a local runtime-experimental candidate with product promotion pending. Consult current capabilities and guides for later product decisions; the example above is the original historical numeric first slice.

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