[−][src]Struct q1tsim::gates::Loop
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 cost(&self) -> f64
[src]
fn description(&self) -> &str
[src]
fn nr_affected_bits(&self) -> usize
[src]
fn matrix(&self) -> CMatrix
[src]
fn apply_slice(&self, state: CVecSliceMut)
[src]
fn apply_mat_slice(&self, state: CMatSliceMut)
[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]
fn c_qasm(&self, bit_names: &[String], bits: &[usize]) -> Result<String>
[src]
fn conditional_c_qasm(
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
[src]
&self,
condition: &str,
bit_names: &[String],
bits: &[usize]
) -> Result<String>
impl Latex for Loop
[src]
impl OpenQasm for Loop
[src]
Auto Trait Implementations
Blanket Implementations
impl<G> CircuitGate for G where
G: Gate + CQasm + Latex + OpenQasm,
[src]
G: Gate + CQasm + Latex + OpenQasm,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,