braket.device_schema.result_type module
- class braket.device_schema.result_type.ResultType(*, name: str, observables: List[str] | None = None, minShots: int | None = None, maxShots: int | None = None)[source]
Bases:
BaseModel
Provides the result type for a quantum task to return.
- name
Name of the result type.
- Type:
str
- observables
Supported result types for this result type.
- Type:
List[str] | None
- minShots
Minimum number of shots for the results.
- Type:
int | None
- maxShots
Maximum number of shots for the results.
- Type:
int | None
Examples
>>> import json >>> input_json = { ... "name": "resultType1", ... "observables": ["observable1"], ... "minShots": 0, ... "maxShots": 4, ... } >>> ResultType.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.
- name: str
- observables: List[str] | None
- minShots: int | None
- maxShots: int | None