← Back to section · Software & Developer Tools
Qiskit's Runtime and Execution Model: Primitives, Sessions and Jobs
Qiskit Runtime moves execution closer to the hardware. This article explains its execution model qualitatively: why primitives are the runtime's first-class interface, how sessions serve iterative algorithms, how jobs and programs are organized, and how it divides labour with local execution.
Getting a circuit running locally is only the first step. Real-hardware execution faces a different reality: jobs queue, classical and quantum sides must go back and forth repeatedly, and iterative algorithms easily make hundreds or thousands of circuit calls. Qiskit Runtime is IBM’s execution environment designed for this reality: it deploys the primitive interface to cloud positions closer to the quantum hardware, upgrading the execution model from “submit one circuit, wait for one result” to “work continuously next to the hardware”. This article covers the model only, not any specific service commitments, quotas or availability — those follow the official documentation at the time of actual use.
Primitives are the runtime’s native interface
The Runtime does not accept arbitrary raw circuit submissions; its native interface is the primitives: users submit circuits through the Sampler to obtain sampling distributions, and through the Estimator with observables to obtain expectation values. This design has two benefits. For users, local and runtime primitives are called the same way, so moving code from simulator to hardware means only changing where the primitives come from. For the platform, the primitive layer is a single place to perform error mitigation, batching and scheduling optimization. Runtime primitives also expose option entries, such as error-mitigation settings and sampling execution parameters; the available options evolve with the service, so code should follow the parameters’ documentation rather than remembered old defaults.
Sessions: built for iterative algorithms
Variational algorithms have the shape of a loop: the classical optimizer proposes parameters, the quantum side evaluates, then proposes new parameters. If every evaluation re-queues, iteration is crushed by queue latency. Sessions are the mechanism designed for this: once a session is open, primitive calls within a period are bound into one group and receive a more coherent execution arrangement, significantly reducing the round-trip cost of iteration. The cost is equally clear: a session occupies hardware time, so decide the iteration budget and termination conditions before opening one — an idling session is pure waste. Not every task needs a session: one-off sampling jobs can be submitted directly, and sessions matter only for the “tightly coupled classical–quantum loop” class of workloads.
Organizing jobs and programs
At the execution granularity, the runtime organizes work into jobs: each primitive call generates a trackable job object whose status can be queried, whose results can be retrieved, and which can be cancelled. Above jobs sits the notion of runtime programs — a parameterized quantum workflow deployed in advance as a service and called repeatedly — closer to the shape of a “quantum function”, suited to sharing fixed procedures within a team. For most users, daily work involves the two layers of primitives plus jobs: submit, wait, retrieve results, and archive experiment records by job identifier. Recording job identifiers together with code versions and transpilation parameters is the basic craft of reproducible experiments.
Division of labour with local execution
A sensible division follows the iteration stages: debug algorithm logic on local Aer until it is fully correct, preview noise sensitivity with a noise model, verify transpilation and primitive plumbing with small real-hardware jobs, and finally put the tightly coupled iteration loop into a session on real hardware. Skipping the earlier steps and occupying hardware and sessions directly usually means spending the most expensive resource on finding the cheapest errors. Conversely, keeping the final large-scale sampling in local simulation runs into the statevector method’s memory wall. Understand the execution model and resource arrangement follows naturally.
Where error mitigation lives
Real-hardware execution cannot avoid error mitigation, and it has a definite place in the execution model: the primitive layer. Both sampling and expectation values are contaminated by noise, and runtime primitives offer mitigation options, packaging techniques such as readout error correction and zero-noise extrapolation below the interface, enabled and tuned by users through options. The reason for this arrangement is that mitigation must sit close to execution: it needs to correct and resample where the backend’s calibration state is known; doing it on the user’s local side both lacks complete information and reinvents the wheel. The practical consequence for users: when reporting real-hardware results, state the mitigation settings used, because the same circuit can yield systematically different expectation values at different mitigation settings; when comparing two experiments, align the mitigation configuration before comparing numbers.
Batching and parameter scans
Another common shape in the execution model is batching: the same circuit structure with dozens of parameter sets, or dozens of structurally similar circuits, submitted at once. The primitive interface natively supports list-style input — one call can package multiple circuits and parameter combinations for unified scheduling on the platform side, far more efficient than submitting one by one. Parameter-scan experiments — plotting an expectation-value curve against an angle, or a coarse grid search for a variational algorithm — should all take the batch path. Writing code with “a list of circuits plus a list of parameters” as the default organization, with a single circuit as merely the length-one special case, keeps program structure much cleaner and eases later migration from local primitives to runtime primitives.
Cost awareness
The execution model also hides a cost line. Real-hardware time is a scarce resource: queueing, calibration and session occupancy are all costs, though the way they are priced varies by service and no concrete figures are given here. What is certain is the engineering principle: never take an error to real hardware that could be eliminated locally, never submit one by one what can be batched, and set the iteration cap before opening a session. Treating every real-hardware execution as a formal experiment that gets an experiment record, rather than a casual trial gesture, changes the efficiency of runtime resource use qualitatively. This cost awareness is itself part of what the execution model teaches its users.
Summary
Qiskit’s runtime model can be remembered in three words: primitives are the interface, sessions are coherent stretches of time prepared for iteration, and jobs are trackable execution units. It does not replace local simulation but forms the later segment of one pipeline: clean out the errors locally, and let real hardware do only what only real hardware can do.
Tags: QiskitRuntimePrimitives