Skip to content

Commit cc64dd7

Browse files
1ucian0mtreinish
andauthored
The unused parameter dag in DAGNode constructor is removed (Qiskit#13863)
* The unused parameter dag in DAGNode constructor is removed * Update crates/circuit/src/dag_node.rs Co-authored-by: Matthew Treinish <[email protected]> * remove internal usage * Update releasenotes/notes/removal_13022-13f237b337e3d5fb.yaml --------- Co-authored-by: Matthew Treinish <[email protected]>
1 parent 6c7ee8f commit cc64dd7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

crates/circuit/src/dag_node.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,12 @@ pub struct DAGOpNode {
119119
#[pymethods]
120120
impl DAGOpNode {
121121
#[new]
122-
#[pyo3(signature = (op, qargs=None, cargs=None, *, dag=None))]
122+
#[pyo3(signature = (op, qargs=None, cargs=None))]
123123
pub fn py_new(
124124
py: Python,
125125
op: Bound<PyAny>,
126126
qargs: Option<TupleLikeArg>,
127127
cargs: Option<TupleLikeArg>,
128-
#[allow(unused_variables)] dag: Option<Bound<PyAny>>,
129128
) -> PyResult<Py<Self>> {
130129
let py_op = op.extract::<OperationFromPython>()?;
131130
let qargs = qargs.map_or_else(|| PyTuple::empty(py), |q| q.value);

qiskit/dagcircuit/dagdependency_v2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ def apply_operation_back(self, operation, qargs=(), cargs=()):
345345
op=operation,
346346
qargs=qargs,
347347
cargs=cargs,
348-
dag=self,
349348
)
350349
new_node._node_id = self._multi_graph.add_node(new_node)
351350
self._update_edges()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
upgrade_circuits:
3+
- |
4+
The deprecated argument ``.dag`` for :class:`.DAGNode` and its subclasses :class:`.DAGOpNode`,
5+
:class:`.DAGOutNode`, and :class:`.DAGInNode`. ``dag`` was optional parameter when constructing
6+
these objects that was unused and ignored since the 1.3.0 release. The parameter was deprecated
7+
in 1.4 and has now been is removed.

0 commit comments

Comments
 (0)