diff --git a/crates/circuit/src/dag_circuit.rs b/crates/circuit/src/dag_circuit.rs index 09f0a2e716f6..31ccd0eb31fa 100644 --- a/crates/circuit/src/dag_circuit.rs +++ b/crates/circuit/src/dag_circuit.rs @@ -4350,7 +4350,7 @@ def _format(operand): let mut new_layer = self.copy_empty_like(py, vars_mode)?; - new_layer.add_from_iter(py, op_nodes.iter().map(|(inst, _)| (*inst).clone()))?; + new_layer.extend(py, op_nodes.iter().map(|(inst, _)| (*inst).clone()))?; let new_layer_op_nodes = new_layer.op_nodes(false).filter_map(|node_index| { match new_layer.dag.node_weight(node_index) { @@ -6347,7 +6347,7 @@ impl DAGCircuit { } /// Adds valid instances of [PackedInstruction] to the back of the Circuit. - pub fn add_from_iter(&mut self, py: Python, iter: I) -> PyResult> + pub fn extend(&mut self, py: Python, iter: I) -> PyResult> where I: IntoIterator, {