qiskit-documentation/docs/api/qiskit/0.40/qiskit.dagcircuit.DAGDepNod...

118 lines
3.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: DAGDepNode
description: API reference for qiskit.dagcircuit.DAGDepNode
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.dagcircuit.DAGDepNode
---
# DAGDepNode
<Class id="qiskit.dagcircuit.DAGDepNode" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.23/qiskit/dagcircuit/dagdepnode.py" signature="DAGDepNode(type=None, op=None, name=None, qargs=(), cargs=(), condition=None, successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=- 1)" modifiers="class">
Bases: `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.
## Methods
### copy
<Function id="qiskit.dagcircuit.DAGDepNode.copy" signature="DAGDepNode.copy()">
Function to copy a DAGDepNode object. :returns: a copy of a DAGDepNode object. :rtype: DAGDepNode
</Function>
### semantic\_eq
<Function id="qiskit.dagcircuit.DAGDepNode.semantic_eq" signature="DAGDepNode.semantic_eq(node1, node2)" modifiers="static">
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
</Function>
## Attributes
### type
<Attribute id="qiskit.dagcircuit.DAGDepNode.type" />
### name
<Attribute id="qiskit.dagcircuit.DAGDepNode.name" />
### cargs
<Attribute id="qiskit.dagcircuit.DAGDepNode.cargs" />
### sort\_key
<Attribute id="qiskit.dagcircuit.DAGDepNode.sort_key" />
### node\_id
<Attribute id="qiskit.dagcircuit.DAGDepNode.node_id" />
### successors
<Attribute id="qiskit.dagcircuit.DAGDepNode.successors" />
### predecessors
<Attribute id="qiskit.dagcircuit.DAGDepNode.predecessors" />
### reachable
<Attribute id="qiskit.dagcircuit.DAGDepNode.reachable" />
### matchedwith
<Attribute id="qiskit.dagcircuit.DAGDepNode.matchedwith" />
### isblocked
<Attribute id="qiskit.dagcircuit.DAGDepNode.isblocked" />
### successorstovisit
<Attribute id="qiskit.dagcircuit.DAGDepNode.successorstovisit" />
### qindices
<Attribute id="qiskit.dagcircuit.DAGDepNode.qindices" />
### cindices
<Attribute id="qiskit.dagcircuit.DAGDepNode.cindices" />
### condition
<Attribute id="qiskit.dagcircuit.DAGDepNode.condition">
Returns the condition of the node.op
</Attribute>
### op
<Attribute id="qiskit.dagcircuit.DAGDepNode.op">
Returns the Instruction object corresponding to the op for the node, else None
</Attribute>
### qargs
<Attribute id="qiskit.dagcircuit.DAGDepNode.qargs">
Returns list of Qubit, else an empty list.
</Attribute>
</Class>