qblox_scheduler.device_under_test.edge#

The module contains definitions for edges.

Classes#

Edge

Create an Edge.

Module Contents#

class Edge(parent_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, child_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, **data: Any)[source]#

Bases: abc.ABC, qblox_scheduler.structure.model.SchedulerBaseModel

Create an Edge.

This class encapsulates the connection information between DeviceElements in the QuantumDevice. It provides an interface for the QuantumDevice to generate the edge information for use in the device compilation step. See qblox_scheduler.device_under_test.composite_square_edge for an example edge implementation.

edge_type: str[source]#
parent_element_name: str[source]#
child_element_name: str[source]#
_parent_device_element: qblox_scheduler.device_under_test.device_element.DeviceElement | None = None[source]#
_child_device_element: qblox_scheduler.device_under_test.device_element.DeviceElement | None = None[source]#
classmethod include_submodule_names(data: Any) Any[source]#

Fill in the name attribute of Edge submodules when missing (used for YAML deserialization, they are omitted at serialization).

classmethod dispatch_concrete_model(data: Any, handler: pydantic.ModelWrapValidatorHandler[typing_extensions.Self]) typing_extensions.Self[source]#

When deserializing a dict representation of a concrete Edge, infer the matching class by looking its edge_type into the model registry and return a validated instance of the concrete edge.

property parent_element: qblox_scheduler.device_under_test.device_element.DeviceElement | None[source]#

Getter for the internal parent device element.

property child_element: qblox_scheduler.device_under_test.device_element.DeviceElement | None[source]#

Getter for the internal child device element.

property submodules: dict[str, Any][source]#

Mapping of submodules of this edge.

static _get_element_name(element: qblox_scheduler.device_under_test.device_element.DeviceElement | dict | str | None) str[source]#

Get the name of an element represented as a DeviceElement instance, dictionary or string.

abstract generate_edge_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#

Generate the device configuration for an edge.

This method is intended to be used when this object is part of a device object containing multiple elements.