API Reference

July 7, 2026 · View on GitHub

Auto-generated from source docstrings via mkdocstrings. Python classes auto-delegate to Rust when the spo_kernel extension is available; the public interface is identical in both backends.

What this index is for

This index is the operational entrypoint for implementation teams. It is organized by what users are trying to do (run, validate, control, prove, report), not by internal file layout.

Use it in this order when starting from a requirement:

  1. Pick a goal in the API by Job section.
  2. Follow the corresponding guide or tutorial for domain, adapter, and benchmark context.
  3. Move to the Minimal Imports by Task section before any exploratory refactor.
  4. Confirm review requirements via the PHA-C acceptance evidence chain and the matching benchmark lane.

This keeps navigation aligned with production outcomes instead of code structure.

How to use this map in execution planning

Use this page as the first gate in implementation planning:

  • choose one operational objective in API by Job,
  • move to the supporting guide or tutorial for context,
  • use the linked API entrypoints only with a specific test scope,
  • confirm the related evidence contracts before moving into deployment flow.

This order keeps review scope stable. The link graph is complete enough for single-path decisions, and it avoids parallel API exploration that can create hidden dependency risk.

If you are still deciding what SPO is for, start with the Use Cases and Value Map. This API index is organised for implementation work after the domain, data source, and safety boundary are known.

How this API boundary is intended to be used

The index is not a complete replacement for the pipeline pages. It is the implementation anchor for readers who already know:

  • which domain assumption is being modelled,
  • what decision boundary defines acceptable intervention,
  • and which replay or audit checks are mandatory before exposure to actuators.

Use this page to confirm "which API surface can be used under which safety assumption" before changing imports, defaults, or policy rules.

API by Job

JobPrimary APISupporting docsTypical output
Run a reviewed binding from PythonPython FacadeQuickstartOrchestratorState with phases, coupling, frequencies, and order parameter
Validate and resolve domain assumptionsBindingNew Domain Checklistaccepted binding spec or explicit diagnostics
Extract phase from dataOscillatorsFrom Raw Sources to Runphysical, informational, or symbolic phase series
Simulate coupled dynamicsUPDEUPDE Numericsphase trajectory, order parameters, and backend evidence
Infer or build couplingCouplingBuild K_nm TemplatesK_nm, lag, topology, or causal-coupling evidence
Detect coherence and instabilityMonitorAnalysis ToolkitR, PLV, PAC, Lyapunov, entropy, recurrence, and safety signals
Detect phase-space merge readinessMerge WindowUPDE Moving Frameconsecutive phase-plus-position lock evidence
Emit review-only PHA-C event statePHA-C HandoffMerge Windowhashed non-actuating handoff record for replay, MIF, or Studio review
Emit review-only PHA-C event timelinePHA-C Event TimelinePHA-C Handofffirst lock, lock loss, reset counts, and trajectory hash evidence
Gate the full PHA-C chainPHA-C Acceptance ChainPHA-C Event Timelineend-to-end spatial, Doppler, moving-frame, merge, handoff, timeline, and formal-obligation evidence
Bind PHA-C runtime evidence to LeanPHA-C Lean Proof ObligationPHA-C Acceptance Chainfixed-point KinematicBounds.acceptanceCertificate discharge plus continuous-envelope manifest and formal certificate hash
Propose bounded controlSupervisor and ActuationProduction Guiderate-limited review proposals, not unreviewed hardware writes
Replay and audit decisionsAuditDeterministic Replayhash-linked evidence that can be verified later
Optimise differentiable oscillator modelsnn APIDifferentiable Kuramotodifferentiable loss, trained coupling, or topology proposal

Minimal Imports by Task

TaskImport firstEscalate when
Run a local bindingfrom scpn import Orchestratoryou need amplitude, delay, stochastic, or hardware-adjacent adapters
Inspect final coherenceOrchestratorState.order_parameteryou need per-layer, PLV, PAC, Lyapunov, or transfer-entropy monitors
Build a domainpackload_binding_spec, validate_binding_specyou need auto-binding proposals or generated scaffolds
Optimise couplingscpn_phase_orchestrator.nn.functionalyou need Equinox layers, SAF loss, or inverse coupling
Review evidenceAuditLogger and replay APIsyou need deterministic comparison across environments

API by Reader

ReaderMinimal surfaceWhen to go deeper
Notebook userPython Facadeuse engine APIs when amplitude, delay, stochastic, or simplicial dynamics are required
Domainpack authorBinding, Oscillators, Couplinguse supervisor APIs after sources and boundaries validate
Operator or platform engineerQueueWaves, Audit, Reporting, Studiouse distributed sync and adapters only after audit replay is stable
ML researchernn API, Autotuneuse SAF, inverse coupling, and replay learners after reproducible seeds are fixed
Release reviewerDocumentation Coverage, CLI, Artifactscompare the public API manifest, changelog, and release hygiene before tagging

