3.7.15. qupulse.pulses.range

Classes

ParametrizedRange(*args, **kwargs)

Like the builtin python range but with parameters.

RangeScope(inner, index_name, index_value)

class qupulse.pulses.range.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

__init__(*args, **kwargs)[source]

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: Union[range, qupulse.expressions.ExpressionLike, Tuple[qupulse.expressions.ExpressionLike, qupulse.expressions.ExpressionLike], Tuple[qupulse.expressions.ExpressionLike, qupulse.expressions.ExpressionLike, qupulse.expressions.ExpressionLike]])[source]
get_serialization_data()[source]
property parameter_names: AbstractSet[str]
start: qupulse.expressions.sympy.ExpressionScalar
step: qupulse.expressions.sympy.ExpressionScalar
stop: qupulse.expressions.sympy.ExpressionScalar
to_range(parameters: Mapping[str, numbers.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 qupulse.pulses.range.RangeScope(inner: qupulse.parameter_scope.Scope, index_name: str, index_value: int)[source]

Bases: qupulse.parameter_scope.Scope

as_dict() Mapping[str, numbers.Number][source]
change_constants(new_constants: Mapping[str, numbers.Number]) qupulse.parameter_scope.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) numbers.Number[source]
Parameters

parameter_name

Raises

ParameterNotProvidedException if the parameter is not provided by this scope

Returns

Parameter value

get_volatile_parameters() Mapping[str, qupulse.expressions.sympy.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]