pub enum Gate {
Show 20 variants
H(QubitIndex),
X(QubitIndex),
Y(QubitIndex),
Z(QubitIndex),
S(QubitIndex),
Sdg(QubitIndex),
T(QubitIndex),
Tdg(QubitIndex),
Rx(QubitIndex, f64),
Ry(QubitIndex, f64),
Rz(QubitIndex, f64),
Phase(QubitIndex, f64),
CNOT(QubitIndex, QubitIndex),
CZ(QubitIndex, QubitIndex),
SWAP(QubitIndex, QubitIndex),
Rzz(QubitIndex, QubitIndex, f64),
Measure(QubitIndex),
Reset(QubitIndex),
Barrier,
Unitary1Q(QubitIndex, [[Complex; 2]; 2]),
}Expand description
Quantum gate operations
Variants§
H(QubitIndex)
X(QubitIndex)
Y(QubitIndex)
Z(QubitIndex)
S(QubitIndex)
Sdg(QubitIndex)
T(QubitIndex)
Tdg(QubitIndex)
Rx(QubitIndex, f64)
Ry(QubitIndex, f64)
Rz(QubitIndex, f64)
Phase(QubitIndex, f64)
CNOT(QubitIndex, QubitIndex)
CZ(QubitIndex, QubitIndex)
SWAP(QubitIndex, QubitIndex)
Rzz(QubitIndex, QubitIndex, f64)
Measure(QubitIndex)
Reset(QubitIndex)
Barrier
Unitary1Q(QubitIndex, [[Complex; 2]; 2])
Implementations§
Source§impl Gate
impl Gate
Sourcepub fn qubits(&self) -> Vec<QubitIndex> ⓘ
pub fn qubits(&self) -> Vec<QubitIndex> ⓘ
Return the qubit indices this gate acts on.
Sourcepub fn is_non_unitary(&self) -> bool
pub fn is_non_unitary(&self) -> bool
Returns true for non-unitary operations (measurement, reset, barrier).
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 UnsafeUnpin 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