Skip to content

Commit

Permalink
Merge cb04228 into 2974d28
Browse files Browse the repository at this point in the history
  • Loading branch information
beckykd authored May 29, 2024
2 parents 2974d28 + cb04228 commit 24e2afb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
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-mit"></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`.

Examples:

Turn off all error mitigation and suppression in EstimatorV2.

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

options = estimator.options

# 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
```


## 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-mit)

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

Expand Down

0 comments on commit 24e2afb

Please sign in to comment.