Enum ket::ir::QuantumGate
source · pub enum QuantumGate {
PauliX,
PauliY,
PauliZ,
RotationX(Angle),
RotationY(Angle),
RotationZ(Angle),
Phase(Angle),
Hadamard,
}
Expand description
Enum representing various quantum gates.
Variants§
PauliX
Pauli X gate.
PauliY
Pauli Y gate.
PauliZ
Pauli Z gate.
RotationX(Angle)
X-axis rotation gate.
RotationY(Angle)
Y-axis rotation gate.
RotationZ(Angle)
Z-axis rotation gate.
Phase(Angle)
Phase shift gate.
Hadamard
Hadamard gate.
Implementations§
source§impl QuantumGate
impl QuantumGate
sourcepub fn inverse(&self) -> QuantumGate
pub fn inverse(&self) -> QuantumGate
Returns the inverse of the quantum gate.
Trait Implementations§
source§impl Clone for QuantumGate
impl Clone for QuantumGate
source§fn clone(&self) -> QuantumGate
fn clone(&self) -> QuantumGate
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for QuantumGate
impl Debug for QuantumGate
source§impl<'de> Deserialize<'de> for QuantumGate
impl<'de> Deserialize<'de> for QuantumGate
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for QuantumGate
impl Send for QuantumGate
impl Sync for QuantumGate
impl Unpin for QuantumGate
impl UnwindSafe for QuantumGate
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