Skip to main contentIBM Quantum Documentation

TranspilationOptions

TranspilationOptions(skip_transpilation=False, initial_layout=None, layout_method=None, routing_method=None, approximation_degree=None) GitHub(opens in a new tab)

Transpilation options.

Parameters

  • skip_transpilation (bool) – Whether to skip transpilation.
  • initial_layout (Union[dict, List, None]) – Initial position of virtual qubits on physical qubits. See qiskit.compiler.transpile for more information.
  • layout_method (Optional[str]) – Name of layout selection pass. One of ‘trivial’, ‘dense’, ‘noise_adaptive’, ‘sabre’.
  • routing_method (Optional[str]) – Name of routing pass. One of ‘basic’, ‘lookahead’, ‘stochastic’, ‘sabre’, ‘none’.
  • approximation_degree (Optional[float]) – heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)

Attributes

approximation_degree

float | None

= None

initial_layout

dict | List | None

= None

layout_method

str | None

= None

routing_method

str | None

= None

skip_transpilation

bool

= False


Methods

validate_transpilation_options

static validate_transpilation_options(transpilation_options)

Validate that transpilation options are legal. :raises ValueError: if any transpilation option is not supported :raises ValueError: if layout_method is not in LayoutMethodType or None. :raises ValueError: if routing_method is not in RoutingMethodType or None. :raises ValueError: if approximation_degree in not None or in the range 0.0 to 1.0.

Return type

None

Was this page helpful?