diff --git a/tket2-py/src/passes.rs b/tket2-py/src/passes.rs index eb7edb5f..537c6b10 100644 --- a/tket2-py/src/passes.rs +++ b/tket2-py/src/passes.rs @@ -56,15 +56,13 @@ fn greedy_depth_reduce<'py>(circ: &Bound<'py, PyAny>) -> PyResult<(Bound<'py, Py /// /// Equivalent to running the following code: /// ```python -/// from pytket.passes.auto_rebase import auto_rebase_pass +/// from pytket.passes import AutoRebase /// from pytket import OpType -/// auto_rebase_pass({OpType.CX, OpType.Rz, OpType.H}).apply(circ)" +/// AutoRebase({OpType.CX, OpType.Rz, OpType.H}).apply(circ)" // ``` fn rebase_nam(circ: &Bound) -> PyResult<()> { let py = circ.py(); - let auto_rebase = py - .import("pytket.passes.auto_rebase")? - .getattr("auto_rebase_pass")?; + let auto_rebase = py.import("pytket.passes")?.getattr("AutoRebase")?; let optype = py.import("pytket")?.getattr("OpType")?; let locals = [("OpType", &optype)].into_py_dict(py)?; let op_set = py.eval(c"{OpType.CX, OpType.Rz, OpType.H}", None, Some(&locals))?;