ibm.qdmi.executor

Optional IBM Executor programs over the native QDMI transport.

Classes

ExecutorJob

An Executor job with native QDMI lifecycle and IBM result decoding.

Executor

Run QuantumProgram objects through an IBM QDMI backend.

Module Contents

class ExecutorJob(job: Job)

An Executor job with native QDMI lifecycle and IBM result decoding.

Parameters:

job – A native job submitted or retrieved through Executor.

job_id() → str

Return the remote job identifier.

status() → Status

Query the current QDMI job status.

Returns:

The native QDMI status.

cancel() → None

Cancel the remote job through QDMI.

result(timeout: int = 0) → QuantumProgramResult | PrimitiveResult

Wait and decode results without flattening experiment dimensions.

Parameters:

timeout – Wait limit in seconds; zero waits indefinitely.

Returns:

IBM’s decoded result, including samplex correction metadata.

Raises:
  • TimeoutError – The wait limit expired. The remote job remains active.

  • RuntimeError – The device did not supply Executor results.

class Executor(backend: IBMBackend, *, options: qiskit_ibm_runtime.options_models.executor.ExecutorOptions | None = None)

Run QuantumProgram objects through an IBM QDMI backend.

Circuits must already target the selected device. Execution uses independent jobs, without IBM Runtime session or batch contexts. The optional Runtime dependency supplies the v2.0 encoder and result decoder.

Parameters:
  • backend – An open IBM QDMI backend.

  • options – IBM Executor options. Nondefault environment settings are unsupported. The native execution cap is 60 seconds.

options
run(program: QuantumProgram) → ExecutorJob

Encode and submit one program through the native device.

Returns:

A job that preserves the complete Executor result.

Raises:

ValueError – Unsupported environment or simulator settings, or an empty program.

retrieve_job(job_id: str) → ExecutorJob

Open an existing Executor job on this backend.

Returns:

A job with the same lifecycle and decoding as a new submission.