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.
TranspilationOptions
class TranspilationOptions(skip_transpilation=False, initial_layout=None, layout_method=None, routing_method=None, approximation_degree=None)
Transpilation options.
Parameters
- skip_transpilation (
bool
) – Whether to skip transpilation. - initial_layout (
Union
[dict
,List
,None
]) – Initial position of virtual qubits on physical qubits. Seeqiskit.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
Type: float | None
Default value: None
initial_layout
Type: dict | List | None
Default value: None
layout_method
Type: str | None
Default value: None
routing_method
Type: str | None
Default value: None
skip_transpilation
Type: bool
Default value: 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?
Report a bug or request content on GitHub.