StepsConfiguration
- class caqtus.types.iteration.StepsConfiguration(steps: list[TypeAliasForwardRef('Step')])
Bases:
IterationConfigurationDefine the parameter iteration of a sequence as a list of steps.
- expected_number_shots() int | Unknown
Returns the expected number of shots that will be executed by the sequence.
- Returns:
A positive integer if the number of shots can be determined, or Unknown if the number of shots cannot be determined.
- get_parameter_names() set[DottedVariableName]
Return the names of the parameters that are iterated over.
This method must return the name of the parameters whose values are changed during the iteration. The iteration must set the values of all these parameters before each shot.
- walk(
- initial_context: StepContext,
Returns the context for every shot encountered while walking the steps.
- get_parameter_schema(
- initial_parameters: Mapping[DottedVariableName, TypeAliasForwardRef('Parameter')],
Compute the schema of the parameters that are iterated over.
- Parameters:
initial_parameters – The values of the parameters that are defined before the iteration starts. Unless the iteration overwrites the values of these parameters, they are considered constant during the iteration.
- Returns:
The schema of the parameters that are iterated over.
Implementations of this method should infer the types of the parameters correctly as the consumers of this method rely on the correctness of the inferred types.