---
title: DAGDepNode (latest version)
description: API reference for qiskit.dagcircuit.DAGDepNode in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.dagcircuit.DAGDepNode
---

# DAGDepNode

*class* `qiskit.dagcircuit.DAGDepNode(type=None, op=None, name=None, qargs=(), cargs=(), successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=-1)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/dagcircuit/dagdepnode.py#L25-L175)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Object to represent the information at a node in the DAGDependency().

It is used as the return value from \*\_nodes() functions and can be supplied to functions that take a node.

## Attributes

**Parameters**

- **successors** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **predecessors** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **matchedwith** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **successorstovisit** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **isblocked** ([*bool*](https://docs.python.org/3/library/functions.html#bool) *| None*)
- **qindices** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **cindices** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*] | None*)
- **nid** ([*int*](https://docs.python.org/3/library/functions.html#int))

### cargs

Type: [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`Clbit`](/docs/api/qiskit/circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit"), ...]

### cindices

Type: [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`int`](https://docs.python.org/3/library/functions.html#int), ...]

### isblocked

Type: [`bool`](https://docs.python.org/3/library/functions.html#bool)

### matchedwith

Type: [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`int`](https://docs.python.org/3/library/functions.html#int)] | [`None`](https://docs.python.org/3/library/constants.html#None)

### name

Type: [`str`](https://docs.python.org/3/library/stdtypes.html#str) | [`None`](https://docs.python.org/3/library/constants.html#None)

### node\_id

### predecessors

Type: [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`int`](https://docs.python.org/3/library/functions.html#int)]

### qindices

Type: [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`int`](https://docs.python.org/3/library/functions.html#int), ...]

### reachable

Type: [`bool`](https://docs.python.org/3/library/functions.html#bool) | [`None`](https://docs.python.org/3/library/constants.html#None)

### sort\_key

Type: [`str`](https://docs.python.org/3/library/stdtypes.html#str)

### successors

Type: [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`int`](https://docs.python.org/3/library/functions.html#int)]

### successorstovisit

Type: [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`int`](https://docs.python.org/3/library/functions.html#int)] | [`None`](https://docs.python.org/3/library/constants.html#None)

### type

Type: [`str`](https://docs.python.org/3/library/stdtypes.html#str)

### op

Returns the Instruction object corresponding to the op for the node, else None

### qargs

Type: [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`Qubit`](/docs/api/qiskit/circuit#qiskit.circuit.Qubit "qiskit.circuit.Qubit"), ...]

Returns list of Qubit, else an empty list.

## Methods

### copy

`copy()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/dagcircuit/dagdepnode.py#L150-L175)

Function to copy a DAGDepNode object. :returns: a copy of a DAGDepNode object. :rtype: DAGDepNode

### semantic\_eq

*static* `semantic_eq(node1, node2)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/dagcircuit/dagdepnode.py#L121-L148)

Check if DAG nodes are considered equivalent, e.g., as a node\_match for nx.is\_isomorphic.

**Parameters**

- **node1** ([*DAGDepNode*](#qiskit.dagcircuit.DAGDepNode "qiskit.dagcircuit.DAGDepNode")) – A node to compare.
- **node2** ([*DAGDepNode*](#qiskit.dagcircuit.DAGDepNode "qiskit.dagcircuit.DAGDepNode")) – The other node to compare.

**Returns**

If node1 == node2

**Return type**

[Bool](/docs/api/qiskit/circuit_classical#qiskit.circuit.classical.types.Bool "qiskit.circuit.classical.types.Bool")
