pub struct Kron<G0, G1> { /* private fields */ }Expand description
Gate describing the Kronecker product of two other gates operating on different qubits.
Implementations§
Trait Implementations§
Source§impl<G0, G1> Gate for Kron<G0, G1>
impl<G0, G1> Gate for Kron<G0, G1>
Source§fn description(&self) -> &str
fn description(&self) -> &str
Return a short description of the gate. This may be the name of the
gate (e.g.
"H", "CX"), or the way the gate was constructed (like
"I⊗Z")Source§fn nr_affected_bits(&self) -> usize
fn nr_affected_bits(&self) -> usize
The number of qubits affected by this gate.
Source§fn matrix(&self) -> CMatrix
fn matrix(&self) -> CMatrix
Return a matrix describing the unitary transformation that the gate
provides
Source§fn apply_slice(&self, state: CVecSliceMut<'_>)
fn apply_slice(&self, state: CVecSliceMut<'_>)
Apply a gate. Read more
Source§fn is_stabilizer(&self) -> bool
fn is_stabilizer(&self) -> bool
Whether this gate is a stabilizer gate Read more
Source§fn apply_mat_slice(&self, state: CMatSliceMut<'_>)
fn apply_mat_slice(&self, state: CMatSliceMut<'_>)
Apply a gate. Read more
Auto Trait Implementations§
impl<G0, G1> Freeze for Kron<G0, G1>
impl<G0, G1> RefUnwindSafe for Kron<G0, G1>where
G0: RefUnwindSafe,
G1: RefUnwindSafe,
impl<G0, G1> Send for Kron<G0, G1>
impl<G0, G1> Sync for Kron<G0, G1>
impl<G0, G1> Unpin for Kron<G0, G1>
impl<G0, G1> UnwindSafe for Kron<G0, G1>where
G0: UnwindSafe,
G1: UnwindSafe,
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
Source§impl<G> CircuitGate for G
impl<G> CircuitGate for G
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more