pub enum GatePropriety {
Identity,
Diagonal,
Permutation,
Unitary,
}Expand description
Classification of a gate’s action on the computational basis.
Variants are ordered from least to most general so that the derived Ord
implementation makes Unitary > Permutation > Diagonal > Identity hold.
Variants§
Identity
The gate is the identity: it leaves all basis states unchanged.
Diagonal
The gate is diagonal in the computational basis (it only adds phases).
Permutation
The gate permutes computational-basis states without introducing superposition.
Unitary
The gate is a general unitary that creates superposition.
Implementations§
Source§impl GatePropriety
impl GatePropriety
pub fn restrict(&mut self, propriety: GatePropriety)
pub fn broaden(&mut self, propriety: GatePropriety)
Trait Implementations§
Source§impl Clone for GatePropriety
impl Clone for GatePropriety
Source§fn clone(&self) -> GatePropriety
fn clone(&self) -> GatePropriety
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GatePropriety
Source§impl Debug for GatePropriety
impl Debug for GatePropriety
Source§impl Default for GatePropriety
impl Default for GatePropriety
Source§fn default() -> GatePropriety
fn default() -> GatePropriety
Returns the “default value” for a type. Read more
impl Eq for GatePropriety
Source§impl Ord for GatePropriety
impl Ord for GatePropriety
Source§fn cmp(&self, other: &GatePropriety) -> Ordering
fn cmp(&self, other: &GatePropriety) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GatePropriety
impl PartialEq for GatePropriety
Source§impl PartialOrd for GatePropriety
impl PartialOrd for GatePropriety
Source§impl Serialize for GatePropriety
impl Serialize for GatePropriety
impl StructuralPartialEq for GatePropriety
Auto Trait Implementations§
impl Freeze for GatePropriety
impl RefUnwindSafe for GatePropriety
impl Send for GatePropriety
impl Sync for GatePropriety
impl Unpin for GatePropriety
impl UnsafeUnpin for GatePropriety
impl UnwindSafe for GatePropriety
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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