1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//! # photonlayer-ruvector
//!
//! Experiment memory and verification substrate for PhotonLayer optical
//! simulations (ADR-260 §5, §11–§15).
//!
//! RuVector serves as the *experiment memory* layer — not a generic data
//! store. Concretely, this crate provides:
//!
//! * **Embeddings** ([`embedding`]) — 32-dim L2-normalised experiment vectors
//! built from mask phase-histograms and detector frame spectra.
//! * **Memory** ([`memory`]) — in-memory store with cosine-similarity
//! nearest-experiment recall.
//! * **Boundary analysis** ([`boundary`]) — Fiedler spectral partitioning
//! that identifies which `OpticalConfig` variable best separates pass/fail
//! experiment outcomes.
//! * **Coherence** ([`coherence`]) — spectral gap of the mask family similarity
//! graph; families above the threshold qualify for demo promotion.
//! * **Receipts** ([`receipts`]) — JSON persistence and binding-digest
//! verification of RVF-style experiment receipts.
//!
//! ## Quick Start
//! ```no_run
//! use photonlayer_core::prelude::*;
//! use photonlayer_ruvector::{
//! embedding::experiment_embedding,
//! memory::{ExperimentMemory, ExperimentRecord},
//! receipts::ReceiptStore,
//! };
//!
//! let n = 16;
//! let pixels: Vec<f32> = (0..n * n).map(|i| (i % n) as f32 / n as f32).collect();
//! let img = InputImage::from_norm_f32(n, n, pixels).unwrap();
//! let mask = PhaseMask::random(n, n, 42);
//! let cfg = OpticalConfig::demo(n, n);
//! let frame = ScalarSimulator.simulate(&img, &mask, &cfg).unwrap();
//! let metrics = MetricReport::default();
//! let receipt = build_receipt("e1", &img, &mask, &cfg, &frame, &metrics, &Provenance::default());
//!
//! let embedding = experiment_embedding(&mask, &frame);
//!
//! let mut mem = ExperimentMemory::new();
//! // ... store and recall experiments ...
//!
//! let mut store = ReceiptStore::new();
//! store.insert(&receipt).unwrap();
//! assert!(store.verify("e1"));
//! ```
// Convenience re-exports for the most common types.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ReceiptStore;
/// Crate version, driven from `Cargo.toml`.