braket.task_result.task_metadata_v1 module
- class braket.task_result.task_metadata_v1.TaskMetadata(*, braketSchemaHeader: BraketSchemaHeader = BraketSchemaHeader(name='braket.task_result.task_metadata', version='1'), id: ConstrainedStrValue, shots: ConstrainedIntValue, deviceId: ConstrainedStrValue, deviceParameters: DwaveDeviceParameters | DwaveAdvantageDeviceParameters | Dwave2000QDeviceParameters | RigettiDeviceParameters | IonqDeviceParameters | OqcDeviceParameters | GateModelSimulatorDeviceParameters | XanaduDeviceParameters | IqmDeviceParameters | None = None, createdAt: ConstrainedStrValue | None = None, endedAt: ConstrainedStrValue | None = None, status: ConstrainedStrValue | None = None, failureReason: ConstrainedStrValue | None = None)[source]
Bases:
BraketSchemaBase
The task metadata schema.
- braketSchemaHeader
Schema header. Users do not need to set this value. Only default is allowed.
- Type:
- id
The ID of the task. For AWS tasks, this is the task ARN.
- Type:
str
- shots
The number of shots for the task
- Type:
str
- deviceId
The ID of the device on which the task ran. For AWS devices, this is the device ARN.
- Type:
str
- deviceParameters any of (DwaveDeviceParameters, RigettiDeviceParameters,
IonqDeviceParameters, GateModelSimulatorDeviceParameters, XanaduDeviceParameters, IqmDeviceParameters). The device parameters of the task. Default is None.
- createdAt
The timestamp of creation; the format must be in ISO-8601/RFC3339 string format YYYY-MM-DDTHH:mm:ss.sssZ. Default is None.
- Type:
str
- endedAt
The timestamp of when the task ended; the format must be in ISO-8601/RFC3339 string format YYYY-MM-DDTHH:mm:ss.sssZ. Default is None.
- Type:
str
- status
The status of the task. Default is None.
- Type:
str
- failureReason
The failure reason of the task. Default is None.
- Type:
str
Examples
>>> TaskMetadata(id="task_id", shots=100, deviceId="device_id")
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
- id: ConstrainedStrValue
- shots: ConstrainedIntValue
- deviceId: ConstrainedStrValue
- deviceParameters: DwaveDeviceParameters | DwaveAdvantageDeviceParameters | Dwave2000QDeviceParameters | RigettiDeviceParameters | IonqDeviceParameters | OqcDeviceParameters | GateModelSimulatorDeviceParameters | XanaduDeviceParameters | IqmDeviceParameters | None
- createdAt: ConstrainedStrValue | None
- endedAt: ConstrainedStrValue | None
- status: ConstrainedStrValue | None
- failureReason: ConstrainedStrValue | None