Skip to main content

Module photonic

Module photonic 

Source
Expand description

High-performance photonic network-on-chip primitives.

Accelerates the hot paths in the Python photonic_noc bridge:

  • Waveguide routing — O(N²) Manhattan distance on mesh
  • Crosstalk analysis — O(N²) pairwise channel coupling
  • MZI transfer matrix — 2×2 unitary matrix cascade
  • Power budget — path loss accumulation

Structs§

CrosstalkBankResult
CrosstalkPairResult
CrosstalkResult
Crosstalk result per channel.
PowerBudgetResult
Path power budget result.
WaveguideResult
A routed waveguide segment.

Constants§

CROSSING_LOSS_DB 🔒
MZI_INSERTION_LOSS_DB 🔒

Functions§

analyze_crosstalk
Analyze inter-channel crosstalk for WDM channels.
analyze_crosstalk_bank
Analyse crosstalk in a uniform parallel-waveguide bank. Adjacent pairs (gap = g) are the dominant term; next-nearest (gap = 2g) are included as the largest secondary term — Marcatili 1969 predicts that all other pairs are at least exp(-2·g/L_decay) smaller still.
analyze_crosstalk_pairs
Per-pair crosstalk for arbitrary waveguide geometry. pairs carries (idx_a, idx_b, gap_nm, coupling_length_um) per pair. Evaluated in parallel via Rayon — this is the O(N²) path the commercial layout tools call after full pair enumeration.
analyze_power_budget
Analyze power budget for all waveguide paths.
cascade_mzi
Cascade N MZI stages by multiplying transfer matrices.
complex_mat_mul 🔒
Multiply two 2×2 complex matrices (each stored as 8 f64s).
mzi_transfer_matrix
MZI 2×2 transfer matrix elements (complex).
pair_coupling 🔒
route_waveguides
Route waveguides on a mesh topology from an adjacency matrix.
thermal_power_for_phase
Compute electrical power (mW) needed for a phase shift.