pub struct QuantumGate {
pub name: String,
pub num_qubits: usize,
pub is_unitary: bool,
pub is_clifford: bool,
}Expand description
A quantum gate represented by its name and matrix dimension.
Fields§
§name: String§num_qubits: usize§is_unitary: bool§is_clifford: boolImplementations§
Source§impl QuantumGate
impl QuantumGate
pub fn hadamard() -> Self
pub fn pauli_x() -> Self
pub fn pauli_y() -> Self
pub fn pauli_z() -> Self
pub fn phase(theta_desc: &str) -> Self
pub fn t_gate() -> Self
pub fn cnot() -> Self
pub fn toffoli() -> Self
pub fn swap() -> Self
pub fn matrix_size(&self) -> usize
Trait Implementations§
Source§impl Clone for QuantumGate
impl Clone for QuantumGate
Source§fn clone(&self) -> QuantumGate
fn clone(&self) -> QuantumGate
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for QuantumGate
impl RefUnwindSafe for QuantumGate
impl Send for QuantumGate
impl Sync for QuantumGate
impl Unpin for QuantumGate
impl UnsafeUnpin 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