PolarizationModeDispersionModel¶
- class photonforge.PolarizationModeDispersionModel(*, length_km, pmd=1, segments=30, seed=None)[source]¶
Frequency-dependent Jones matrix of a randomly birefringent fibre.
Two ports, two modes each: mode 0 and mode 1 are the two polarizations. The model is lossless, so the Jones matrix is unitary at every frequency and all the physics is in how it rotates the state, not in how much it passes.
Each realization is fixed by
seed. A single fibre has one Jones matrix, not a distribution; the Maxwellian appears only when you average over fibres, so sweeping the seed is how you get statistics.- Parameters:
length_km (Annotated[float, exclusiveMinimum=0, units='km']) – Fibre length, in km.
pmd (Annotated[float, minimum=0, units='ps/√km']) – \(D_{\rm PMD}\), the mean DGD per root kilometre, in ps/√km. Around 0.1 for modern fibre, 0.5 or worse for cable installed before the mid 1990s.
segments (Annotated[int, exclusiveMinimum=0]) – Number of coarse steps. More gives a better-converged Maxwellian; 30 or so is usually enough.
seed (int | None) – Selects the realization.
Methods
autograd_smatrix(*, component, ...[, ...])Compute an autograd-compatible S matrix for traced parameters.
black_box_component([port_spec, technology, ...])Create a black-box component using this model.
differential_group_delay(frequencies, *[, ...])DGD against frequency, by Jones matrix eigenanalysis.
estimate_cost(*args, **kwargs)Estimate the cost for S matrix computation.
s_matrix(component, frequencies[, ...])Compute the S matrix for a component using this model.
setup_time_stepper(component, time_step[, ...])Obtain a time stepper for a component using this model.
start(component, frequencies, **kwargs)Build the S matrix.
transform([translation, rotation, scaling, ...])Apply a transformation to this model.
update(*args, **kwargs)Update this model.
Attributes
parametric_functionFunction used to update the model.
parametric_kwargsKeyword arguments used to update the model.
propertiesObject properties.
random_variablesRandom variables associated to the model's parameters.
time_stepperTime stepper associated with this model.
- black_box_component(port_spec=None, technology=None, name=None)[source]¶
Create a black-box component using this model.
- Parameters:
port_spec (str | PortSpec | None) – Port specification used in the component. It must carry two modes, since the two polarizations are what this model acts on. If
None, look for"port_spec"inconfig.default_kwargs.technology (Technology | None) – Component technology. If
None, the default technology is used.name (str | None) – Component name. If
Nonea default is used.
- Returns:
Component with ports and model.
- Return type:
- differential_group_delay(frequencies, *, delta_f=1e9)[source]¶
DGD against frequency, by Jones matrix eigenanalysis.
The standard measurement. Form \(T = J(\omega+\Delta\omega)J^{-1}(\omega)\); its eigenvalues differ in phase by \(\Delta\tau\,\Delta\omega\), so
\[\Delta\tau = \frac{\lvert \arg(\rho_1/\rho_2)\rvert}{\Delta\omega}.\]This is what a commercial PMD analyser does, and it is independent of how the model was built, which is what makes it a real check rather than a restatement.
- Parameters:
frequencies (ndarray) – Frequencies at which to report DGD, in Hz.
delta_f (Annotated[float, minimum=0, units='Hz']) – Frequency step for the derivative, in Hz. Small enough that the phase difference stays under pi, large enough to stay off the noise floor.
- Returns:
DGD in seconds, one per frequency.
- Return type:
ndarray