class cirq.Collector[source]

Collects data from a sampler, in parallel, towards some purpose.

Child classes must override the next_job and on_job_result methods,
which respectively determine what to sample and how to process the results.
Utility methods on the base class such as collect and collect_async can
then be given a sampler to collect from, and will request samples with some
specified amount of parallelism.

Initialize self. See help(type(self)) for accurate signature.


collect(sampler, *[, concurrency, …])

Collects needed samples from a sampler.

collect_async(sampler, *[, concurrency, …])

Asynchronously collects needed samples from a sampler.


Determines what to sample next.

on_job_result(job, result)

Incorporates sampled results.