pub struct TrappedIonGates;Expand description
Trapped ion gate operations
Implementations§
Source§impl TrappedIonGates
impl TrappedIonGates
Sourcepub fn rotation_gate(
system: &mut TrappedIonSystem,
ion_id: usize,
axis: &str,
angle: f64,
) -> QuantRS2Result<()>
pub fn rotation_gate( system: &mut TrappedIonSystem, ion_id: usize, axis: &str, angle: f64, ) -> QuantRS2Result<()>
Single-qubit rotation gate
Sourcepub fn hadamard(
system: &mut TrappedIonSystem,
ion_id: usize,
) -> QuantRS2Result<()>
pub fn hadamard( system: &mut TrappedIonSystem, ion_id: usize, ) -> QuantRS2Result<()>
Hadamard gate
Sourcepub fn pauli_x(
system: &mut TrappedIonSystem,
ion_id: usize,
) -> QuantRS2Result<()>
pub fn pauli_x( system: &mut TrappedIonSystem, ion_id: usize, ) -> QuantRS2Result<()>
Pauli-X gate
Sourcepub fn pauli_y(
system: &mut TrappedIonSystem,
ion_id: usize,
) -> QuantRS2Result<()>
pub fn pauli_y( system: &mut TrappedIonSystem, ion_id: usize, ) -> QuantRS2Result<()>
Pauli-Y gate
Sourcepub fn pauli_z(
system: &mut TrappedIonSystem,
ion_id: usize,
) -> QuantRS2Result<()>
pub fn pauli_z( system: &mut TrappedIonSystem, ion_id: usize, ) -> QuantRS2Result<()>
Pauli-Z gate
Sourcepub fn cnot(
system: &mut TrappedIonSystem,
control: usize,
target: usize,
) -> QuantRS2Result<()>
pub fn cnot( system: &mut TrappedIonSystem, control: usize, target: usize, ) -> QuantRS2Result<()>
CNOT gate using Mølmer-Sørensen interaction
Sourcepub fn cz(
system: &mut TrappedIonSystem,
control: usize,
target: usize,
) -> QuantRS2Result<()>
pub fn cz( system: &mut TrappedIonSystem, control: usize, target: usize, ) -> QuantRS2Result<()>
Controlled-Z gate
Sourcepub fn toffoli(
system: &mut TrappedIonSystem,
control1: usize,
control2: usize,
target: usize,
) -> QuantRS2Result<()>
pub fn toffoli( system: &mut TrappedIonSystem, control1: usize, control2: usize, target: usize, ) -> QuantRS2Result<()>
Toffoli gate (CCX)
Auto Trait Implementations§
impl Freeze for TrappedIonGates
impl RefUnwindSafe for TrappedIonGates
impl Send for TrappedIonGates
impl Sync for TrappedIonGates
impl Unpin for TrappedIonGates
impl UnsafeUnpin for TrappedIonGates
impl UnwindSafe for TrappedIonGates
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.