braket.device_schema.result_type module

class braket.device_schema.result_type.ResultType[source]

Bases: pydantic.main.BaseModel

Provides the result type for a quantum task to return.

name

Name of the result type.

observables

Supported result types for this result type.

minShots

Minimum number of shots for the results.

maxShots

Maximum number of shots for the results.

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.