{"id":23244,"library":"amazon-braket-schemas","title":"Amazon Braket Schemas","description":"An open-source library that contains the schemas for Amazon Braket, AWS's quantum computing service. It provides data models and serialization/deserialization for Braket API payloads. Current version: 1.29.1. Release cadence: irregular, often monthly.","status":"active","version":"1.29.1","language":"python","source_language":"en","source_url":"https://github.com/amazon-braket/amazon-braket-schemas-python","tags":["quantum-computing","aws","schemas","braket"],"install":[{"cmd":"pip install amazon-braket-schemas","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"AWS SDK for Python, required for some schema validation","package":"boto3","optional":true},{"reason":"Used for schema models (implicit dependency)","package":"pydantic","optional":false}],"imports":[{"note":"Top-level import is the recommended and supported path.","wrong":"from braket.schemas.device import GateModelQPUDeviceCapabilities","symbol":"GateModelQPUDeviceCapabilities","correct":"from braket.schemas import GateModelQPUDeviceCapabilities"}],"quickstart":{"code":"import json\nfrom braket.schemas import GateModelQPUDeviceCapabilities\n\n# Load a device capabilities JSON string\njson_str = json.dumps({\n    \"braketSchemaHeader\": {\"name\": \"braket.device_schema.gate_model_qpu_device_capabilities\", \"version\": \"1\"},\n    \"service\": {\"name\": \"default\", \"arn\": \"arn:aws:braket:::device/quantum-simulator/amazon/sv1\"},\n    \"action\": {\"braket.ir.jaqcd.program\": {\"actionType\": \"braket.ir.jaqcd.program\", \"version\": [\"1\"]}},\n    \"supportedQuantumOperations\": [\"H\", \"X\", \"Y\", \"Z\", \"S\", \"T\", \"RX\", \"RY\", \"RZ\", \"CNOT\", \"SWAP\", \"ISWAP\", \"CNot\", \"CCNot\", \"Unitary\"],\n    \"properties\": {},\n    \"deviceParameters\": {}\n})\ncapabilities = GateModelQPUDeviceCapabilities.parse_raw(json_str)\nprint(capabilities)\n","lang":"python","description":"Parse a device capabilities JSON using the GateModelQPUDeviceCapabilities schema."},"warnings":[{"fix":"Upgrade Python to 3.11 or later.","message":"Python 3.10 support was dropped in v1.29.0. The package now requires Python >=3.11.","severity":"breaking","affected_versions":">=1.29.0"},{"fix":"Upgrade Python to 3.11+.","message":"Python 3.9 support was dropped in v1.26.0. Python 3.12 and 3.13 are supported.","severity":"breaking","affected_versions":">=1.26.0"},{"fix":"Use the exact `braketSchemaHeader.name` as defined in the schema class (e.g., 'braket.device_schema.gate_model_qpu_device_capabilities').","message":"The `braketSchemaHeader` field's `name` value must match the schema's fully qualified name exactly or parsing may fail.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use the correct schema header name. For GateModelQPUDeviceCapabilities, use 'braket.device_schema.gate_model_qpu_device_capabilities'.","cause":"The `braketSchemaHeader.name` in the JSON does not match the expected schema name.","error":"pydantic.error_wrappers.ValidationError: 1 validation error for GateModelQPUDeviceCapabilities\nbraketSchemaHeader -> name\n  unexpected value; permitted: ..."},{"fix":"Check the available schemas in the documentation. Use `from braket.schemas import ...` with the correct class name.","cause":"Attempting to import a schema that does not exist (typo) or using an old version where the schema was not yet added.","error":"AttributeError: module 'braket.schemas' has no attribute 'GateModelQPUDeviceCapabilities'"},{"fix":"Change import to: `from braket.schemas import GateModelQPUDeviceCapabilities`","cause":"Importing from the internal module path instead of the top-level package.","error":"ImportError: cannot import name 'GateModelQPUDeviceCapabilities' from 'braket.schemas.device'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}