Tutorial 20: Holonomic Adapter Ecosystem

July 6, 2026 · View on GitHub

SC-NeuroCore provides 16 holonomic adapters that map between SCPN consciousness layers (L1–L16) and the stochastic computing substrate. Each adapter encodes domain-specific state into bitstreams, runs a JAX-compatible simulation step, and decodes the result back into domain quantities.

Prerequisites

pip install sc-neurocore[jax]  # JAX backend for step_jax()

Using the Factory

The simplest way to get an adapter is via create_adapter():

from sc_neurocore.adapters.holonomic import create_adapter

# Create the L1 Quantum adapter
adapter = create_adapter(1)

# All 16 layers
adapters = [create_adapter(i) for i in range(1, 17)]

Adapter Lifecycle

Every adapter follows a three-phase lifecycle:

from sc_neurocore.adapters.holonomic import create_adapter

adapter = create_adapter(7)  # L7 Symbolic

# 1. Encode domain state into JAX-compatible arrays
state = adapter.encode(initial_state)

# 2. Step the simulation (dt in seconds)
new_state = adapter.step_jax(dt=0.001, inputs=external_input)

# 3. Decode back to domain quantities
result = adapter.decode(new_state)
metrics = adapter.get_metrics()

Layer Directory

LayerAdapterDomain
L1L1_QuantumAdapterQuantum field dynamics
L2L2_NeurochemicalAdapterNeurotransmitter kinetics
L3L3_GenomicAdapterGene regulatory networks
L4L4_CellularAdapterCellular signalling
L5L5_OrganismalAdapterAutonomic nervous system
L6L6_PlanetaryAdapterGeophysical coupling
L7L7_SymbolicAdapterSymbolic/Vibrana resonance
L8L8_CosmicAdapterCosmological phase fields
L9L9_MemoryAdapterPersistent memory traces
L10L10_FirewallAdapterBoundary/firewall dynamics
L11L11_NoosphericAdapterCollective intelligence
L12L12_GaianAdapterEarth-system feedback
L13L13_SourceAdapterSource field coupling
L14L14_TransdimensionalAdapterCross-dimensional mapping
L15L15_ConsiliumAdapterConsilience integration
L16L16_MetaAdapterMeta-cognitive director

Registry Integration

All 16 adapters are registered in the global ComponentRegistry at import time:

from sc_neurocore.utils.registry import registry

# Triggers registration on first import
import sc_neurocore.adapters.holonomic

# List all registered adapters
print(registry.list("adapter"))
# ['L10_Firewall', 'L11_Noospheric', ..., 'L9_Memory', 'neuroml', ...]

# Retrieve by name
cls = registry.get("adapter", "L7_Symbolic")
adapter = cls()

Creating a Custom Adapter

Extend BaseStochasticAdapter:

from sc_neurocore.adapters.base import BaseStochasticAdapter
import numpy as np

class MyCustomAdapter(BaseStochasticAdapter):
    def encode(self, state):
        return np.array(state, dtype=float)

    def step_jax(self, dt, inputs=None):
        # Your dynamics here
        return self.state * np.exp(-dt)

    def decode(self, bitstream):
        return float(bitstream.mean())

    def get_metrics(self):
        return {"energy": 0.0}

Register it:

from sc_neurocore.utils.registry import registry

registry.register("adapter", "MyCustom")(MyCustomAdapter)

Plugin Discovery

First-party importer adapter classes are declared in SC-NeuroCore's pyproject.toml under the same entry-point group used by third-party plugins:

from sc_neurocore.utils.adapter_discovery import discover_adapters

found = discover_adapters(include_entry_points=False)
print(found["neuroml"])  # sc_neurocore.adapters.importers.NeuroMLImporter

Third-party adapters can be discovered via Python entry points. Add to your package's pyproject.toml:

[project.entry-points."sc_neurocore.adapters"]
MyAdapter = "my_package.adapters:MyCustomAdapter"

Then discover at runtime:

found = discover_adapters()  # auto-registers into global registry

Discovery is idempotent: repeated calls return the discovered classes and leave existing registry entries intact.

Benchmarking

Run the built-in benchmark suite:

python benchmarks/adapter_benchmark.py

This measures per-adapter latency, peak memory, and throughput (steps/sec), outputting JSON and markdown reports to benchmarks/results/.

Next Steps