qiskit/releasenotes/notes/0.15/add-basistranslator-to-defa...

29 lines
1.2 KiB
YAML

---
features:
- |
A new ``translation_method`` keyword argument has been added to
:func:`~qiskit.compiler.transpile` to allow selection of the method to be
used for translating circuits to the available device gates. For example,
``transpile(circ, backend, translation_method='translator')``. Valid
choices are:
* ``'unroller'``: to use the :class:`~qiskit.transpiler.passes.Unroller`
pass
* ``'translator'``: to use the
:class:`~qiskit.transpiler.passes.BasisTranslator` pass.
* ``'synthesis'``: to use the
:class:`~qiskit.transpiler.passes.UnitarySynthesis` pass.
The default value is ``'translator'``.
upgrade:
- |
By default the preset passmanagers in
:mod:`qiskit.transpiler.preset_passmanagers` are using
:class:`~qiskit.transpiler.passes.UnrollCustomDefinitions` and
:class:`~qiskit.transpiler.passes.BasisTranslator` to handle basis changing
instead of the previous default :class:`~qiskit.transpiler.passes.Unroller`.
This was done because the new passes are more flexible and allow targeting
any basis set, however the output may differ. To use the previous default
you can set the ``translation_method`` kwarg on
:func:`~qiskit.compiler.transpile` to ``'unroller'``.