braket.tasks.quantum_task module¶
-
class
braket.tasks.quantum_task.
QuantumTask
[source]¶ Bases:
abc.ABC
An abstraction over a quantum task on a quantum device.
-
abstract property
id
¶ The task ID.
- Type
str
-
abstract
result
() → Union[braket.tasks.gate_model_quantum_task_result.GateModelQuantumTaskResult, braket.tasks.annealing_quantum_task_result.AnnealingQuantumTaskResult][source]¶ Union[GateModelQuantumTaskResult, AnnealingQuantumTaskResult]: Get the quantum task result. Call async_result if you want the result in an asynchronous way.
-
abstract
async_result
() → _asyncio.Task[source]¶ asyncio.Task: Get the quantum task result asynchronously.
-
metadata
(use_cached_value: bool = False) → Dict[str, Any][source]¶ Get task metadata.
- Parameters
use_cached_value (bool, optional) – If True, uses the value retrieved from the previous
request. –
- Returns
Dict[str, Any] – The metadata regarding the task. If
use_cached_value
is True, then the value retrieved from the most recent request is used.
-
abstract property