Skip to content

Commit

Permalink
add missing type
Browse files Browse the repository at this point in the history
  • Loading branch information
Coull committed Oct 16, 2024
1 parent 73e4ed3 commit fff2644
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/braket/aws/aws_quantum_task_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ def results(
max_retries: int = MAX_RETRIES,
use_cached_value: bool = True,
) -> list[
GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult
GateModelQuantumTaskResult
| AnnealingQuantumTaskResult
| PhotonicModelQuantumTaskResult
| AnalogHamiltonianSimulationQuantumTaskResult
]:
"""Retrieves the result of every quantum task in the batch.
Expand All @@ -355,7 +358,7 @@ def results(
even when results have already been cached. Default: `True`.
Returns:
list[GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult]: The # noqa: E501
list[GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult | AnalogHamiltonianSimulationQuantumTaskResult]: The # noqa: E501
results of all of the quantum tasks in the batch.
`FAILED`, `CANCELLED`, or timed out quantum tasks will have a result of None
"""
Expand All @@ -380,7 +383,10 @@ def results(
def _retrieve_results(
tasks: list[AwsQuantumTask], max_workers: int
) -> list[
GateModelQuantumTaskResult | AnnealingQuantumTaskResult | PhotonicModelQuantumTaskResult
GateModelQuantumTaskResult
| AnnealingQuantumTaskResult
| PhotonicModelQuantumTaskResult
| AnalogHamiltonianSimulationQuantumTaskResult
]:
with ThreadPoolExecutor(max_workers=max_workers) as executor:
result_futures = [executor.submit(task.result) for task in tasks]
Expand Down

0 comments on commit fff2644

Please sign in to comment.