braket.device_schema.pulse.pulse_device_action_properties_v1 module

class braket.device_schema.pulse.pulse_device_action_properties_v1.PulseDeviceActionProperties[source]

Bases: braket.schema_common.schema_base.BraketSchemaBase

Describes the hardware device details and device limitations for pulse control on a given
quantum device
supportedQhpTemplateWaveforms

Pre-defined routine waveform functions available on the hardware

ports

Pre-defined hardware ports available on the hardware

supportedFunctions

A dictionary of OpenPulse functions supported in openqasm for the hardware

frames

Pre-defined pulse frames available on the hardware

supportsLocalPulseElements

Details whether pulse elements may be defined within OpenQasm defcal blocks

supportsDynamicFrames

Details whether a device may create frames at runtime from ports or if it

must use the frames defined in frames

Examples

>>> import json
>>> input_json = {
...         "braketSchemaHeader": {
...             "name": "braket.device_schema.pulse.pulse_device_action_properties",
...             "version": "1",
...         },
...         "supportedQhpTemplateWaveforms": {
...             "flat": {
...                 "templateName": "flat",
...                 "args": [
...                     ["duration", "float"],
...                     ["iq", "float"]
...                 ]
...             }
...         },
...         "supportedQhpTemplateWaveforms": {
...             "flat": {
...                 "functionName": "flat",
...                 "arguments": [
...                     {"name": "duration", "type": "float"},
...                     {"name": "iq", "type": "float"},
...                     {"name": "scale", "type": "float", "optional": True},
...                     {"name": "phase", "type": "float", "optional": True},
...                     {"name": "detuning", "type": "float", "optional": True},
...                 ]
...             }
...         },
...         "ports": {
...             "q0_rf": {
...                 "portId": "q0_rf",
...                 "direction": "tx",
...                 "portType": "rf",
...                 "dt": 1e-9,
...             },
...             "q1_rf": {
...                 "portId": "q1_rf",
...                 "direction": "tx",
...                 "portType": "rf",
...                 "dt": 1e-9,
...             },
...             "q120_ff": {
...                 "portId": "q120_ff",
...                 "direction": "tx",
...                 "portType": "ff",
...                 "dt": 1e-9,
...             },
...         },
...         "frames": {
...             "q0_rf_frame": {
...                 "frameId": "q0_rf_frame",
...                 "portId": "q0_rf",
...                 "frequency": 4525620740.86441,
...                 "phase": 0.0,
...
...                 "qubitMappings": [0],
...             },
...             "q120_q27_frame": {
...                 "frameId": "q0_rf_frame",
...                 "portId": "q0_rf",
...                 "frequency": 4525620740.86441,
...                 "phase": 0.0,
...                 "associatedGate": "xy",
...                 "qubitMappings": [120, 127],
...             }
...         },
...         "supportedFunctions": [
...             "newframe",
...             "shift_phase",
...             "set_phase",
...             "shift_frequency",
...             "set_frequency",
...             "play",
...             "capture"
...         ],
...         "supportedFunctions": {
...             "newframe": {
...                 "functionName": "newframe",
...                 "arguments": [
...                     {"name": "frame", "type": "frame"},
...                     {"name": "frequency", "type": "float"},
...                     {"name": "phase", "type": "float", "optional": True},
...                 ]
...              },
...         },
...         "supportsNonNativeGatesWithPulses": False,
...         "validationParameters": {
...             "MAX_SCALE": 1.0,
...             "MAX_AMPLITUDE": 1.0,
...             "PERMITTED_FREQUENCY_DIFFERENCE": 1.0,
...         }
...     }
>>> PulseDeviceActionProperties.parse_raw_schema(json.dumps(input_json))

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.