Skip to content

Commit

Permalink
export PullForwardError to python
Browse files Browse the repository at this point in the history
  • Loading branch information
ss2165 committed Sep 25, 2023
1 parent 6a7eaae commit 1187707
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyrs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ fn add_pass_module(py: Python, parent: &PyModule) -> PyResult<()> {
let m = PyModule::new(py, "passes")?;
m.add_function(wrap_pyfunction!(greedy_depth_reduce, m)?)?;
m.add_class::<tket2::T2Op>()?;
m.add(
"PullForwardError",
py.get_type::<tket2::passes::PyPullForwardError>(),
)?;
parent.add_submodule(m)?;
Ok(())
}
2 changes: 2 additions & 0 deletions src/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// pub mod squash;
mod commutation;
pub use commutation::apply_greedy_commutation;
#[cfg(feature = "pyo3")]
pub use commutation::PyPullForwardError;

// use rayon::prelude::*;

Expand Down

0 comments on commit 1187707

Please sign in to comment.