OpticalPulseTimeStepper¶
- class photonforge.OpticalPulseTimeStepper(*, energy, width, offset=None, repetition_rate=0, phase=0, chirp=0, order=1, frequency=None, rel_intensity_noise=0, linewidth=0, jitter=0, prbs=0, reflection=0, seed=None)[source]¶
Time-stepper for a Gaussian optical pulse source.
- Parameters:
energy (Annotated[float, minimum=0, units='J']) – Total pulse energy.
width (Annotated[float, minimum=0, units='s']) – Full-width at half-maximum (FWHM) of the pulse intensity.
offset (Annotated[float, minimum=0, units='s'] | None) – Time shift for the center of the first pulse. If
None, a value is chosen automatically.repetition_rate (Annotated[float, minimum=0, units='Hz']) – If positive, generates a periodic train of pulses at this rate.
phase (Annotated[float, units='°'] | Sequence[Annotated[float, units='°']]) – Phase shift applied to the pulse. A sequence of values can be used to define the phase of each pulse in a periodic train. The sequence is wrapped around if necessary.
chirp (Annotated[float, units='°']) – Chirp parameter for adding quadratic phase across the pulse.
order (Annotated[float, minimum=1]) – Order of the super-Gaussian pulse.
frequency (Annotated[float, minimum=0, units='Hz'] | None) – Absolute laser frequency. If
None, equals the carrier frequency. If detuned from the carrier by Δf, the output envelope rotates at 2πΔf.rel_intensity_noise (Annotated[float, minimum=0, units='1/Hz']) – One-sided relative intensity noise (RIN) power spectral density.
linewidth (Annotated[float, minimum=0, units='Hz']) – Full-width at half-maximum (FWHM) of the laser’s Lorentzian shape.
jitter (Annotated[float, minimum=0, units='s']) – RMS clock jitter for pulse trains.
prbs (Literal[0, 7, 15, 31]) – PRBS polinomial degree. Value 0 disables PRBS.
reflection (complex) – Reflection coefficient for incident fields.
seed (Annotated[int, minimum=0] | None) – Random number generator seed to ensure reproducibility.
Note
The phase added by the chirp factor \(C\) to each pulse centered at \(t_0\) is \(\frac{C (t-t_0)^2}{2 \sigma^2}\), in which \(\sigma\) is the half-width at \(e^{-1}\) amplitude.
Important
The effective clock jitter can be larger than specified due to the size of the time step. The larger the
jittervalue w.r.t thetime_step, the better it can be simulated.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, time_index, ...)Take a single time step on the given inputs.
update(*args, **kwargs)Update this time stepper.
Attributes
parametric_functionFunction used to update a parametric component.
parametric_kwargsKeyword arguments used to update a parametric component.
propertiesObject properties.
random_variablesRandom variables associated to this modles's parameters.
- setup_state(*, component, time_step, carrier_frequency, **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.
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]