pub struct Toffoli {
pub control1: QubitId,
pub control2: QubitId,
pub target: QubitId,
}Expand description
Toffoli (CCNOT) gate
Fields§
§control1: QubitIdFirst control qubit
control2: QubitIdSecond control qubit
target: QubitIdTarget qubit
Trait Implementations§
Source§impl GateDecomposable for Toffoli
Implementation of GateDecomposable for Toffoli gate
impl GateDecomposable for Toffoli
Implementation of GateDecomposable for Toffoli gate
Source§impl GateOp for Toffoli
impl GateOp for Toffoli
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 Toffoli
Auto Trait Implementations§
impl Freeze for Toffoli
impl RefUnwindSafe for Toffoli
impl Send for Toffoli
impl Sync for Toffoli
impl Unpin for Toffoli
impl UnwindSafe for Toffoli
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