diff --git a/crates/accelerate/src/euler_one_qubit_decomposer.rs b/crates/accelerate/src/euler_one_qubit_decomposer.rs index 8c3a87ce51ec..24c4f6e87c2a 100644 --- a/crates/accelerate/src/euler_one_qubit_decomposer.rs +++ b/crates/accelerate/src/euler_one_qubit_decomposer.rs @@ -1045,10 +1045,11 @@ fn matmul_1q(operator: &mut [[Complex64; 2]; 2], other: Array2) { } #[pyfunction] -pub fn collect_1q_runs_filter(py: Python, node: PyObject) -> bool { - let op_node = node.extract::>(py); +pub fn collect_1q_runs_filter(node: &Bound) -> bool { + let op_node = node.downcast::(); match op_node { - Ok(node) => { + Ok(bound_node) => { + let node = bound_node.borrow(); node.instruction.operation.num_qubits() == 1 && node.instruction.operation.num_clbits() == 0 && node