Fair-share scheduler
This documentation is relevant to the new IBM Quantum® Platform. If you need the previous version, return to the IBM Quantum Platform Classic documentation.
When you submit a workload to a quantum processing unit (QPU), it enters the scheduler for the specific QPU, joining the pool of workloads (from all users) that are waiting to be executed on that QPU. The order in which these workloads are executed is, by default, determined by a fair-share formula. As discussed below, this formula attempts to balance the workload between different instances according to the allocated QPU access amount over a given time window. In practice, this means that workloads from various instances are interweaved in such a way that the order in which workloads complete is not necessarily the order in which they were submitted. Because the order is calculated dynamically as new workloads arrive, it is generally impossible to guarantee when a workload will be executed from the fair-share scheduler.
Fair-share terms
- Account: Individuals and organizations use an IBM Cloud account to access IBM Quantum Platform and Qiskit Runtime.
- Instance: The base-level construct to which time is allocated from the overarching account to a set of QPUs, and to which users are directly assigned. Instances are connected to a specific region and plan.
- 28-day rolling window: The fair-share scheduler accounts for usage over a rolling time window. Only execution time accumulated within that window is accounted for the purpose of fairness. The length of that window is currently 28 days. When the fair-share scheduler is invoked, it takes into account usage starting 28 days ago.
- Time used: For every instance, during the 28-day rolling window, all usage on all the QPUs is accounted for. These include all successful workloads, as well as workloads returning known select error codes.
Allocation and administration
IBM® assigns allocation to each organization based on their allotted capacity contracted under their plan. The organization can choose to have one or more child accounts within their organization. Administrators then decide what portion of this allocation to assign to each account, and then to each instance.
The fair-share scheduler takes into consideration how the allotted time is distributed across instances to determine workload prioritization. The scheduler combines an instance's allocation with the allotted time of its parent account, to determine the total fraction of computational power allocated to that instance.
For example, assume only two instances maintain workloads in one queue. With all else being equal, an instance with twice the number of minutes will have twice the number of workloads execute.
How the fair-share scheduler works
The fair-share scheduler selects workloads to execute on a QPU in a dynamic order so that no instance can monopolize the QPU. When a QPU is ready for additional work, it requests the next workload from the fair-share scheduler. The scheduler's default behavior is to select the next workload by first identifying the instance that has used the least amount of their allocation within the current scheduling window. If the selected instance has submitted more than one workload, the scheduler will select the oldest workload first. Thus, within a instance, the scheduler works on a first-in-first-out (FIFO) basis.
Next steps
- Try the Grover's algorithm tutorial.
- Learn how to Monitor a workload.