OpticalAmplifierTimeStepper

class photonforge.OpticalAmplifierTimeStepper(*, gain=0, noise_figure=None, ports=None, seed=None)[source]

Time-stepper for a unidirectional optical amplifier.

This model implements a simple optical amplifier with a constant gain and amplified spontaneous emission (ASE) noise. The ASE noise power is determined by the amplifier’s gain and noise figure.

Notes: ASE noise is modeled as a complex Gaussian random process. Its one-sided power spectral density (PSD) is:

\[ \begin{align}\begin{aligned}S_\text{ASE} &= n_{sp} (10^\frac{g}{10} - 1) h\nu\\n_\text{sp} &= \frac{10^\frac{\text{NF}}{10}}{2}\end{aligned}\end{align} \]

in which \(g\) is the power gain in dB, \(h\nu\) is the photon energy, and \(n_\text{sp}\) is the spontaneous emission factor, derived from the noise figure.

The discrete-time simulation represents a spectral slice of width \(1/\Delta t\) centered at the carrier frequency. To conserve the total physical noise energy in this slice, the noise variance per sample is:

\[\sigma^2 = \frac{S_\text{ASE}}{\Delta t}\]

This corresponds to integrating the optical PSD over the full simulation bandwidth.

Parameters:
  • gain (Annotated[float, units='dB']) – The amplifier’s power gain.

  • noise_figure (Annotated[float, units='dB'] | None) – The amplifier’s noise figure (NF). If None, noise is disabled.

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

  • seed (Annotated[int, minimum=0] | None) – Random number generator seed to ensure reproducibility.

Reference:

Agrawal, G. P. (2010). Fiber-Optic Communication Systems. Wiley.

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.

reset()[source]

Reset internal state.

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

Initialize internal state.

Parameters:
  • component (Component) – Component representing amplifier.

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