Operations
The operations
subpackage encapsulates the concepts that specify the operations and
targets of instructions.
A base class for operations acting on |
|
A base class for a collection of unique targets represented by labels. |
|
A class used to remap targets. |
|
A class representing a target/operation pair. |
Base Operation
- class keysight.qcs.operations.BaseOperation
Bases:
CsWrapper
A base class for operations acting on
Targets
.
- property name: str | None
The name of this operation.
- property assert_variables_have_values
Assert that all variables in this operation have values.
- property slice_width: int | None
The number of targets this operation can be broadcast to.
- broadcast(prefix: str, length: int) BaseOperation
Returns a new operation where any scalars have been broadcast to arrays.
- Parameters:
prefix – The prefix to use when broadcasting variables.
length – The length of the resulting arrays.
Targets
- class keysight.qcs.operations.Targets
A base class for a collection of unique targets represented by labels.
- Parameters:
labels – An iterable of labels, or an integer representing a single label.
name – The name of these targets.
- Raises:
ValueError – If there are duplicate labels.
- property labels: tuple[int, ...]
The labels of this collection of targets.
- property name: str
The name of this collection of targets.
- class keysight.qcs.operations.TargetMap(target: Targets)
A class used to remap targets.
- Parameters:
target – The target to be remapped.
- property label_map: dict[int, keysight.qcs.operations.targets.Targets]
The map from labels in
targets
to new targets.
- all_mapped() bool
Checks whether all the elements of
targets
are mapped to new targets.
Targeted Operations
- class keysight.qcs.operations.TargetedOperation(operation: BaseOperation, target: Targets)
A class representing a target/operation pair.
- Parameters:
operation – The operation.
target – The target.
- property operation: BaseOperation
The operation.