QMSamplerJob

class QMSamplerJob(backend: QMBackend, pubs: List[SamplerPub], input_type: InputType, **kwargs)[source][source]

Bases: QMPrimitiveJob

Job handle for QMSamplerV2 execution.

Builds a QUA sampler program from pubs and returns classified counts via result(). See program for the compiled QUA source.

Create a sampler job.

Parameters:
  • backend – Backend that compiled the circuits.

  • pubs – Coerced sampler pubs to execute.

  • input_type – How circuit parameters are streamed to the OPX.

  • **kwargs – Additional options forwarded to QUA program generation and backend execution (e.g. shots, meas_level).

submit()[source][source]

Submit the job to the backend.

Programs are submitted via submit_qua_programs() (qm.execute for simulation; OPX1000 add_to_queue / OPX+ queue.add for real hardware). Each chunk is waited on until running, then parameters are streamed. IQCC sync-hook submission is handled by IQCCSamplerJob.

result() PrimitiveResult[SamplerPubResult][source][source]

Build and return classified measurement counts for all pubs.

Returns:

PrimitiveResult with SamplerPubResult entries.