pub struct TrappedIonSystem {
pub num_ions: usize,
pub ions: Vec<TrappedIon>,
pub motional_modes: Vec<MotionalMode>,
pub global_state: Option<Array1<Complex64>>,
pub temperature: f64,
pub magnetic_field: f64,
}Expand description
Trapped ion quantum system
Fields§
§num_ions: usizeNumber of ions
ions: Vec<TrappedIon>Individual ions
motional_modes: Vec<MotionalMode>Motional modes
global_state: Option<Array1<Complex64>>Global system state (optional, for small systems)
temperature: f64Temperature in Kelvin
magnetic_field: f64Magnetic field in Tesla
Implementations§
Source§impl TrappedIonSystem
impl TrappedIonSystem
Sourcepub fn new(
ion_species: Vec<IonSpecies>,
positions: Vec<[f64; 3]>,
) -> QuantRS2Result<Self>
pub fn new( ion_species: Vec<IonSpecies>, positions: Vec<[f64; 3]>, ) -> QuantRS2Result<Self>
Create new trapped ion system
Sourcepub fn apply_laser_pulse(&mut self, pulse: &LaserPulse) -> QuantRS2Result<()>
pub fn apply_laser_pulse(&mut self, pulse: &LaserPulse) -> QuantRS2Result<()>
Apply laser pulse to the system
Sourcepub fn molmer_sorensen_gate(
&mut self,
ion1: usize,
ion2: usize,
phase: f64,
) -> QuantRS2Result<()>
pub fn molmer_sorensen_gate( &mut self, ion1: usize, ion2: usize, phase: f64, ) -> QuantRS2Result<()>
Perform global Mølmer-Sørensen gate between two ions
Sourcepub fn state_dependent_force(
&mut self,
target_ions: &[usize],
mode_id: usize,
force_strength: f64,
) -> QuantRS2Result<()>
pub fn state_dependent_force( &mut self, target_ions: &[usize], mode_id: usize, force_strength: f64, ) -> QuantRS2Result<()>
Perform state-dependent force for quantum gates
Sourcepub fn measure_ion(&mut self, ion_id: usize) -> QuantRS2Result<bool>
pub fn measure_ion(&mut self, ion_id: usize) -> QuantRS2Result<bool>
Measure ion in computational basis
Sourcepub fn cool_motional_mode(&mut self, mode_id: usize) -> QuantRS2Result<()>
pub fn cool_motional_mode(&mut self, mode_id: usize) -> QuantRS2Result<()>
Cool motional mode to ground state (simplified)
Sourcepub fn get_motional_temperature(&self) -> f64
pub fn get_motional_temperature(&self) -> f64
Get system temperature from motional modes
Trait Implementations§
Source§impl Clone for TrappedIonSystem
impl Clone for TrappedIonSystem
Source§fn clone(&self) -> TrappedIonSystem
fn clone(&self) -> TrappedIonSystem
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 TrappedIonSystem
impl RefUnwindSafe for TrappedIonSystem
impl Send for TrappedIonSystem
impl Sync for TrappedIonSystem
impl Unpin for TrappedIonSystem
impl UnwindSafe for TrappedIonSystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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.