quantify_scheduler.resources

Common resources for use with the quantify_scheduler.

Module Contents

Classes

Resource

A resource corresponds to a physical resource such as a port or a clock.

ClockResource

The ClockResource corresponds to a physical clock used to modulate pulses.

BasebandClockResource

Global identity for a virtual baseband clock

class Resource(name: str, data: Optional[dict] = None)[source]

Bases: collections.UserDict

A resource corresponds to a physical resource such as a port or a clock.

JSON schema for a quantify resource.

type

object

properties

  • name

Name of the resource.

type

string

  • type

Type of the resource, this property can be used by compilation steps.

type

string

additionalProperties

True

property name: str[source]

Returns the name of the Resource.

classmethod is_valid(operation: Resource) bool[source]

Validates the Resource against the schemas/resource.json fastjsonschema.

Parameters

operation

Raises
Returns

If the validation was successful.

Return type

bool

__eq__(other: object) bool[source]

Returns the equality of two instances based on its content self.data.

Parameters

other

__str__() str[source]

Returns a concise string representation which can be evaluated into a new instance using eval(str(operation)) only when the data dictionary has not been modified.

This representation is guaranteed to be unique.

__getstate__()[source]
__setstate__(state)[source]
class ClockResource(name: str, freq: float, phase: float = 0, data: Optional[dict] = None)[source]

Bases: Resource

The ClockResource corresponds to a physical clock used to modulate pulses.

__str__() str[source]

Returns a concise string representation which can be evaluated into a new instance using eval(str(operation)) only when the data dictionary has not been modified.

This representation is guaranteed to be unique.

class BasebandClockResource(name: str, data: Optional[dict] = None)[source]

Bases: Resource

Global identity for a virtual baseband clock

IDENTITY = cl0.baseband[source]