[][src]Struct q1tsim::gates::Kron

pub struct Kron<G0, G1> { /* fields omitted */ }

Gate describing the Kronecker product of two other gates operating on different qubits.

Methods

impl<G0, G1> Kron<G0, G1> where
    G0: Gate,
    G1: Gate
[src]

pub fn new(g0: G0, g1: G1) -> Self[src]

Create a new Kronecker product gate g1g2.

Trait Implementations

impl<G0, G1> Gate for Kron<G0, G1> where
    G0: Gate,
    G1: Gate
[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 apply_mat_slice(&self, state: CMatSliceMut)[src]

Apply a gate. Read more

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

Check the number of bits Read more

impl<G0, G1> CQasm for Kron<G0, G1> where
    G0: CQasm,
    G1: CQasm
[src]

impl<G0, G1> Latex for Kron<G0, G1> where
    G0: Latex,
    G1: Latex
[src]

impl<G0, G1> OpenQasm for Kron<G0, G1> where
    G0: OpenQasm,
    G1: OpenQasm
[src]

Auto Trait Implementations

impl<G0, G1> Send for Kron<G0, G1> where
    G0: Send,
    G1: Send

impl<G0, G1> Sync for Kron<G0, G1> where
    G0: Sync,
    G1: Sync

Blanket Implementations

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

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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