[][src]Struct q1tsim::gates::Loop

pub struct Loop { /* fields omitted */ }

Static loop gate

The Loop gate represents a static loop, i.e. a set of instructions that is executed a fixed number of times.

Methods

impl Loop[src]

pub fn new(label: &str, nr_iterations: usize, body: Composite) -> Self[src]

Create a new static loop.

Initialize a new static loop executing the instructions in body, nr_iterations times.

Trait Implementations

impl Gate for Loop[src]

fn apply(&self, state: &mut CVector)[src]

Apply a gate. Read more

fn apply_mat(&self, state: &mut CMatrix)[src]

Apply a gate. Read more

fn check_nr_bits(&self, bits: &[usize]) -> Result<()>[src]

Check the number of bits Read more

impl CQasm for Loop[src]

impl Latex for Loop[src]

impl OpenQasm for Loop[src]

Auto Trait Implementations

impl !Send for Loop

impl !Sync for Loop

Blanket Implementations

impl<G> CircuitGate for G where
    G: Gate + CQasm + Latex + OpenQasm
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.