diff --git a/crates/accelerate/src/circuit_library/mod.rs b/crates/accelerate/src/circuit_library/mod.rs index d0444c484d..9df16a04fc 100644 --- a/crates/accelerate/src/circuit_library/mod.rs +++ b/crates/accelerate/src/circuit_library/mod.rs @@ -14,7 +14,6 @@ use pyo3::prelude::*; mod entanglement; -#[pymodule] pub fn circuit_library(m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(entanglement::get_entangler_map))?; Ok(()) diff --git a/crates/accelerate/src/commutation_analysis.rs b/crates/accelerate/src/commutation_analysis.rs index 2da8cfce93..0a9a2304df 100644 --- a/crates/accelerate/src/commutation_analysis.rs +++ b/crates/accelerate/src/commutation_analysis.rs @@ -12,7 +12,7 @@ use pyo3::exceptions::PyValueError; use pyo3::prelude::PyModule; -use pyo3::{pyfunction, pymodule, wrap_pyfunction, Bound, PyResult, Python}; +use pyo3::{pyfunction, wrap_pyfunction, Bound, PyResult, Python}; use qiskit_circuit::Qubit; use crate::commutation_checker::CommutationChecker; @@ -185,7 +185,6 @@ pub(crate) fn analyze_commutations( Ok(out_dict.unbind()) } -#[pymodule] pub fn commutation_analysis(m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(analyze_commutations))?; Ok(()) diff --git a/crates/accelerate/src/commutation_cancellation.rs b/crates/accelerate/src/commutation_cancellation.rs index dc2d4436d8..7ae7d3d7ce 100644 --- a/crates/accelerate/src/commutation_cancellation.rs +++ b/crates/accelerate/src/commutation_cancellation.rs @@ -15,7 +15,7 @@ use std::f64::consts::PI; use hashbrown::{HashMap, HashSet}; use pyo3::exceptions::PyRuntimeError; use pyo3::prelude::*; -use pyo3::{pyfunction, pymodule, wrap_pyfunction, Bound, PyResult, Python}; +use pyo3::{pyfunction, wrap_pyfunction, Bound, PyResult, Python}; use rustworkx_core::petgraph::stable_graph::NodeIndex; use smallvec::{smallvec, SmallVec}; @@ -273,7 +273,6 @@ pub(crate) fn cancel_commutations( Ok(()) } -#[pymodule] pub fn commutation_cancellation(m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(cancel_commutations))?; Ok(()) diff --git a/crates/accelerate/src/commutation_checker.rs b/crates/accelerate/src/commutation_checker.rs index b00d7c624c..c7fbd03a2a 100644 --- a/crates/accelerate/src/commutation_checker.rs +++ b/crates/accelerate/src/commutation_checker.rs @@ -767,7 +767,6 @@ fn hashable_params(params: &[Param]) -> PyResult> { .collect() } -#[pymodule] pub fn commutation_checker(m: &Bound) -> PyResult<()> { m.add_class::()?; m.add_class::()?; diff --git a/crates/accelerate/src/gate_direction.rs b/crates/accelerate/src/gate_direction.rs index aee5ca0973..e7fef84562 100644 --- a/crates/accelerate/src/gate_direction.rs +++ b/crates/accelerate/src/gate_direction.rs @@ -142,7 +142,6 @@ where Ok(true) } -#[pymodule] pub fn gate_direction(m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(py_check_with_coupling_map))?; m.add_wrapped(wrap_pyfunction!(py_check_with_target))?; diff --git a/crates/accelerate/src/remove_diagonal_gates_before_measure.rs b/crates/accelerate/src/remove_diagonal_gates_before_measure.rs index cf2c738f13..e510d73666 100644 --- a/crates/accelerate/src/remove_diagonal_gates_before_measure.rs +++ b/crates/accelerate/src/remove_diagonal_gates_before_measure.rs @@ -102,7 +102,6 @@ fn run_remove_diagonal_before_measure(dag: &mut DAGCircuit) -> PyResult<()> { Ok(()) } -#[pymodule] pub fn remove_diagonal_gates_before_measure(m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(run_remove_diagonal_before_measure))?; Ok(()) diff --git a/setup.py b/setup.py index 6116805054..ad6d1f8ead 100644 --- a/setup.py +++ b/setup.py @@ -51,5 +51,5 @@ setup( features=features, ) ], - options={"bdist_wheel": {"py_limited_api": "cp38"}}, + options={"bdist_wheel": {"py_limited_api": "cp39"}}, )