2323from braket .devices import Device
2424from braket .emulation .pass_manager import PassManager
2525from braket .emulation .passes import ValidationPass
26- from braket .tasks import QuantumTask
27- from braket .tasks .quantum_task import TaskSpecification
26+ from braket .tasks .quantum_task import QuantumTaskType , TaskSpecification
2827from braket .tasks .quantum_task_batch import QuantumTaskBatch
2928
3029
31- class Emulator (Device ):
30+ class Emulator (Device [ QuantumTaskType ] ):
3231 """
3332 An emulator is a simulation device that more closely resembles the capabilities and constraints
3433 of a real device or of a specific device model.
@@ -43,7 +42,7 @@ class Emulator(Device):
4342
4443 def __init__ (
4544 self ,
46- backend : Device ,
45+ backend : Device [ QuantumTaskType ] ,
4746 noise_model : NoiseModel | None = None ,
4847 passes : Iterable [ValidationPass ] | None = None ,
4948 ** kwargs ,
@@ -60,7 +59,7 @@ def run(
6059 inputs : dict [str , float ] | None = None ,
6160 * args : Any ,
6261 ** kwargs : Any ,
63- ) -> QuantumTask :
62+ ) -> QuantumTaskType :
6463 """Emulate a quantum task specification on this quantum device emulator.
6564 A quantum task can be a circuit or an annealing problem. Emulation
6665 involves running all emulator passes on the input program before running
@@ -94,7 +93,7 @@ def run_batch(
9493 inputs : dict [str , float ] | list [dict [str , float ]] | None ,
9594 * args : Any ,
9695 ** kwargs : Any ,
97- ) -> QuantumTaskBatch :
96+ ) -> QuantumTaskBatch [ QuantumTaskType ] :
9897 raise NotImplementedError ("Emulator does not support run_batch." )
9998
10099 @property
0 commit comments