Skip to content

Commit

Permalink
Apply new deprecation decorators to dagcircuit folder (#9874)
Browse files Browse the repository at this point in the history
* Apply new deprecation decorators to assembler, compiler, and dagcircuit folders

* Fix quantum_instance.py triggering deprecation for max_credits

* Review feedback

* Fmt - oops
  • Loading branch information
Eric-Arellano authored May 10, 2023
1 parent 2b18980 commit 94eea5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 3 additions & 5 deletions qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
from qiskit.circuit.parameterexpression import ParameterExpression
from qiskit.dagcircuit.exceptions import DAGCircuitError
from qiskit.dagcircuit.dagnode import DAGNode, DAGOpNode, DAGInNode, DAGOutNode
from qiskit.utils.deprecation import deprecate_function
from qiskit.utils.deprecation import deprecate_func


class DAGCircuit:
Expand Down Expand Up @@ -526,10 +526,8 @@ def _add_op_node(self, op, qargs, cargs):
self._increment_op(op)
return node_index

@deprecate_function(
"The DAGCircuit._copy_circuit_metadata method is deprecated as of 0.20.0. It will be "
"removed no earlier than 3 months after the release date. You should use the "
"DAGCircuit.copy_empty_like method instead, which acts identically.",
@deprecate_func(
additional_msg="Instead, use :meth:`~copy_empty_like()`, which acts identically.",
since="0.20.0",
)
def _copy_circuit_metadata(self):
Expand Down
1 change: 0 additions & 1 deletion qiskit/dagcircuit/dagnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def semantic_eq(node1, node2, bit_indices1=None, bit_indices2=None):
"release will require the mappings to be provided as arguments.",
DeprecationWarning,
)

bit_indices1 = {arg: arg for arg in node1.qargs + node1.cargs}
bit_indices2 = {arg: arg for arg in node2.qargs + node2.cargs}

Expand Down

0 comments on commit 94eea5c

Please sign in to comment.