AnalyticWaveguideTimeStepper

class photonforge.AnalyticWaveguideTimeStepper(*, n_eff, length=None, propagation_loss=0.0, extra_loss=0.0, n_group=0, dispersion=0.0, dispersion_slope=0.0, reference_frequency=None, fir_taps=None, dn_kerr=_zero, tau_fc=0, dn_fc=_zero, tau_th=0, dn_th=_zero)[source]

Analytic waveguide time-stepper with power-dependent effects.

Two-port optical waveguide whose effective index is perturbed by power-dependent effects, plus chromatic dispersion:

\[ \begin{align}\begin{aligned}&n(t) = n_\text{eff} + \Delta n_\text{K}(P(t)) + n_\text{fc}(t) + n_\text{th}(t)\\&\tau_\text{fc}\frac{{\rm d}n_\text{fc}}{{\rm d}t} + n_\text{fc}(t) = \Delta n_\text{fc}(P(t))\\&\tau_\text{th}\frac{{\rm d}n_\text{th}}{{\rm d}t} + n_\text{th}(t) = \Delta n_\text{th}(P(t))\end{aligned}\end{align} \]

The perturbation interpolators may be complex: the imaginary part is an index change and therefore a power-dependent loss, used to express two-photon and free-carrier absorptions. The relaxation form above is the carrier rate equation once \(\Delta n_\text{fc}(P)\propto P^2\) is supplied. \(\Delta n_\text{K}\) has no relaxation at all: it follows the power within the step, which is the Kerr effect, and is supplied as dn_kerr.

Dispersion is applied as an all-pass filter on the envelope,

\[H(\Omega) = \exp\left[i\left(\frac{\beta_2\Omega^2}{2} + \frac{\beta_3\Omega^3}{6}\right)\ell\right]\]

with the linear-in-\(\Omega\) term already carried by the group delay. dispersion and dispersion_slope use the same names, units and \(\beta\) conversion as AnalyticWaveguideModel.

Parameters:
  • n_eff (complex) – Effective refractive index (loss can be included here by using complex values).

  • length (Annotated[float, units='μm'] | None) – Length of the waveguide. If not provided, the length is measured by route_length() or ports distance.

  • propagation_loss (Annotated[float, minimum=0, units='dB/μm']) – Propagation loss.

  • extra_loss (Annotated[float, minimum=0, units='dB']) – Length-independent additional loss.

  • n_group (float) – Group index of the optical mode, used to calculate delay.

  • dispersion (Annotated[float, units='s/μm²']) – Group velocity dispersion D at reference_frequency.

  • dispersion_slope (Annotated[float, units='s/μm³']) – Dispersion slope S at reference_frequency.

  • reference_frequency (Annotated[float, minimum=0, units='Hz'] | None) – Frequency at which dispersion applies. If None, the carrier frequency is used.

  • fir_taps (Annotated[int, exclusiveMinimum=0] | None) – Length of the dispersion filter, ignored when dispersion is zero. If None, it is set at setup, based on the time step.

  • dn_kerr (Interpolator) – Instantaneous power-dependent index variation, for the Kerr effect. May be complex, the imaginary part being loss.

  • tau_fc (Annotated[float, minimum=0, units='s']) – Time constant for the free-carrier effects. If zero, free-carrier effects are disabled.

  • dn_fc (Interpolator) – Power-dependent, steady-state index variation due to free-carrier effects. May be complex.

  • tau_th (Annotated[float, minimum=0, units='s']) – Time constant for the thermal effects. If zero, thermal effects are disabled.

  • dn_th (Interpolator) – Power-dependent, steady-state index variation due to thermal effects. May be complex.

Note

This is a lumped element: the perturbations are evaluated at the input power and assumed uniform along the length, and dispersion is applied after the nonlinear phase rather than interleaved with it. Both approximations fail once the power changes appreciably over the length. Chaining several instances in series can overcome both limitations.

Methods

reset()

Reset internal state.

setup(component, time_step, *[, ...])

Initialize the time stepper.

setup_state(*, component, time_step, ...)

Initialize internal state.

step([inputs, steps, time_step, show_progress])

Compute the outputs of this time stepper, given inputs.

step_single(inputs, outputs, time_index, ...)

Take a single time step on the given inputs.

update(*args, **kwargs)

Update this time stepper.

write_verilog_a(path, *[, backend, ...])

Write this configured time stepper as one Verilog-A module.

Attributes

parametric_function

Function used to update the time stepper.

parametric_kwargs

Keyword arguments used to update the time stepper.

properties

Object properties.

random_variables

Random variables associated to the time stepper's parameters.

reset()[source]

Reset internal state.

Return type:

None

setup_state(*, component, time_step, carrier_frequency, **kwargs)[source]

Initialize internal state.

Parameters:
  • component (Component) – Component representing the waveguide.

  • time_step (Annotated[float, minimum=0, units='s']) – The interval between time steps (in seconds).

  • carrier_frequency (Annotated[float, minimum=0, units='Hz']) – The carrier frequency used to construct the time stepper. The carrier should be omitted from the input signals, as it is handled automatically by the time stepper.

  • kwargs (object) – Unused.

Return type:

None

step_single(inputs, outputs, time_index, update_state, shutdown)[source]

Take a single time step on the given inputs.

Parameters:
  • inputs (ndarray) – Input values at the current time step. Must be a 1D array of complex values ordered according to keys.

  • outputs (ndarray) – Pre-allocated output array where results will be stored. Same size and type as inputs.

  • time_index (int) – Time series index for the current input.

  • update_state (bool) – Whether to update the internal stepper state.

  • shutdown (bool) – Whether this is the last call to the single stepping function for the provided photonforge.TimeSeries.

Return type:

None