3.6.15. qupulse.pulses.range

Classes

ParametrizedRange(*args, **kwargs)

Like the builtin python range but with parameters.

RangeScope(inner, index_name, index_value)

class ParametrizedRange(*args, **kwargs)[source]

Bases: object

Like the builtin python range but with parameters. Positional and keyword arguments cannot be mixed.

Parameters:
  • *args – Interpreted as (start, ) or (start, stop[, step])

  • **kwargs – Expected to contain start, stop and step

Raises:
  • TypeError – If positional and keyword arguments are mixed

  • KeyError – If keyword arguments but one of start, stop or step is missing

classmethod from_range_like(range_like: range | ExpressionLike | Tuple[ExpressionLike, ExpressionLike] | Tuple[ExpressionLike, ExpressionLike, ExpressionLike])[source]
get_serialization_data()[source]
property parameter_names: AbstractSet[str]
start: ExpressionScalar
step: ExpressionScalar
stop: ExpressionScalar
to_range(parameters: Mapping[str, Number]) range[source]
to_tuple() Tuple[Any, Any, Any][source]

Return a simple representation of the range which is useful for comparison and serialization

class RangeScope(inner: Scope, index_name: str, index_value: int)[source]

Bases: Scope

as_dict() Mapping[str, Number][source]
change_constants(new_constants: Mapping[str, Number]) Scope[source]

Change values of constants. Constants not present in the scope are ignored.

Parameters:

new_constants

Warning

NonVolatileChange: if a parameter that is not in get_volatile_parameters is updated

Returns:

New scope instance

get_parameter(parameter_name: str) Number[source]
Parameters:

parameter_name

Raises:

ParameterNotProvidedException if the parameter is not provided by this scope

Returns:

Parameter value

get_volatile_parameters() Mapping[str, Expression][source]
Returns:

A mapping where the keys are the volatile parameters and the

items() a set-like object providing a view on D's items[source]
keys() a set-like object providing a view on D's keys[source]
values() an object providing a view on D's values[source]