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