MZMTimeStepper

class photonforge.MZMTimeStepper(*, v_pi=, z0=None, extinction_ratio=None, insertion_loss=0, f_3dB=0, phase_bias=0, k2=, k3=, dloss_dv=0, dloss_dv2=, mesh_refinement=None, verbose=True)[source]

Time-stepper for a push-pull or dual-drive Mach-Zehnder modulator.

This model implements a two-port optical modulator with single or dual electrical drive. It simulates the interference of two optical paths, where the phase in each arm is modulated by an independent electrical signal or a single signal in push-pull configuration. The model includes the effects of insertion loss, finite extinction ratio, static phase bias, and nonlinear voltage-to-phase terms. A first-order low-pass filter on the electrical drive simulates finite bandwidth.

The output electrical signal is:

\[ \begin{align}\begin{aligned}A_\text{out} &= A_\text{in} (w_1 e^{j\phi_1} + w_2 e^{-j\phi_2})\\\phi_1 &= \phi_\text{bias} + \left( \frac{\pi V_1}{V_\pi} + k_2 V_1^2 + k_3 V_1^3\right)\\\phi_2 &= \left(\frac{\pi V_2}{V_\pi} + k_2 V_2^2 + k_3 V_2^3\right)\end{aligned}\end{align} \]

with \(w_1\) and \(w_2\) determined by the extinction ratio and arm loss. In push-pull configuration, \(V_2 = V_1\).

Parameters:
  • v_pi (Annotated[float, units='V']) – Half-wave voltage of the modulator, \(V_\pi\).

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

  • extinction_ratio (Annotated[float, minimum=0, units='dB'] | None) – Optical extinction ratio for the Mach-Zehnder.

  • insertion_loss (Annotated[float, minimum=0, units='dB']) – Optical insertion loss.

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

  • phase_bias (Annotated[float, units='°']) – Constant phase bias \(\phi_\text{bias}\) applied to the first arm.

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

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

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

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

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

Important

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

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

Notes

The total loss is clamped at 0 dB to avoid gain.

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

  • 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