Skip to content

Commit

Permalink
Rename transpile() option and reword doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Oct 3, 2022
1 parent bb45d9d commit d004080
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions qiskit/compiler/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def transpile(
hls_config: Optional[HLSConfig] = None,
init_method: str = None,
optimization_method: str = None,
ignore_backend_default_methods: bool = False,
ignore_backend_supplied_default_methods: bool = False,
) -> Union[QuantumCircuit, List[QuantumCircuit]]:
"""Transpile one or more circuits, according to some desired transpilation targets.
Expand Down Expand Up @@ -277,11 +277,11 @@ def callback_func(**kwargs):
plugin is not used. You can see a list of installed plugins by
using :func:`~.list_stage_plugins` with ``"optimization"`` for the
``stage_name`` argument.
ignore_backend_default_methods: If set to ``True`` any default methods specified by
ignore_backend_supplied_default_methods: If set to ``True`` any default methods specified by
a backend will be ignored. Some backends specify alternative default methods
to support custom compilation target passes/plugins which support backend
specific compilation techniques. If you'd prefer that these did not run and
use the defaults for a given optimization level this can be used.
to support custom compilation target specific passes/plugins which support backend
specific compilation techniques. If you'd prefer that these defaults were not used
this option is used to disable those backend specific defaults.
Returns:
The transpiled circuit(s).
Expand Down Expand Up @@ -350,7 +350,7 @@ def callback_func(**kwargs):
hls_config,
init_method,
optimization_method,
ignore_backend_default_methods,
ignore_backend_supplied_default_methods,
)
# Get transpile_args to configure the circuit transpilation job(s)
if coupling_map in unique_transpile_args:
Expand Down Expand Up @@ -604,7 +604,7 @@ def _parse_transpile_args(
hls_config,
init_method,
optimization_method,
ignore_backend_default_methods,
ignore_backend_supplied_default_methods,
) -> Tuple[List[Dict], Dict]:
"""Resolve the various types of args allowed to the transpile() function through
duck typing, overriding args, etc. Refer to the transpile() docstring for details on
Expand Down Expand Up @@ -677,7 +677,7 @@ def _parse_transpile_args(
}

list_transpile_args = []
if not ignore_backend_default_methods:
if not ignore_backend_supplied_default_methods:
if scheduling_method is None and hasattr(backend, "get_scheduling_stage_method"):
scheduling_method = backend.get_scheduling_stage_method()
if translation_method is None and hasattr(backend, "get_translation_stage_method"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ features:
:mod:`~qiskit.transpiler.preset_passmanagers.plugin` interface.
For more details on how to use this see :ref:`custom_transpiler_backend`.
- |
Added a new keyword argument, ``ignore_backend_default_methods``, to the
Added a new keyword argument, ``ignore_backend_supplied_default_methods``, to the
:func:`~.transpile` function can be used to disable a backend's custom
default method if the target backend has one set.

0 comments on commit d004080

Please sign in to comment.