TerminatedModTimeStepper

class photonforge.TerminatedModTimeStepper(*, v_piL, length=None, n_eff=None, n_group=None, n_rf=None, z0=None, z_load="z0", z_source=None, propagation_loss=0, rf_propagation_loss=0, k2=, k3=, fir_taps=4096, optical_input=None, mesh_refinement=None, verbose=True)[source]

Time-stepper for a travelling-wave electro-optic phase modulator.

This model implements a two-port optical phase modulator with a single electrical drive. The forward optical path is phase-modulated, and the reverse path propagates passively (attenuation only). The model assumes that the transmission line is terminated, so a single electrical port is used.

Parameters:
  • v_piL (Annotated[float, exclusiveMinimum=0, units='V·μm']) – Electro-optic phase coefficient \(V_{\pi L}\).

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

  • n_eff (complex | PortSpec | Literal['cross-section'] | None) – Effective index of the optical mode at the carrier frequency. If None, automatic computation is performed by mode-solving the first optical port of the component. If desired, the port specification can be overridden by setting n_eff to "cross-section" (uses Component.slice_profile()) or to a PortSpec object.

  • n_group (float | None) – Group index of the optical mode. If None, calculated together with n_eff by mode-solving or set to the value of n_rf (perfect phase-matching).

  • n_rf (complex | Interpolator | PortSpec | Literal['cross-section'] | None) – Effective index of the electrical (RF/microwave) mode. If None, automatic computation is performed by mode-solving the electrical port of the component. If desired, the port specification can be overridden by setting n_rf to "cross-section" (uses Component.slice_profile()) or to a PortSpec object.

  • z0 (Annotated[complex, units='Ω'] | Interpolator | None) – Characteristic impedance of the transmission line. If None, derived from port impedance, calculated by mode-solving, or set to 50 Ω.

  • z_load (Annotated[complex, units='Ω'] | Interpolator | Literal['z0']) – Load impedance. Use "z0" to match z0.

  • z_source (Annotated[complex, units='Ω'] | Interpolator | Literal['z0'] | None) – Source impedance. If None, derived from the connected port. Use "z0" to match z0.

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

  • rf_propagation_loss (Annotated[float, minimum=0, units='dB/μm'] | Interpolator) – Electrical propagation loss.

  • k2 (Annotated[float, units='rad/μm/V²']) – Quadratic nonlinear phase coefficient.

  • k3 (Annotated[float, units='rad/μm/V³']) – Cubic nonlinear phase coefficient.

  • optical_input (str | None) – Name of the optical port used as input. If None, the first one is used (sorted alphabetically).

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

  • fir_taps (Annotated[int, exclusiveMinimum=0])

Important

The electrical input \(A\) is converted to a voltage signal through the port impedance:

\[V = \Re\{A\} \sqrt{\Re\{Z_0\}}\]

Notes

Phase non-linearities are applied before the RF dynamics (Hammerstein form).

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

See also

PhaseModTimeStepper: lumped phase modulator.

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 a parametric component.

parametric_kwargs

Keyword arguments used to update a parametric component.

properties

Object properties.

random_variables

Random variables associated to this modles's parameters.

status

reset()[source]

Reset internal state.

setup_state(*, component, time_step, carrier_frequency, connections={}, 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.

  • connections (dict[str, tuple[Port, Technology]]) – Mapping of the ports (and respective technologies) connected to each of ports in component.

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

  • kwargs – Unused.

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