pub enum Gate {
I,
X,
Y,
Z,
H,
S,
T,
RX(f64),
RY(f64),
RZ(f64),
Custom(Matrix2<Complex64>),
}Expand description
Single-qubit quantum gates
Variants§
I
Identity gate
X
Pauli-X gate (NOT)
Y
Pauli-Y gate
Z
Pauli-Z gate
H
Hadamard gate
S
Phase gate (S)
T
T gate
RX(f64)
Rotation around X-axis
RY(f64)
Rotation around Y-axis
RZ(f64)
Rotation around Z-axis
Custom(Matrix2<Complex64>)
Custom 2x2 unitary matrix
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gate
impl RefUnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnwindSafe for Gate
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> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.