3.5.5. qupulse.program.values¶
Runtime variable value implementations.
Classes
|
This is a potential runtime-evaluable expression of the form |
|
|
|
This is a potential runtime-evaluable expression of the form |
- class DynamicLinearValue(base: NumVal, factors: Mapping[str, NumVal])[source]¶
Bases:
Generic[NumVal]This is a potential runtime-evaluable expression of the form
C + C1*R1 + C2*R2 + … where R1, R2, … are potential runtime parameters.
The main use case is the expression of for loop-dependent variables where the Rs are loop indices. There the expressions can be calculated via simple increments.
This class tries to pass a number and a
sympy.expr.Expron best effort basis.- base: NumVal¶
The part of this expression which is not runtime parameter-dependent
- factors: Mapping[str, NumVal]¶
A mapping of inner parameter names to the factor with which they contribute to the final value.
- property free_symbols¶
This is required for the
sympy.expr.Exprinterface compliance. Since the keys ofoffsetsare internal parameters we do not have free symbols.- Returns:
An empty tuple
- class DynamicLinearValueStepped(base: NumVal, factors: Mapping[str, NumVal], step_nesting_level: int, rng: range, reverse: int | bool)[source]¶
Bases:
DynamicLinearValue
- class ResolutionDependentValue(bases: Tuple[NumVal, ...], multiplicities: Tuple[int, ...], offset: NumVal)[source]¶
Bases:
Generic[NumVal]This is a potential runtime-evaluable expression of the form
o + sum_i b_i*m_i
with (potential) float o, b_i and integers m_i. o and b_i are rounded(gridded) to a resolution given upon __call__.
The main use case is the correct rounding of increments used in command-based voltage scans on some hardware devices, where an imprecise numeric value is looped over m_i times and could, if not rounded, accumulate a proportional error leading to unintended drift in output voltages when jump-back commands afterwards do not account for the deviations. Rounding the value preemptively and supplying corrected values to jump-back commands prevents this.
- offset: NumVal¶