Skip to content

Commit

Permalink
Deprecate NoiseAdaptiveLayout and CrosstalkAdaptiveSchedule
Browse files Browse the repository at this point in the history
This commit deprecates two transpiler passes that are no longer useful
in modern Qiskit. NoiseAdaptiveLayout has largely been superseded by
VF2Layout and VF2PostLayout which takes noise into account for layout
selection. The CrosstalkAdaptiveSchedule isn't usable anymore as it
relies on custom fields being set to report cross talk in the
BackendProperties payload for a BackendV1 instance. As most backends
are using BackendV2 now and no current backends are reporting this
custom field the pass can't be used. These transpiler passes will be
removed in the 1.0.0 release (see Qiskit#11400).
  • Loading branch information
mtreinish committed Dec 12, 2023
1 parent 3b9225b commit b4581f8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qiskit/transpiler/passes/layout/noise_adaptive_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from qiskit.transpiler.basepasses import AnalysisPass
from qiskit.transpiler.exceptions import TranspilerError
from qiskit.transpiler.target import target_to_backend_properties, Target
from qiskit.utils.deprecation import deprecate_func


class NoiseAdaptiveLayout(AnalysisPass):
Expand Down Expand Up @@ -54,7 +55,11 @@ class NoiseAdaptiveLayout(AnalysisPass):
in the transpiler architecture it is best passed around between passes
by being set in `property_set`.
"""

@deprecate_func(
"0.46",
package_name="qiskit",
removal_timeline="in the 1.0.0 release",
)
def __init__(self, backend_prop, coupling_map=None):
"""NoiseAdaptiveLayout initializer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from qiskit.circuit.barrier import Barrier
from qiskit.dagcircuit import DAGOpNode
from qiskit.utils import optionals as _optionals
from qiskit.utils.deprecation import deprecate_func

NUM_PREC = 10
TWOQ_XTALK_THRESH = 3
Expand All @@ -50,6 +51,11 @@
class CrosstalkAdaptiveSchedule(TransformationPass):
"""Crosstalk mitigation through adaptive instruction scheduling."""

@deprecate_func(
"0.46",
package_name="qiskit",
removal_timeline="in the 1.0.0 release",
)
def __init__(
self, backend_prop, crosstalk_prop, weight_factor=0.5, measured_qubits=None, target=None
):
Expand Down
15 changes: 15 additions & 0 deletions releasenotes/notes/deprecate-old-passes-b2650ec96683b924.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
deprecations:
- |
The :class:`.NoiseAdaptiveLayout` transpiler pass and the corresponding
``"noise_adaptive"`` layout stage plugin have been deprecated and will
be removed in the 1.0.0 release. This pass has been largely superseded by
:class:`.VF2Layout` and :class:`.VF2PostLayout` which will set a layout
based on the reported noise characteristics of a backend.
- |
The :class:`.CrosstalkAdaptiveSchedule` transpiler pass has been deprecated
and will be removed in the 1.0.0 release. This pass was not usable any
longer because it's internal operation was dependent on custom properties
being set in the :class:`.BackendProperties` payload of a
:class:`.BackendV1` instance. As no backends are setting these fields
the pass has been deprecated.

0 comments on commit b4581f8

Please sign in to comment.