Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Updates to job limits #2768

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions docs/guides/job-limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,26 @@ description: Job limits imposed by the job validation service for jobs sent to I

When you send a job to an IBM® QPU, it is first sent to the job validation service. This service tries to ensure that the job will be able to run on the QPU so you don't have to wait for it to go through the queue and then have the job fail. These checks include enforcing the described limits.

<Admonition type="note">
Certain primitive options increase the circuit size. The described limits are checked _after_ the expected increase in circuit size. In particular, these options increase circuit size:
- Dynamical decoupling and gate-folding ZNE introduce additional gates that are included in the instructions for the [Maximum number of low-level instructions per qubit](#per-qubit) limit.
- Gate-folding ZNE introduces additional two-qubit gates relevant to the [Maximum number of two-qubit gates per job](#2-qubit-limit) limit. The number of two-qubit gates is multiplied by the sum of noise factors requested in gate-folding ZNE.
</Admonition>

<span id="max-shots"></span>
## Maximum executions

At most, **5 million** executions are allowed. The number of executions is the number of circuits times the number of shots, where the circuits are those generated after PUB elements are broadcasted.
At most, **10 million** executions are allowed. The number of executions is the number of circuits times the number of shots, where the circuits are those generated after PUB elements are broadcasted.

For example, if you have a PUB with one circuit, observables with shape (1, 6), and parameters with shape (4, 1), this would render $4 \times 6 = 24$ circuits (or fewer, if some observables commute). If you requested 2,000 shots, then the total number of executions is $24 \times 2,000 = 48,000$.

<span id="per-qubit"></span>
## Maximum number of low-level instructions per qubit

The service permits up to **26.8 million control-system instructions per qubit**. This ensures that the user circuits fit within the control system's instruction memory. The following table describes how the system translates instruction set architecture (ISA) circuit instructions to control system instructions when calculating this limit.
<span id="2-qubit-limit"></span>
## Maximum number of single- and two-qubit gates per circuit

| Instruction | Count |
|-------------|-------|
| `rz` | 1 |
| `delay` | 1 |
| `sx` | 2 |
| `x` | 2 |
| `cx` | 5 |
| `cz` | 5 |
| `ecr` | 5 |
| `measure` | 10 |
| `reset` | 17 |
| `init` | 50 |

<Admonition type="note">
This table captures the heuristic used in validation and does not reflect the exact number of instructions used to implement an operation.
</Admonition>
Certain primitive options increase the circuit size. The described limits are checked *after* the expected increase in circuit size. In particular, these options increase circuit size:

<span id="2-qubit-limit"></span>
## Maximum number of two-qubit gates per job
- Dynamical decoupling and twirling introduce additional single-qubit gates.
- Gate-folding ZNE introduces additional two-qubit gates. The number of two-qubit gates is multiplied by the sum of noise factors requested in gate-folding ZNE.
</Admonition>

This ensures that the job can be manipulated within the memory limits of the low-level software stack. The precise limit depends on the options selected in the Sampler or Estimator query. However, if a job has fewer than 10,000 two-qubit gates, it will pass validation. Some options might allow more, and the service will calculate the limit allowed for the user-selected options and communicate that should your job be rejected in validation.
The maximum number of single qubit gates are as follows:
- 2.4 million RZ gates
- 1.6 million SX gates
The maximum number of two-qubit gates per circuit is 400,000 for static circuits and 100,000 for dynamic circuits.
This ensures that the job can be manipulated within the memory limits of the low-level software stack.