qblox_scheduler.operations.loop_domains#

Domains to loop over with Schedule.loop.

Attributes#

T

Classes#

Domain

An object representing a range of values to loop over.

LinearDomain

Linear range of values to loop over, specified with a start value, an inclusive stop value and

Functions#

linspace(→ LinearDomain)

Linear range of values to loop over, specified with a start value, an inclusive stop value and

arange(→ LinearDomain)

Linear range of values to loop over, specified with a start value, an exclusive stop value and a

Module Contents#

T[source]#
class Domain(/, **data: Any)[source]#

Bases: qblox_scheduler.structure.model.DataStructure, abc.ABC, Generic[T]

An object representing a range of values to loop over.

dtype: qblox_scheduler.operations.expressions.DType[source]#

Data type of the linear domain.

abstract values() collections.abc.Iterator[T][source]#

Return iterator over all values in this domain.

property num_steps: int[source]#
Abstractmethod:

Return the number of steps in this domain.

class LinearDomain[source]#

Bases: Domain[Union[complex, float]]

Linear range of values to loop over, specified with a start value, an inclusive stop value and the number of linearly spaced points to generate.

start: complex | float[source]#

The starting value of the sequence.

stop: complex | float[source]#

The end value of the sequence.

num: int[source]#

Number of samples to generate. Must be non-negative.

values() collections.abc.Iterator[complex | float][source]#

Return iterator over all values in this domain.

classmethod _num_is_strictly_positive(num: int) int[source]#
property num_steps: int[source]#

The number of steps in this domain.

property step_size: complex | float[source]#

The step size of the range of values.

linspace(start: complex | float, stop: complex | float, num: int, dtype: qblox_scheduler.operations.expressions.DType) LinearDomain[source]#

Linear range of values to loop over, specified with a start value, an inclusive stop value and the number of linearly spaced points to generate.

Parameters:
  • start – The starting value of the sequence.

  • stop – The end value of the sequence.

  • num – Number of samples to generate. Must be non-negative.

  • dtype – Data type of the linear domain.

arange(start: float, stop: float, step: float, dtype: qblox_scheduler.operations.expressions.DType) LinearDomain[source]#

Linear range of values to loop over, specified with a start value, an exclusive stop value and a step size.

Parameters:
  • start – Start of interval. The interval includes this value.

  • stop – End of interval. The interval does not include this value, except in some cases where step is not an integer and floating point round-off affects the length of out.

  • step – Spacing between values. For any output out, this is the distance between two adjacent values, out[i+1] - out[i].

  • dtype – Data type of the linear domain.