Multimode (few-mode) coupled GNLSE¶
Split-step Fourier solver for N coupled modal channels: per-mode dispersion and group delay, LP/isotropic SPM-XPM coefficients, opt-in pump-driven inter-modal FWM with angular-momentum gating. Docstrings are the source of truth, rendered with mkdocstrings (numpydoc style). See multimode GNLSE for the physics and references.
photonics_helper.multimode_gnlse ¶
Multimode (few-mode fiber) coupled GNLSE.
Split-step Fourier solver for N simultaneously-guided spatial modes:
structured.py gives static LG/OAM portraits; this module propagates
their modal envelopes nonlinearly.
Model (all channels coupled through one shared scalar γ):
- linear: per-mode Taylor dispersion
β_k^(m), shared scalar losse^{−α dz/2}, and modal group delay (walk-off in the retarded frame of channel 0); - nonlinear SPM/XPM with a selectable coefficient set:
"co_polarized"— co-polarized scalar spatial modes: SPM1, XPM2(Mumtaz Eq. 6 scalar limit; Agrawal co-polarized Kerr limit);"lp_degenerate"— the two-polarization degenerate LP pair (the vector-GNLSE strip-down): SPM1, XPM2/3; or"isotropic"— all-ones (Manakov-like, for randomly-coupled bases). The two-polarization model is not the XPM of two co-polarized spatial modes;coef_model="co_polarized"is the spatial-mode default when no overlap tensor is supplied; - opt-in inter-modal four-wave mixing
iγ·f·A_n A_p A_q*(RK4IP frequency-domain substep, Strang-split around the diagonal phase), restricted by angular momentum conservationℓ_m = ℓ_n + ℓ_p − ℓ_qwhen OAM indices are supplied; - per-channel (intramodal) Raman
iγ·A_m·[(1−f_R)|A_m|² + f_R·(h_R ⊗ |A_m|²)]with the scalar-engine convolution (step8), plus an opt-in intermodal delayed-coupling tensorraman_tensors(T_R^(m,n,p,q), Raman-weighted) evaluated as an FFT memory kernel on the RK4 path — Wright JSTQE Eq. (1) Raman term withS^R = S^K(ph_pdfs/pages_wright/page-03.png, image-read); step7S⁽²⁾tensors are admissible asT_R(hand-supplied fallback documented); - optional pump depletion: the full Manley–Rowe-consistent exchange
(creation arms
+iγ f A_n²A_q*/+iγ f A_n²A_m*and the back-conversion pump arm+2iγ f* A_m A_q A_n*), which conservesΣ|A|²to RK4 round-off (Mumtaz Eq. 6 three-recoupling structure); - optional mode-specific nonlinear overlap weights (Mumtaz Eq. 8 /
Poletti & Horak Eq. 7):
xpm_weights(N×N, SPM/XPM slot) andfwm_weights(N×N×N×N, FWM slot) override the uniformcoef_modelfactors mode-pair-wise. - per-mode full-β(ω) spectral dispersion (
full_beta— scalarTaperedGNLSESolverprecedent; decision 1.1: full operator, not a Taylor-order bump) and full-S⁽²⁾FWM contraction (fwm_full_tensor=True; Wright Eq. 1 tensor term, Poletti Eq. 18/19 +oam_lselection preserved; diagonal arms excluded — no double count).
The degenerate two-channel strip-down of this engine is the variety
implemented in :mod:photonics_helper.vector_gnlse (the two polarization
axes of one mode); the multimode engine generalizes the same machinery to
arbitrary mode counts.
References
G. P. Agrawal, Nonlinear Fiber Optics, 5th ed. §6.4 (scalar XPM 2/3, FWM);
M. Poletti & P. Horak, "Description of ultrashort pulse propagation in
multimode optical fibers," J. Opt. Soc. Am. B 25, 1645 (2008),
doi:10.1364/JOSAB.25.001645 (vector modal equations, overlap tensors,
photon-number conservation Eq. 15); S. Mumtaz, R.-J. Essiambre & G. P.
Agrawal, "Nonlinear propagation in multimode and multicore fibers:
generalization of the Manakov equations," J. Lightwave Technol. 31, 398
(2013), doi:10.1109/JLT.2012.2235414 (Eq. 6/8: f_lmnp overlap tensor,
γ/3 coherent mixing + 2γ/3 SPM/XPM structure; arXiv:1207.6645);
L. G. Wright et al., Nat. Commun. 6, 6682 (2015) (resonant inter-modal
FWM).
CavityResult ¶
CavityResult(fields: list[NDArray], iterations: int, converged: bool, history: list[float], beat_period_hz: float)
Result of a cavity iteration.
Attributes:
| Name | Type | Description |
|---|---|---|
fields |
Converged complex fields, one per channel. |
|
iterations |
Number of cavity iterations performed. |
|
converged |
Whether the iteration converged. |
|
history |
Relative change per iteration. |
|
beat_period_hz |
Longitudinal mode beat period of the cavity in Hz. |
MultimodeSplitStepEngine ¶
MultimodeSplitStepEngine(waves, fiber: FiberProfile, betas, *, betas_unit: BetasUnit = 'ps^k/m', gamma_reference: float | None = None, group_delays: list[float] | None = None, phase_offsets: list[float] | None = None, coef_model: CoeffModel = 'lp_degenerate', include_fwm: bool = False, oam_l: list[int] | None = None, xpm_weights=None, fwm_weights=None, coupling_tensor=None, fwm_coupling_tensor=None, channel_alpha=None, fwm_pump_depletion: bool = False, include_raman: bool = False, raman_response=None, raman_tensors=None, include_shock: bool = False, tau_shock: float | None = None, conserving_shock: bool = False, include_tpa: bool = False, include_free_carriers: bool = False, beta_tpa=None, sigma_fca=None, sigma_tpa=None, full_beta=None, fwm_full_tensor: bool = False, step_size: Length | None = None, cavity_reflectivity_input: list[float] | None = None, cavity_reflectivity_output: list[float] | None = None, cavity_round_trip_length: float | None = None, cavity_group_index: float = 1.466, rayleigh_backscatter: float | None = None)
Split-step engine for N coupled modal channels (few-mode GNLSE).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
waves
|
sequence of Wave
|
One input envelope per guided mode. All channels must share one
:class: |
required |
fiber
|
FiberProfile
|
Shared scalar parameters ( |
required |
betas
|
array_like or sequence of array_like
|
Taylor coefficients |
required |
betas_unit
|
BetasUnit
|
Unit of the dispersion coefficients. Default |
'ps^k/m'
|
group_delays
|
list[float] | None
|
Modal group delay |
None
|
phase_offsets
|
sequence of float
|
Modal propagation-constant offset |
None
|
gamma_reference
|
float
|
Absolute nonlinear scale |
None
|
coef_model
|
('lp_degenerate', 'isotropic', 'co_polarized')
|
Nonlinear coefficients:
|
"lp_degenerate"
|
include_fwm
|
bool
|
Opt-in inter-modal four-wave mixing. Default False — the standard averaged few-mode model keeps only SPM/XPM (the heterodyne FWM beats wash out over the group-delay walk-off in real fiber). |
False
|
oam_l
|
sequence of int
|
OAM azimuthal order ℓ of each channel. When supplied (and FWM is
on) FWM triples are restricted to This gate is the Poletti & Horak Eq. (18) type-2 spatial
selection rule, not merely an approximation of it: their Two caveats:
|
None
|
xpm_weights
|
array_like
|
Mode-specific SPM/XPM overlap weights (Mumtaz Eq. 8 style), an
|
None
|
fwm_weights
|
array_like
|
Mode-specific FWM overlap weights, an |
None
|
coupling_tensor
|
array_like
|
Absolute SPM/XPM coupling coefficients, an Two properties make this the right slot for a Raman cascade
rather than a widened
The instantaneous arm is integrated exactly while |
None
|
fwm_coupling_tensor
|
array_like
|
Absolute FWM coefficients, an |
None
|
channel_alpha
|
array_like
|
Per-channel loss in This is deliberately a constructor argument and not part of
|
None
|
fwm_pump_depletion
|
bool
|
Include the Manley–Rowe-consistent back-conversion pump arm
|
False
|
step_size
|
Length | None
|
Fixed step size (m); |
None
|
cavity_reflectivity_input
|
sequence of float
|
Per-channel power reflectivity at the input end (z=0) of a
cavity, length |
None
|
cavity_reflectivity_output
|
sequence of float
|
Per-channel power reflectivity at the output end (z=L) of a
cavity, length |
None
|
cavity_round_trip_length
|
float
|
Round-trip length of the cavity in metres. Used for the
beat-period calculation and the round-trip phase. Defaults
to |
None
|
cavity_group_index
|
float
|
Group index |
1.466
|
group_delays
instance-attribute
¶
group_delays = None if group_delays is None else list(group_delays)
phase_offsets
instance-attribute
¶
phase_offsets = None if phase_offsets is None else list(phase_offsets)
cavity_round_trip_length
instance-attribute
¶
cavity_round_trip_length = cavity_round_trip_length if cavity_round_trip_length is not None else 2.0 * self.fiber.length.as_m
spectra_vs_z
property
¶
spectra_vs_z: tuple[NDArray, NDArray]
(ω [rad/s], total summed spectrum over all channels) per snapshot.
propagate ¶
propagate(num_steps: int, *, nsaves: int | None = None, show_progress: bool = False) -> None
Run the split-step propagation for num_steps steps.
Snapshot semantics match the scalar engine: nsaves evenly
spaced snapshots (including z=0 and z=L), every step when
nsaves=None; a total-photon-number monitor warns on >5% drift
in lossless runs.
cavity_beat_period ¶
cavity_beat_period(group_index: float | None = None) -> float
Longitudinal mode beat period of the cavity, in Hz.
The beat period is set by the cavity round-trip time:
f_beat = c / (2 * n_g * L_rt) where L_rt is the round-trip
length and n_g is the group index. For the Babin 2005
configuration (L = 16 m, n_g = 1.466) this gives approximately
6 MHz.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
group_index
|
float | None
|
Group index of the fiber. |
None
|
Returns:
| Type | Description |
|---|---|
float
|
Beat period in Hz. |
cavity_iterate ¶
cavity_iterate(num_steps: int, *, tolerance: float = 1e-06, max_iterations: int = 100, pump_field: NDArray | None = None, relaxation: float = 1.0, callback=None) -> 'CavityResult'
Iterate propagation and boundary application to convergence.
The cavity iteration propagates all channels through the fiber, applies the round-trip boundary conditions, re-injects the pump, and repeats until the circulating field converges.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_steps
|
int
|
Number of split-step propagation steps per iteration. |
required |
tolerance
|
float
|
Convergence tolerance on the relative change of the circulating
intensity |
1e-06
|
max_iterations
|
int
|
Maximum number of cavity iterations. Raises on non-convergence. |
100
|
relaxation
|
float
|
Under-relaxation factor An above-threshold cavity needs |
1.0
|
pump_field
|
NDArray | None
|
Pump field to inject at z=0 at each iteration. If None, the original pump field is used. |
None
|
callback
|
Optional callback function called after each iteration with the iteration index and current relative change. |
None
|
Returns:
| Type | Description |
|---|---|
CavityResult
|
The converged field, iteration count, and convergence history. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the cavity does not converge within |
ValueError
|
If no cavity is configured. |
fields_vs_z ¶
fields_vs_z() -> list[NDArray]
Complex field histories: one (n_saves, N) array per channel.
nonlinear_phase_measure ¶
nonlinear_phase_measure(m: int) -> float
Nonlinear phase of channel m measured against its own input CW.
Returns arg(A_m(t₀, z) / A_m(t₀, 0)) at the last snapshot for
CW or constant-amplitude inputs.