OpticalNoiseTimeStepper

class photonforge.OpticalNoiseTimeStepper(*, noise, reflection=0, seed=None)[source]

Time-stepper for an optical white-noise source.

This model generates zero-mean, circularly symmetric complex Gaussian noise. It is a memoryless source, producing a new independent sample at each time step.

Parameters:
  • noise (Annotated[float, minimum=0, units='√(W/Hz)']) – One-sided, amplitude spectral density (ASD) of noise.

  • reflection (complex) – Reflection coefficient for incident fields.

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

Methods

reset()

Reset internal state.

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

Initialize the time stepper.

setup_state(*, component, time_step, **kwargs)

Initialize internal state.

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

Compute the outputs of this time stepper, given inputs.

step_single(inputs, 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.

reset()[source]

Reset internal state.

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

Initialize internal state.

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

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

  • kwargs – Unused.

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

Take a single time step on the given inputs.

Parameters:
  • inputs (dict[str, complex]) – Dictionary containing inputs at the current time step, mapping port names to complex values.

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

Returns:

Outputs at the current time step.

Return type:

dict[str, complex]