cirq-ops parallelization for non-QuantumEngine backends
Cynocracy opened this issue · 2 comments
Hi,
I work at IonQ on our quantum cloud, we recently started looking into our tensorflow quantum support and usability, and found that predict() and other high level tensorflow uses were blocking, despite efforts to use generator Datasets / setting workers, and doing our best to enable tfq parallelization.
There appears to be some custom code that enables parallelization for QuantumEngine here:
quantum/tensorflow_quantum/core/ops/cirq_ops.py
Lines 494 to 530 in 768ac15
Whereas our code, falling through, hits the blocking path sampler.run:
Requesting guidance on the best path forward. We would like to ensure cirq_ops is not blocking for our Cirq backend. Should we look at doing something similar to the QuantumEngine override? Is there other work that we could help move along to make things non-blocking across backends? Thank you in advance!
Ah, the linked issue ties to quantumlib/Cirq#3224 which is fixed. Will look at whether changing to run_batch/sweep/etc would help us here as well
I think implementing run_batch works for us, closing this