pub struct Program {
pub name: String,
pub profile: Profile,
pub num_qubits: u32,
pub num_results: u32,
pub entry: BlockId,
pub blocks: Vec<Block>,
pub next_value: u32,
pub num_slots: u32,
}Fields§
§name: String§profile: Profile§num_qubits: u32§num_results: u32§entry: BlockId§blocks: Vec<Block>§next_value: u32§num_slots: u32Implementations§
Source§impl Program
impl Program
pub fn new(name: impl Into<String>, profile: Profile) -> Self
pub fn block(&self, id: BlockId) -> &Block
pub fn ops(&self) -> impl Iterator<Item = &Op>
pub fn gates(&self) -> impl Iterator<Item = &Gate>
pub fn gate_count(&self) -> usize
pub fn op_count(&self) -> usize
pub fn measure_count(&self) -> usize
pub fn is_straight_line(&self) -> bool
pub fn depth(&self) -> usize
pub fn predecessors(&self, id: BlockId) -> Vec<BlockId>
pub fn reachable(&self) -> Vec<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more