ExpressionTimeStepper¶
- class photonforge.ExpressionTimeStepper(*, expressions)[source]¶
Expression time stepper for electrical signals.
- Parameters:
expressions (dict[str, str]) – Dictionary of expression strings for all output ports, indexed by name.
Example
Example time stepper to be used on a component with 3 electrical ports: “E0”, “E1”, “E2”. The first has a 0.1 reflection coefficient, the second has no output (zero, by default), and the third has a non-linear combination of all 3 inputs.
>>> time_stepper = pf.ExpressionTimeStepper( ... expressions={ ... "E0": "0.1 * E0", ... "E2": "0.5 * E0 * E2 + abs(E1) * E1", ... } ... )
Note
Expressions can use all operators supported by
Expression.Methods
bind_native(step, keys[, state, cstate, context])Bind a compiled step function.
reset()Reset any internal state of the time stepper.
setup(component, time_step, *[, ...])Initialize the time stepper.
setup_state(*, component, **kwargs)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.
write_verilog_a(path, *[, backend, ...])Write this configured time stepper as one Verilog-A module.
Attributes
parametric_functionFunction used to update the time stepper.
parametric_kwargsKeyword arguments used to update the time stepper.
path_delaysMinimum delay in time steps of each (input key, output key) signal path; missing pairs have no path and None means every input reaches every output within the time step.
propertiesObject properties.
random_variablesRandom variables associated to the time stepper's parameters.