Skip to main contentIBM Quantum Documentation

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 options 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
Was this page helpful?
Report a bug or request content on GitHub.