IterationConfiguration
- class caqtus.types.iteration.IterationConfiguration
Bases:
ABCDefines how parameters should be iterated over.
This is an abstract base class that defines the interface for iterations of shots during a sequence. It is meant to be subclassed to define different types of iterations.
- abstractmethod expected_number_shots() int | Unknown
Return the expected number of shots defined by this iteration.
If the number of shots can be statically determined ahead of time, this method should return that number. If the number of shots cannot be determined ahead of time, this method should return unknown. In doubt, the method must return unknown and not a possibly wrong guess.
- abstractmethod 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.
- abstractmethod 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.