pub mod neuromorphic;
pub mod quantum_stub;
pub use neuromorphic::NeuromorphicBackend;
pub use quantum_stub::QuantumStubBackend;
pub trait SubstrateBackend: Send + Sync {
fn name(&self) -> &'static str;
fn similarity_search(&self, query: &[f32], k: usize) -> Vec<SearchResult>;
fn adapt(&mut self, pattern: &[f32], reward: f32) -> AdaptResult;
fn coherence(&self) -> f32;
fn reset(&mut self);
}
#[derive(Debug, Clone)]
pub struct SearchResult {
pub id: u64,
pub score: f32,
pub embedding: Vec<f32>,
}
#[derive(Debug, Clone)]
pub struct AdaptResult {
pub delta_norm: f32,
pub mode: &'static str,
pub latency_us: u64,
}