Skip to content

Commit

Permalink
add #[pymethods]
Browse files Browse the repository at this point in the history
  • Loading branch information
kalzoo committed Feb 29, 2024
1 parent 4821de4 commit f752f64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quil-py/src/program/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ use crate::{

use self::{
analysis::{PyBasicBlock, PyControlFlowGraph},
scheduling::{PyScheduleSeconds, PyScheduleSecondsItem, PyTimeSpanSeconds},
scheduling::{
PyScheduleSeconds, PyScheduleSecondsItem, PyScheduledBasicBlock, PyTimeSpanSeconds,
},
};
pub use self::{calibration::PyCalibrationSet, frame::PyFrameSet, memory::PyMemoryRegion};

Expand Down Expand Up @@ -373,5 +375,5 @@ impl PyProgram {
}

create_init_submodule! {
classes: [ PyFrameSet, PyProgram, PyCalibrationSet, PyMemoryRegion, PyBasicBlock, PyControlFlowGraph, PyScheduleSeconds, PyScheduleSecondsItem, PyTimeSpanSeconds ],
classes: [ PyFrameSet, PyProgram, PyCalibrationSet, PyMemoryRegion, PyBasicBlock, PyControlFlowGraph, PyScheduledBasicBlock, PyScheduleSeconds, PyScheduleSecondsItem, PyTimeSpanSeconds ],
}
1 change: 1 addition & 0 deletions quil-py/src/program/scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ py_wrap_error!(
PyValueError
);

#[pymethods]
impl PyScheduledBasicBlock {
pub fn as_schedule_seconds(&self, program: &PyProgram) -> PyResult<PyScheduleSeconds> {
ScheduledBasicBlock::from(&self.0)
Expand Down

0 comments on commit f752f64

Please sign in to comment.