quantify_scheduler.resources
Common resources for use with the quantify_scheduler.
Module Contents
Classes
A resource corresponds to a physical resource such as a port or a clock. |
|
The ClockResource corresponds to a physical clock used to modulate pulses. |
|
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
Create a new instance of Resource.
A resource corresponds to a physical resource such as a port or a clock.
- Parameters
name – The resource name.
data – The resource data dictionary, by default None
- classmethod is_valid(operation: Resource) bool [source]
Validates the Resource against the schemas/resource.json fastjsonschema.
- Parameters
operation –
- Raises
fastjsonschema.JsonSchemaException – if the instance is invalid
fastjsonschema.JsonSchemaDefinitionException – if the schema itself is invalid
- Returns
If the validation was successful.
- Return type
- 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.
A clock resource used to modulate pulses.
- Parameters
name – the name of this clock
freq – the frequency of the clock in Hz
phase – the starting phase of the clock in deg
- class BasebandClockResource(name: str, data: Optional[dict] = None)[source]
Bases:
Resource
Global identity for a virtual baseband clock
A clock resource for pulses that operate at baseband.
Baseband signals are assumed to be real-valued and will not be modulated.
- Parameters
name – the name of this clock