1- from typing import Any , TypeVar , Iterator
1+ from typing import Any , TypeVar , Iterable
22from dataclasses import field , dataclass
33
44from kirin import ir
@@ -64,11 +64,12 @@ def _get_interp(self, mt: ir.Method[..., RetType]):
6464 def run (
6565 self ,
6666 mt : ir .Method [..., RetType ],
67+ * ,
6768 shots : int = 1 ,
6869 args : tuple [Any , ...] = (),
6970 kwargs : dict [str , Any ] = {},
7071 return_iterator : bool = False ,
71- ) -> RetType | list [RetType ] | Iterator [RetType ]:
72+ ) -> RetType | list [RetType ] | Iterable [RetType ]:
7273 """Run the given kernel method on the PyQrack simulator.
7374
7475 Args
@@ -88,7 +89,7 @@ def run(
8889 Defaults to False. if False, a list of results is returned.
8990
9091 Returns
91- RetType | list[RetType] | Iterator [RetType]:
92+ RetType | list[RetType] | Iterable [RetType]:
9293 The result of the simulation. If `return_iterator` is True,
9394 an iterator that yields results for each shot is returned.
9495 Otherwise, a list of results is returned if `shots > 1`, or
0 commit comments