Korean
언어
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)[소스]

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