braket.device_schema.device_capabilities module

class braket.device_schema.device_capabilities.DeviceCapabilities[source]

Bases: pydantic.main.BaseModel

DeviceCapabilities are the properties specific to device, this schema defines what is common across all the devices

service

properties which are common to the Braket service

Type:DeviceServiceProperties
action

Map of the action to its properties

Type:Dict[Union[DeviceActionType, str], DeviceActionProperties]
deviceParameters
The json schema of the deviceParameters for each device.
For example, the deviceParameter for IonqDeviceCapabilities will be

IonqDeviceParameters.json_schema()

Type:dict

Examples

>>> import json
>>> input_json = {
...    "service": {
...        "braketSchemaHeader": {
...            "name": "braket.device_schema.device_service_properties",
...            "version": "1",
...        },
...        "executionWindows": [
...            {
...                "executionDay": "Everyday",
...                "windowStartHour": "09:00",
...                "windowEndHour": "19:00",
...            }
...        ],
...        "shotsRange": [1, 10],
...        "deviceCost": {
...             "price": 0.25,
...             "unit": "minute"
...         },
...         "deviceDocumentation": {
...             "imageUrl": "image_url",
...             "summary": "Summary on the device",
...             "externalDocumentationUrl": "exter doc link",
...         },
...         "deviceLocation": "us-east-1",
...         "updatedAt": "2020-06-16T19:28:02.869136"
...    },
...    "action": {
...        "braket.ir.jaqcd.program": {
...            "actionType": "braket.ir.jaqcd.program",
...            "version": ["1"],
...        }
...    },
...    "deviceParameters": {#Schema of specific device parameter instance},
... }
>>> DeviceCapabilities.parse_raw(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.