About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Configure error suppression
Error suppression refers to techniques where you use knowledge about the undesirable effects to introduce customization that can anticipate and avoid the potential impacts of those effects. These techniques often consist of altering or adding control signals to ensure that the quantum processor returns the desired results. This typically results in quantum pre-processing overhead; 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 support a number of error suppression techniques, including dynamical decoupling and Pauli twirling. See Error mitigation and suppression techniques for an explanation of each. When using primitives, you can turn on or off individual methods. See the Advanced error suppression options section for details.
Estimator employs error suppression and mitigation by default. If you don't want any processing done to your input circuits, follow the instructions in the Turn off all error mitigation and error suppression section.
Advanced error suppression options
In the primitives, you can explicitly enable and disable individual error mitigation and suppression methods, such as dynamical decoupling.
Notes
- Not all options are available for both primitives. See the available options table for the list of available options.
- Not all methods work together on all types of circuits. See the feature compatibility table for details.
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime import SamplerV2 as Sampler
service = QiskitRuntimeService()
backend = service.least_busy(operational=True, simulator=False)
sampler = Sampler(backend)
# Turn on dynamical decoupling with sequence XpXm.
sampler.options.dynamical_decoupling.enable = True
sampler.options.dynamical_decoupling.sequence_type = "XpXm"
print(f">>> dynamical decoupling sequence to use: {sampler.options.dynamical_decoupling.sequence_type}")
Qiskit Code Assistant
Can't remember the right attributes? Try asking Qiskit Code Assistant.
# Enable dynamic decoupling for sampler with the 'XpXm' sequence type
New to the code assistant? See Qiskit Code Assistant for installation and usage. Note this is an experimental feature and only available to IBM Quantum™ Premium Plan users.
Turn off all error suppression
For instructions to turn off all error suppression, see the Turn off all error suppression and mitigation section.
Next steps
Recommendations
- Learn more about error mitigation and error suppression techniques.
- Configure error mitigation.
- Explore other options.
- Decide what execution mode to run your job in.
Was this page helpful?
Report a bug or request content on GitHub.