pub struct CX { /* private fields */ }Expand description
Controlled X gate.
Implementations§
Trait Implementations§
Source§impl Gate for CX
impl Gate for CX
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 apply_mat_slice(&self, state: CMatSliceMut<'_>)
fn apply_mat_slice(&self, state: CMatSliceMut<'_>)
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
Auto Trait Implementations§
impl Freeze for CX
impl RefUnwindSafe for CX
impl Send for CX
impl Sync for CX
impl Unpin for CX
impl UnwindSafe for CX
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