Skip to content

Commit

Permalink
Update release note
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Nov 3, 2021
1 parent 6ae0fd6 commit 729971f
Showing 1 changed file with 39 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,47 @@
upgrade:
- |
The preset passmanagers in :mod:`qiskit.transpiler.preset_passmanagers`
for all optimization levels above 0 have been changed to run the
:class:`~qiskit.transpiler.passes.VF2Layout` by default prior to the layout
pass. The :class:`~qiskit.transpiler.passes.VF2Layout` pass will quickly
check if a perfect layout can be found and superscedes what was previously
for all optimization levels 2 and 3 as generated by
:func:`~qiskit.transpiler.preset_passmanagers.level_2_pass_manager` and
:func:`~qiskit.transpiler.preset_passmanagers.level_3_pass_manager` have
been changed to run the :class:`~qiskit.transpiler.passes.VF2Layout` by
default prior to the layout pass. The
:class:`~qiskit.transpiler.passes.VF2Layout` pass will quickly check if
a perfect layout can be found and superscedes what was previously
done for optimization levels 2 and 3 which were using a combination of
:class:`~qiskit.transpiler.passes.TrivialLayout` and
:class:`~qiskit.transpiler.passes.CSPLayout` to try and find a perfect
layout. However, because :class:`~qiskit.transpiler.passes.VF2Layout` is
fast even in the failure mode it has been added to level 1 as
well to improve the quality of the results. This will result in potentially
different behavior when :func:`~qiskit.compiler.transpile` is called by
default as it removes a default path for all optimization levels >=1
of using a trivial layout (where ``circuit.qubits[0]`` is mapped to physical
qubit 0, ``circuit.qubits[1]`` is mapped to physical qubit 1, etc) assuming
the trivial layout is perfect. If your use case was dependent on the
layout. This will result in potentially different behavior when
:func:`~qiskit.compiler.transpile` is called by default as it removes a
default path for all optimization levels >=2 of using a trivial layout
(where ``circuit.qubits[0]`` is mapped to physical qubit 0,
``circuit.qubits[1]`` is mapped to physical qubit 1, etc) assuming the
trivial layout is perfect. If your use case was dependent on the
trivial layout you can explictly request it when transpiling by specifying
``layout_method="trivial"`` when calling :func:`~qiskit.compiler.transpile`.
- |
The preset pass manager for optimization level 1 (when calling
:func:`~qiskit.compiler.transpile` with ``optimization_level=1`` or when
no ``optimization_level`` argument is set) as generated by
:func:`~qiskit.transpiler.preset_passmanagers.level_1_pass_manager` has
been changed so that :class:`~qiskit.transpiler.passes.VF2Layout` is
called by default to quickly check if a a perfect layout can be found
prior to the :class:`~qiskit.transpiler.passes.DenseLayout`. However,
unlike with optimization level 2 and 3 a trivial layout is attempted
prior to running :class:`~qiskit.transpiler.passes.VF2Layout` and if
it's a perfect mapping this will be used instead.
deprecations:
- |
For the preset pass manager for optimization level 1 (when calling
:func:`~qiskit.compiler.transpile` with ``optimization_level=1`` or
no ``optimization_level`` argument set) as generated by
:func:`~qiskit.transpiler.preset_passmanagers.level_1_pass_manager` the
implict default of running ::class:`~qiskit.transpiler.passes.TrivialLayout`
and using the trivial layout if it's a perfect match is deprecated
and this behavior will change in a future release. A ``FutureWarning`` is
now emitted whenever a trivial layout is used by default with optimization
level 1. This means that :func:`~qiskit.compiler.transpile` by default may
emit a ``FutureWarning`` if it picks a trivial layout as a result of this
current behavior. If this default towards a trivial layout is desired you
can explicitly request it when transpiling by specifying
``layout_method="trivial"`` when calling :func:`~qiskit.compiler.transpile`.

0 comments on commit 729971f

Please sign in to comment.