braket.task_result.gate_model_task_result_v1 module¶
-
class
braket.task_result.gate_model_task_result_v1.
ResultTypeValue
[source]¶ Bases:
pydantic.main.BaseModel
Requested result type and value of gate model task result.
-
type
¶ The requested result type
- Type
Union[Expectation, Sample, StateVector, Variance, Probability, Amplitude]
-
value
¶ The value of the requested result
- Type
Union[List, float, Dict]
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.
-
type
: Union[Results] = None
-
value
: Union[List, float, Dict] = None
-
-
class
braket.task_result.gate_model_task_result_v1.
GateModelTaskResult
[source]¶ Bases:
braket.schema_common.schema_base.BraketSchemaBase
The gate model task result schema
-
braketSchemaHeader
¶ Schema header. Users do not need to set this value. Only default is allowed.
- Type
-
measurements (List[List[int]]
List of lists, where each list represents a shot and each index of the list represents a qubit. Default is
None
.
-
measurementProbabilities
¶ A dictionary of probabilistic results. Key is the measurements in a big endian binary string. Value is the probability the measurement occurred. Default is
None
.- Type
Dict[str, float]
-
measuredQubits
¶ The indices of the measured qubits. Indicates which qubits are in
measurements
. Default isNone
.- Type
List[int]
-
resultTypes
¶ Requested result types and their values. Default is
None
.- Type
List[ResultTypeValue]
-
taskMetadata
¶ The task metadata
- Type
-
additionalMetadata
¶ Additional metadata of the task
- Type
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 = None
-
measurements
: Optional[conlist(conlist(conint(ge=0, le=1), min_items=1), min_items=1)] = None¶
-
measurementProbabilities
: Optional[Dict[constr(regex='^[01]+$', min_length=1), confloat(ge=0, le=1)]] = None
-
resultTypes
: Optional[List[ResultTypeValue]] = None
-
measuredQubits
: Optional[conlist(conint(ge=0), min_items=1)] = None
-
taskMetadata
: TaskMetadata = None
-
additionalMetadata
: AdditionalMetadata = None
-