Skip to main contentIBM Quantum Documentation


class Options(optimization_level=None, resilience_level=None, max_execution_time=None, transpilation=<factory>, resilience=<factory>, execution=<factory>, environment=<factory>, simulator=<factory>)

GitHub(opens in a new tab)

Options for the primitives, used by V1 primitives.


  • optimization_level (Optional[int]) –

    How much optimization to perform on the circuits. Higher levels generate more optimized circuits, at the expense of longer transpilation times. This is based on the optimization_level parameter in qiskit-terra but may include backend-specific optimization. Default: 3.

    • 0: no optimization
    • 1: light optimization
    • 2: heavy optimization
    • 3: even heavier optimization
  • resilience_level (Optional[int]) –

    How much resilience to build against errors. Higher levels generate more accurate results, at the expense of longer processing times. Default: 1.

    • 0: No mitigation.
    • 1: Minimal mitigation costs. Mitigate error associated with readout errors.
    • 2: Medium mitigation costs. Typically reduces bias in estimators but is not guaranteed to be zero bias. Only applies to estimator.
    • 3: Heavy mitigation with layer sampling. Theoretically expected to deliver zero bias estimators. Only applies to estimator.

    Refer to the Qiskit Runtime documentation. for more information about the error mitigation methods used at each level.

  • max_execution_time (Optional[int]) –

    Maximum execution time in seconds, which is based on system execution time (not wall clock time). System execution time is the amount of time that the system is dedicated to processing your job. If a job exceeds this time limit, it is forcibly cancelled. Simulator jobs continue to use wall clock time.

    Refer to the Max execution time documentation. for more information.

  • transpilation (Union[TranspilationOptions, Dict]) – Transpilation options. See TranspilationOptions for all available options.

  • resilience (Union[ResilienceOptions, Dict]) – Advanced resilience options to fine tune the resilience strategy. See ResilienceOptions for all available options.

  • execution (Union[ExecutionOptions, Dict]) – Execution time options. See ExecutionOptions for all available options.

  • environment (Union[EnvironmentOptions, Dict]) – Options related to the execution environment. See EnvironmentOptions for all available options.

  • simulator (Union[SimulatorOptions, Dict]) – Simulator options. See SimulatorOptions for all available options.



Type: int | None

Default value: None


Type: int | None

Default value: None


Type: int | None

Default value: None


Type: TranspilationOptions | Dict


Type: ResilienceOptions | Dict


Type: ExecutionOptions | Dict


Type: EnvironmentOptions | Dict


Type: SimulatorOptions | Dict



static validate_options(options)

GitHub(opens in a new tab)

Validate that program inputs (options) are valid :raises ValueError: if optimization_level is outside the allowed range. :raises ValueError: if max_execution_time is outside the allowed range.

Return type


Was this page helpful?
Report a bug or request content on GitHub.