Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.dagcircuit.DAGCircuit.substitute_node_with_dag

DAGCircuit.substitute_node_with_dag(node, input_dag, wires=None, propagate_condition=True)[source]

Replace one node with dag.

প্যারামিটার
  • node (DAGOpNode) -- node to substitute

  • input_dag (DAGCircuit) -- circuit that will substitute the node

  • wires (list[Bit] | Dict[Bit, Bit]) -- gives an order for (qu)bits in the input circuit. If a list, then the bits refer to those in the input_dag, and the order gets matched to the node wires by qargs first, then cargs, then conditions. If a dictionary, then a mapping of bits in the input_dag to those that the node acts on.

  • propagate_condition (bool) -- If True (default), then any condition attribute on the operation within node is propagated to each node in the input_dag. If False, then the input_dag is assumed to faithfully implement suitable conditional logic already.

রিটার্নস

maps node IDs from input_dag to their new node incarnations in self.

রিটার্ন টাইপ

dict

রেইজেস

DAGCircuitError -- if met with unexpected predecessor/successors