braket.tasks.local_quantum_task module

class braket.tasks.local_quantum_task.LocalQuantumTask(result: GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult)[source]

Bases: QuantumTask

A quantum task containing the results of a local simulation.

Since this class is instantiated with the results, cancel() and run_async() are unsupported.

property id: str

Gets the task ID.

Returns:

str – The ID of the task.

cancel() None[source]

Cancel the quantum task.

state() str[source]

Gets the state of the task.

Returns:

str – Returns COMPLETED

result() GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult[source]

Get the quantum task result.

Returns:

Union[GateModelQuantumTaskResult, AnnealingQuantumTaskResult, PhotonicModelQuantumTaskResult] – Get the quantum task result. Call async_result if you want the result in an asynchronous way.

async_result() Task[source]

Get the quantum task result asynchronously.

Raises:

NotImplementedError – Asynchronous local simulation unsupported

Returns:

asyncio.Task – Get the quantum task result asynchronously.