PHA-C acceptance evidence chain

PHA-C records are review-only evidence surfaces. They never actuate hardware, mutate a supervisor, or change coupling policy. Use them when a downstream MIF/FRC lane, release reviewer, benchmark gate, or operator dashboard needs auditable proof that the accelerator-facing physics chain stayed inside its declared phase, spatial, and kinematic envelopes.

SurfaceEvidence boundaryFormal or replay guarantee
PHA-C Handoffone moving-frame sample plus merge-window marginscanonical non-actuating record hash and signed-margin replay
PHA-C Event Timelinecomplete phase/position trajectoryfirst-lock, lock-loss, reset, transition-hash, and timeline-hash replay
PHA-C Acceptance Chainspatial modulation, Doppler correction, moving-frame propagation, merge evidence, handoff, timeline, and aggregate subgate evidencefinal-position, maximum-velocity, path-length, signed-margin, schedule, trajectory, and acceptance-hash replay
PHA-C Lean Proof Obligationfixed-point manifest derived from a verified acceptance recordKinematicBounds.acceptanceCertificate plus acceptance_certificate_discharges_runtime_preconditions binding spatial budget, phase budget, and acceptance equation replay

The acceptance benchmark row preserves this same chain across Rust, Go, Julia, Mojo, and Python source-contract slots. Local committed benchmark JSON is a regression snapshot only; production timing claims require the documented benchmark-isolation protocol.

Public API entry point

from scpn_phase_orchestrator import (
    AuditLogger,
    BifurcationDiagram,
    BindingSpec,
    BoundaryObserver,
    ControlAction,
    CouplingBuilder,
    Orchestrator,
    OrchestratorState,
    PhaseExtractor,
    PhaseState,
    QPUDataArtifact,
    RegimeManager,
    SPOError,
    SparseUPDEEngine,
    SheafUPDEEngine,
    StuartLandauEngine,
    SupervisorPolicy,
    UPDEEngine,
    compile_domain_to_qpu_artifact,
    emit_qpu_data_artifact,
    find_critical_coupling,
    lyapunov_spectrum,
    trace_sync_transition,
    validate_qpu_data_artifact,
)

The frozen top-level manifest is tracked in public_api_manifest.txt. Any change to scpn_phase_orchestrator.__all__ must update that manifest, this import block, and release notes in the same change so semantic-versioning review can classify the compatibility impact.

Module index

ModuleDescription
Python FacadeHigh-level local simulation API for notebooks and applications
Core & ExceptionsException hierarchy, Rust/Python compat constants
BindingConfiguration loading and validation for binding specs
UPDE EngineKuramoto ODE, Stuart-Landau amplitude ODE, metrics, PAC
UPDE — PHA-C HandoffReview-only event/state bridge from moving-frame samples and merge-window evidence
UPDE — PHA-C Event TimelineReview-only trajectory evidence for first lock, lock loss, resets, and timeline hashes
UPDE — PHA-C Acceptance ChainEnd-to-end review gate spanning spatial coupling, Doppler, moving-frame dynamics, merge evidence, handoff, timeline hashes, and Lean-facing formal-obligation evidence
UPDE — PHA-C Lean Proof ObligationFixed-point Lean KinematicBounds.acceptanceCertificate, SPOFormal.Continuous, and phase-budget proof-obligation manifest derived from a verified PHA-C acceptance record
OscillatorsPhase extraction: Physical, Informational, Symbolic channels
CouplingK_nm matrix construction, geometry constraints, lag estimation
SupervisorRegime management, policy engine, Petri net FSM, event bus
MonitorBoundary violation detection, coherence monitoring
Monitor — Merge WindowPHA-C phase-plus-position merge lock gate with consecutive-sample evidence
ActuationControl output mapping, action projection
ImprintHistory-dependent coupling modulation
DriversExternal forcing functions (Physical, Informational, Symbolic)
AuditSHA256-chained audit logging and deterministic replay
ReportingMatplotlib coherence visualizations
ArtifactsPortable run artifacts and QPU data packaging/validation
Distributed SyncTransport-neutral phase-vector gossip protocol for UPDE nodes
ScaffoldDomainpack scaffolding, including fail-closed LLM-guided proposals
VisualizationReal-time WebXR/network/torus visualization surfaces
AdaptersBridges to SCPN ecosystem, observability, SNN controllers
PluginsExtension manifests and compatibility checks
QueueWavesReal-time cascade failure detector for microservices
SSGFSelf-Stabilizing Gauge Field: geometry carrier, ethical cost, PGBO, the topological-integration observable
AutotuneAuto-calibration: SINDy, coupling estimation, phase extraction, frequency ID, reward evaluation, replay policy search
Meta-TransferReplay-backed cross-domain initial policy proposals
CLIspo command-line interface