r/Optics • u/TadpoleOk2598 • 6d ago
Lightstone, an open-source optical link & multimode fiber simulator
I worked in photonics more than ten years ago and missed the physics. Lightstone started as a side project to refresh my knowledge and build a lightweight, open optical link simulator I could actually inspect and tweak.
- Live browser demo (runs locally in WebAssembly, no install or account): https://lightstone-photonics.github.io/lightstone/
- GitHub repository: https://github.com/lightstone-photonics/lightstone
At the moment, it models short-reach optical links (850–940 nm VCSELs, OM3/OM4/OM5 multimode fiber, connectors, WDM mux/demux, PIN/TIA, Bessel-Thomson filters, and a 5-tap FFE), the kind of 100G/200G-per-lane PAM-4 links used for short-reach interconnects inside modern data centers and GPU clusters.
Some details on the physics and design:
- Mode-by-mode fiber model: Solves scalar LP modes of the graded-index profile, with overlap integrals for an incoherent Laguerre-Gauss VCSEL launch and connector offsets. Receiver noise (thermal, shot, RIN, jitter) is tracked analytically through the filters and equalizer, so symbol error rates are estimated semi-analytically down to low values without long Monte Carlo runs.
- Validation: Every component has a model doc with equations and known limits (
docs/model/). It includes a standalone NumPy/SciPy reference implementation (reference/) and comparisons against public IEEE 802.3ae/db link models (within ~0.15–0.2 dB; details indocs/validation.md). - Custom components: Can be added in Python or Rust. In Python, a decorator lets you register a transfer function $H(f)$, impulse response, FIR taps, or a nonlinear waveform function, and the engine handles signal and noise propagation (
notebooks/,docs/model/example-component.md). - Tech stack: Rust core compiled to WASM (in a Web Worker behind a Svelte 5 / Svelte Flow graph editor) and exposed to Python via PyO3/maturin (
pip install lightstone). Graphs saved in the browser run unchanged in Python.
Known limitation: The built-in fiber presets are calibrated at 850 nm and are currently optimistic at longer SWDM wavelengths (noted in validation check V18).
Future roadmap: Importing measured DMD fiber data, single-mode fiber, DFB/EML chirp, optical amplifiers, coherent links, and fiber nonlinearity.
Dual-licensed MIT/Apache-2.0. I'd love feedback from the optics community on the physical models or UI — and if anyone has measured multimode eye diagrams, SER, or TDECQ data we could benchmark against, an issue on GitHub would be hugely appreciated!



3
u/Zifnab_palmesano 5d ago
lol tht is cool. I work with 850nm MM vcsels, and we can do eyes up very high in Baudrate, including TDECQ and so on. we can talk, what would you need for benchmarking? Tx performance + S21 ad then tdecq without taps, e.g.?
ps: will read in detail later
2
u/Zifnab_palmesano 5d ago
i will DM you in private, but i can supply the 100G data