Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate backend_props arg in generate_translation_pass_manager #13838

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions qiskit/transpiler/preset_passmanagers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import collections
from typing import Optional
import warnings

from qiskit.circuit.equivalence_library import SessionEquivalenceLibrary as sel
from qiskit.circuit.controlflow import CONTROL_FLOW_OP_NAMES
Expand Down Expand Up @@ -454,6 +455,18 @@ def generate_translation_passmanager(
Raises:
TranspilerError: If the ``method`` kwarg is not a valid value
"""
if backend_props is not None:
warnings.warn(
"The backend_props argument for this function has been deprecated. "
"The BackendProperties data structure has been deprecated and will be "
"removed in Qiskit 2.0, instead you should use a Target object with the "
"required target argument. You can use Target.from_configuration() "
"to build the target from the properties object, but in 2.0 you will need "
"to generate a target directly.",
DeprecationWarning,
stacklevel=2,
)

if method == "translator":
unroll = [
# Use unitary synthesis for basis aware decomposition of
Expand Down
10 changes: 10 additions & 0 deletions releasenotes/notes/deprecate-bp-args-gtpm-4023a5f86668d96d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
deprecations_transpiler:
- |
The ``backend_props`` argument of the
:func:`.generate_translation_pass_manager` function is deprecated and
will be removed in Qiskit 2.0. This argument is optional and is superseded
if the required ``target`` argument is populated. As the
:class:`.BackendProperties` is deprecated and will be removed in Qiskit
2.0 specifying this option will also no longer work. Usage of the argument
can safely be removed in 1.x as long as you were passing in a target.
Loading