braket.device_schema.xanadu.xanadu_device_capabilities_v1 module

class braket.device_schema.xanadu.xanadu_device_capabilities_v1.XanaduDeviceCapabilities(*, service: DeviceServiceProperties, action: Dict[DeviceActionType | str, BlackbirdDeviceActionProperties], deviceParameters: dict, braketSchemaHeader: BraketSchemaHeader = BraketSchemaHeader(name='braket.device_schema.xanadu.xanadu_device_capabilities', version='1'), paradigm: ContinuousVariableQpuParadigmProperties, provider: XanaduProviderProperties | None = None)[source]

Bases: BraketSchemaBase, DeviceCapabilities

This defines the capabilities of a Xanadu device.

action(Dict[Union[DeviceActionType, str],

Union[BlackbirdDeviceActionProperties]]): Actions that a Xanadu device can support

paradigm

Paradigm properties of a Xanadu device

Type:

ContinuousVariableQpuParadigmProperties

provider

Xanadu provider specific properties

Type:

Optional[XanaduProviderProperties]

Examples

>>> import json
>>> input_json = {
...    "braketSchemaHeader": {
...        "name": "braket.device_schema.xanadu.xanadu_device_capabilities",
...        "version": "1",
...    },
...    "service": {
...        "braketSchemaHeader": {
...            "name": "braket.device_schema.device_service_properties",
...            "version": "1",
...        },
...        "executionWindows": [
...            {
...                "executionDay": "Everyday",
...                "windowStartHour": "09:00",
...                "windowEndHour": "10:00",
...            }
...        ],
...        "shotsRange": [1, 1000000],
...        "deviceCost": {
...             "price": 0.25,
...             "unit": "minute"
...         },
...         "deviceDocumentation": {
...             "imageUrl": "image_url",
...             "summary": "Summary on the device",
...             "externalDocumentationUrl": "external doc link",
...         },
...         "deviceLocation": "us-east-1",
...         "updatedAt": "2020-06-16T19:28:02.869136"
...    },
...    "action": {
...        "braket.ir.blackbird.program": {
...            "actionType": "braket.ir.blackbird.program",
...            "version": ["1"],
...            "supportedOperations": ["BSGate", "XGate"],
...            "supportedResultTypes": [],
...        }
...    },
...    "paradigm": {
...        "braketSchemaHeader": {
...            "name": "braket.device_schema.continuous_variable_qpu_paradigm_properties",
...            "version": "1",
...        },
...        "nativeGateSet": ["XGate", "BSGate"],
...        "modes": {"spatial": 1},
...        "layout": "Some layout",
...        "compiler": ['borealis'],
...        "supportedLanguages": ["blackbird:1.0"],
...        "compilerDefault": "borealis",
...    },
...    "deviceParameters": {XanaduDeviceParameters.schema_json()},
... }
>>> XanaduDeviceCapabilities.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.

braketSchemaHeader: BraketSchemaHeader
action: Dict[DeviceActionType | str, BlackbirdDeviceActionProperties]
paradigm: ContinuousVariableQpuParadigmProperties
provider: XanaduProviderProperties | None