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

91 lines
6.5 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 (v0.26)
description: API reference for qiskit.dagcircuit.DAGDepNode in qiskit v0.26
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.dagcircuit.DAGDepNode
---
<span id="qiskit-dagcircuit-dagdepnode" />
# qiskit.dagcircuit.DAGDepNode
<Class id="qiskit.dagcircuit.DAGDepNode" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/dagcircuit/dagdepnode.py" signature="DAGDepNode(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=- 1)" modifiers="class">
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.
### \_\_init\_\_
<Function id="qiskit.dagcircuit.DAGDepNode.__init__" signature="__init__(type=None, op=None, name=None, qargs=None, cargs=None, condition=None, successors=None, predecessors=None, reachable=None, matchedwith=None, successorstovisit=None, isblocked=None, qindices=None, cindices=None, nid=- 1)">
Initialize self. See help(type(self)) for accurate signature.
</Function>
## Methods
| | |
| -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [`__init__`](#qiskit.dagcircuit.DAGDepNode.__init__ "qiskit.dagcircuit.DAGDepNode.__init__")(\[type, op, name, qargs, cargs, …]) | Initialize self. |
| [`copy`](#qiskit.dagcircuit.DAGDepNode.copy "qiskit.dagcircuit.DAGDepNode.copy")() | Function to copy a DAGDepNode object. |
| [`semantic_eq`](#qiskit.dagcircuit.DAGDepNode.semantic_eq "qiskit.dagcircuit.DAGDepNode.semantic_eq")(node1, node2) | Check if DAG nodes are considered equivalent, e.g., as a node\_match for nx.is\_isomorphic. |
## Attributes
| | |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `cargs` | |
| `cindices` | |
| `condition` | |
| `isblocked` | |
| `matchedwith` | |
| `name` | |
| `node_id` | |
| [`op`](#qiskit.dagcircuit.DAGDepNode.op "qiskit.dagcircuit.DAGDepNode.op") | Returns the Instruction object corresponding to the op for the node, else None |
| `predecessors` | |
| [`qargs`](#qiskit.dagcircuit.DAGDepNode.qargs "qiskit.dagcircuit.DAGDepNode.qargs") | Returns list of Qubit, else an empty list. |
| `qindices` | |
| `reachable` | |
| `sort_key` | |
| `successors` | |
| `successorstovisit` | |
| `type` | |
### copy
<Function id="qiskit.dagcircuit.DAGDepNode.copy" signature="copy()">
Function to copy a DAGDepNode object. :returns: a copy of a DAGDepNode object. :rtype: DAGDepNode
</Function>
### 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>
### semantic\_eq
<Function id="qiskit.dagcircuit.DAGDepNode.semantic_eq" signature="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>
</Class>