Skip to content

Commit f4e0d88

Browse files
committed
call run_sweep_async in parallel
1 parent 21f6d1c commit f4e0d88

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cirq-google/cirq_google/engine/processor_sampler.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@
1616

1717
import cirq
1818
import duet
19+
import concurrent.futures
20+
from typing import TypeVar, Generic
1921

2022
if TYPE_CHECKING:
2123
import cirq_google as cg
2224

2325

26+
T = TypeVar("T")
27+
28+
2429
class ProcessorSampler(cirq.Sampler):
2530
"""A wrapper around AbstractProcessor to implement the cirq.Sampler interface."""
2631

@@ -76,6 +81,7 @@ async def run_batch_async(
7681
params_list: Optional[Sequence[cirq.Sweepable]] = None,
7782
repetitions: Union[int, Sequence[int]] = 1,
7883
) -> Sequence[Sequence['cg.EngineResult']]:
84+
print("outer")
7985
return cast(
8086
Sequence[Sequence['cg.EngineResult']],
8187
await super().run_batch_async(programs, params_list, repetitions),

0 commit comments

Comments
 (0)