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

How to turn off error mitigation and suppression #1459

Merged
merged 8 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
31 changes: 31 additions & 0 deletions docs/run/configure-error-mitigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,37 @@ job = estimator.run(circuits=[psi1], observables=[H1], parameter_values=[theta1]
psi1_H1 = job.result()
```

<span id="no-error-mitigation"></span>
## Turn off all error mitigation and error suppression

Many researchers want total control over their experiments and don't want the primitives to transform their circuits. To accomplish this, for EstimatorV2, set `resilience_level = 0` and `optimization_level = 0`. For SamplerV2, only measurement twirling is enabled by default. So one needs to set `options.twirling.enable_measure = False`.
beckykd marked this conversation as resolved.
Show resolved Hide resolved

Examples:

Turn off all error mitigation and suppression in EstimatorV2.

```python
from qiskit_ibm_runtime import SamplerV2 as Sampler, Options

options = estimator.options
beckykd marked this conversation as resolved.
Show resolved Hide resolved

# Turn off all error mitigation and suppression
options.resilience_level = 0
options.optimization_level = 0
```

Turn off all error mitigation and suppression in SamplerV2.

```python
from qiskit_ibm_runtime import SamplerV2 as Sampler, Options

options = sampler.options

# Turn off all error mitigation and suppression
options.twirling.enable_measure = False
```
beckykd marked this conversation as resolved.
Show resolved Hide resolved


## Next steps

<Admonition type="tip" title="Recommendations">
Expand Down
2 changes: 1 addition & 1 deletion docs/run/configure-runtime-compilation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: How to configure runtime compilation in Qiskit Runtime.

Runtime compilation techniques optimize and transform your circuit to minimize errors. Runtime compilation adds some classical pre-processing overhead to your overall runtime. Therefore, it is important to achieve a balance between perfecting your results and ensuring that your job completes in a reasonable amount of time.

Primitives let you employ runtime compilation by choosing advanced runtime compilation options and, for Estimator V2, by setting the optimization level (`optimization_level`) option.
Primitives let you employ runtime compilation by choosing advanced runtime compilation options and, for Estimator V2, by setting the optimization level (`optimization_level`) option. If you don't want any processing done to minimize errors, follow the instructions in [Turn off all error mitigation and error suppression.](configure-error-mitigation#no-error-mitigation)

<admonition type="note">Estimator V2 supports optimization levels 0 and 1 only. Sampler V2 does not support setting the optimization level.</admonition>

Expand Down
Loading