QMEstimatorJob

class QMEstimatorJob(backend: QMBackend, pubs: List[EstimatorPub], input_type: InputType | None, switch_obs_circuit: QuantumCircuit, **kwargs)[source][source]

Bases: QMPrimitiveJob

Job handle for QMEstimatorV2 execution.

Builds a QUA estimator program from pubs and returns expectation values via result(). See programs for the compiled QUA source and result_handles for raw QM stream access after submit.

Create an estimator job.

Parameters:
  • backend – Backend that compiled the circuits.

  • pubs – Coerced estimator pubs to execute.

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

  • switch_obs_circuit – Pre-transpiled circuit used to rotate observables.

  • **kwargs – Estimator options forwarded to execution planning.

result() ResultT[source][source]

Build and return primitive estimator results from QM streaming data.

Returns:

PrimitiveResult with per-pub expectation values and standard errors.

property runtime_pubs: List[_ExecutionPlan]

Compiled execution plans for this estimator job.

One _ExecutionPlan per input PUB. Each plan holds the grouped observable metadata, parameter table, and obs-index tables that drive the QUA switch statement and parameter streaming. Inspect to understand how observables were grouped or what will be streamed cycle-by-cycle.

submit()[source][source]

Submit the job to the backend.

All QUA programs are first compiled via qm.compile(), then added to the OPX queue via qm.queue.add_compiled(). Separating compilation from execution means the queue never stalls waiting for recompilation of later chunks — all programs are compiled upfront so the OPX can start executing them as soon as the queue is free.

For simulation runs, programs are submitted directly to the simulator (no queue). Results from all chunks are stitched back in _result_function() using the locator built at construction time.