qblox_scheduler.structure.types#

Types that support validation in Pydantic.

Pydantic recognizes magic method __get_validators__ to receive additional validators, that can be used, i.e., for custom serialization and deserialization. We implement several custom types here to tune behavior of our models.

See Pydantic documentation for more information about implementing new types.

Attributes#

Amplitude

Type alias for a float that can be NaN.

Delay

Type alias for a float that can't be NaN.

Duration

Type alias for a float that must be >= 0 and not NaN.

Frequency

Type alias for a float that must be >= 0 but can be NaN.

NDArray

Classes#

Graph

Pydantic-compatible version of networkx.Graph.

Module Contents#

Amplitude[source]#

Type alias for a float that can be NaN.

Delay[source]#

Type alias for a float that can’t be NaN.

Duration[source]#

Type alias for a float that must be >= 0 and not NaN.

Frequency[source]#

Type alias for a float that must be >= 0 but can be NaN.

NDArray[source]#
class Graph(incoming_graph_data=None, **attr)[source]#

Bases: networkx.Graph

Pydantic-compatible version of networkx.Graph.

classmethod validate(v: Any) Graph[source]#

Validate the data and cast from all known representations.