[−][src]Struct q1tsim::gates::C
Controlled gates.
A controlled gate is a gate which acts upon a control bit: when the control bit is zero, it leaves the target unchanged; when the control bit is one, the gate is applied.
Methods
impl<G> C<G> where
G: Gate,
[src]
G: Gate,
Trait Implementations
impl<G> Gate for C<G> where
G: Gate,
[src]
G: Gate,
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<G> Latex for C<G> where
G: Gate + Latex,
[src]
G: Gate + Latex,
Auto Trait Implementations
Blanket Implementations
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>,