qiskit/dagcircuit/dagcircuit.py
def _add_op_node(self, op, qargs, cargs, condition=None):
        """Add a new operation node to the graph and assign properties.

        Args:
            op (Instruction): the operation associated with the DAG node
            qargs (list): list of quantum wires to attach to.
            cargs (list): list of classical wires to attach to.
            condition (tuple or None): optional condition (ClassicalRegister, int)
        """
        node_properties = {
            "type": "op",
            "op": op,
            "name": op.name,
            "qargs": qargs,
            "cargs": cargs,
            "condition": condition
        }

        # Add a new operation node to the graph
        self._max_node_id += 1
        new_node = DAGNode(data_dict=node_properties, nid=self._max_node_id)
        self._multi_graph.add_node(new_node)
        self._id_to_node[self._max_node_id] = new_node
def _add_op_node(self, op, qargs, cargs, condition=None):
        node_properties = {
            "type": "op",
            "op": op,
            "name": op.name,
            "qargs": qargs,
            "cargs": cargs,
            "condition": condition
        }

        # Add a new operation node to the graph
        self._max_node_id += 1
        new_node = DAGNode(data_dict=node_properties, nid=self._max_node_id)
        self._multi_graph.add_node(new_node)
        self._id_to_node[self._max_node_id] = new_node
def _add_op_node ( self , op , qargs , cargs , condition = None ) : node_properties = { "type" : "op" , "op" : op , "name" : op . name , "qargs" : qargs , "cargs" : cargs , "condition" : condition } # Add a new operation node to the graph self . _max_node_id += 1 new_node = DAGNode ( data_dict = node_properties , nid = self . _max_node_id ) self . _multi_graph . add_node ( new_node ) self . _id_to_node [ self . _max_node_id ] = new_node
Add a new operation node to the graph and assign properties.

        Args:
            op (Instruction): the operation associated with the DAG node
            qargs (list): list of quantum wires to attach to.
            cargs (list): list of classical wires to attach to.
            condition (tuple or None): optional condition (ClassicalRegister, int)
Add a new operation node to the graph and assign properties .