Skip to main contentIBM Quantum Documentation Preview
This is a preview build of IBM Quantum® documentation. Refer to quantum.cloud.ibm.com/docs for the official documentation.

Introduction to options

You can pass options to primitives to customize them to meet your needs. This section focuses on Qiskit Runtime primitive options. While the interface of the primitives' run() method is common across all implementations, their options are not. Consult the corresponding API references for information about the qiskit.primitives and qiskit_aer.primitives options.


Overview

Structure

When calling the primitives, you can pass in options by using an options class or a dictionary. Commonly-used options, such as resilience_level, are at the first level. Other options are grouped into different categories, such as execution. See Estimator options, Sampler options, and Executor options for full details.

Defaults

If you do not specify a value for an option, it is given a special value of Unset and the server default value is used. Thus, the default value will be the same regardless of your code version.

The tables in the Options classes summary sections on each primitive's options guide lists the default values.


Set options

Options can be defined before a primitive is constructed and passed to the primitive, which makes a copy of them. This can be done either as a nested dictionary, or by using the options classes. Additionally, after the primitive is constructed, its options can be changed. Use the workflow that works best for your application.


Next steps

Recommendations