RingTimeStepper

class photonforge.RingTimeStepper(*, kappa1, kappa2=None, n_eff, length, propagation_loss=0.0, n_group=None, dn_dT=0.0, dL_dT=.0, temperature=293.0, reference_temperature=293.0, dn_dv=0.0, dn_dv2=, dloss_dv=.0, dloss_dv2=, z0=None, f_3dB=0, ports=None, mesh_refinement=None, verbose=True)[source]

Analytic ring resonator time-stepper with single or double bus.

This model implements a 2 or 4-port micro-ring or racetrack resonator. It simulates the time-domain behavior based on a co-located coupling section and a delay-line for the ring’s round-trip propagation. The model includes both electro-optic and thermo-optic tuning of the ring’s effective index and loss. An optional first-order low-pass filter can be applied to the electrical tuning input.

Parameters:
  • kappa1 (float) – Coupling coefficient for the first bus waveguide.

  • kappa2 (float | None) – Coupling coefficient for the second bus waveguide.

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

  • length (Annotated[float, units='μm']) – Round-trip length of the ring.

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

  • n_group (float | None) – Group index of the optical mode, used to calculate delay. If None, the real part of ‘n_eff’ is used.

  • dn_dT (Annotated[complex, units='1/K']) – Temperature sensitivity for n_eff.

  • dL_dT (Annotated[float, units='dB/μm/K']) – Temperature sensitivity for propagation_loss.

  • temperature (Annotated[float, minimum=0, units='K']) – Operating temperature.

  • reference_temperature (Annotated[float, minimum=0, units='K']) – Reference temperature.

  • dn_dv (Annotated[complex, units='1/V']) – Linear voltage-dependent effective index coefficient.

  • dn_dv2 (Annotated[complex, units='1/V²']) – Quadratic voltage-dependent effective index coefficient.

  • dloss_dv (Annotated[float, units='dB/μm/V']) – Linear voltage-dependent propagation loss coefficient.

  • dloss_dv2 (Annotated[float, units='dB/μm/V²']) – Quadratic voltage-dependent propagation loss coefficient.

  • z0 (Annotated[complex, units='Ω'] | Interpolator | None) – Characteristic impedance of the electrical port used to convert the input field amplitude to voltage. If None, derived from port impedance, calculated by mode-solving, or set to 50 Ω.

  • f_3dB (Annotated[float, minimum=0, units='Hz']) – -3 dB frequency cutoff for bandwidth limiting. Only active for positive values.

  • ports (Annotated[Sequence[str], maxItems=2, minItems=2] | Annotated[Sequence[str], maxItems=4, minItems=4] | None) – List of port names. If not set, the sorted list of port names from the component is used.

  • mesh_refinement (Annotated[float, exclusiveMinimum=0] | None) – Minimal number of mesh elements per wavelength used for mode solving.

  • verbose (bool) – Flag setting the verbosity of mode solver runs.

Notes

The group delay \(n_g \ell / c_0\) is implemented as a fixed multiple of the time step.

The port order is the same as for the RingModel, i.e., input, through, drop, and isolated ports.

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.

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.

status

reset()[source]

Reset internal state.

Return type:

None

setup_state(*, component, time_step, carrier_frequency, temperature=None, verbose=None, **kwargs)[source]

Initialize internal state.

Parameters:
  • component (Component) – Component representing the laser source.

  • 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.

  • temperature (Annotated[float, minimum=0, units='K'] | None) – If set, overrides the time stepper’s temperature.

  • verbose (bool | None) – If set, overrides the time stepper’s verbose attribute.

  • kwargs (object) – Unused.

Return type:

object

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 TimeSeries.

Return type:

None