Skip to content

Commit

Permalink
Reword "cast" docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Nov 15, 2023
1 parent 214e775 commit 0a2123c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tket2-py/src/circuit/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ pub struct Tk2Circuit {

#[pymethods]
impl Tk2Circuit {
/// Cast a tket1 circuit to a [`Tk2Circuit`].
/// Convert a tket1 circuit to a [`Tk2Circuit`].
#[new]
pub fn from_tket1(circ: &PyAny) -> PyResult<Self> {
Ok(Self {
hugr: with_hugr(circ, |hugr, _| hugr)?,
})
}

/// Cast the [`Tk2Circuit`] to a tket1 circuit.
/// Convert the [`Tk2Circuit`] to a tket1 circuit.
pub fn to_tket1<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> {
SerialCircuit::encode(&self.hugr)?.to_tket1(py)
}
Expand Down

0 comments on commit 0a2123c

Please sign in to comment.