pub struct Fredkin {
pub control: QubitId,
pub target1: QubitId,
pub target2: QubitId,
}Expand description
Fredkin (CSWAP) gate
Fields§
§control: QubitIdControl qubit
target1: QubitIdFirst target qubit
target2: QubitIdSecond target qubit
Trait Implementations§
Source§impl GateDecomposable for Fredkin
Implementation of GateDecomposable for Fredkin gate
impl GateDecomposable for Fredkin
Implementation of GateDecomposable for Fredkin gate
Source§impl GateOp for Fredkin
impl GateOp for Fredkin
Source§fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
fn matrix(&self) -> QuantRS2Result<Vec<Complex64>>
Returns the matrix representation of this gate
Source§fn num_qubits(&self) -> usize
fn num_qubits(&self) -> usize
Returns the number of qubits this gate acts on
Source§fn is_parameterized(&self) -> bool
fn is_parameterized(&self) -> bool
Returns true if this gate is parameterized
impl Copy for Fredkin
Auto Trait Implementations§
impl Freeze for Fredkin
impl RefUnwindSafe for Fredkin
impl Send for Fredkin
impl Sync for Fredkin
impl Unpin for Fredkin
impl UnwindSafe for Fredkin
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