pub enum ComputePrecision {
Half,
Single,
Double,
Mixed,
}Expand description
Computation precision
Variants§
Half
Half precision (float16) - reduced memory, faster on tensor cores Suitable for approximate calculations where high precision isn’t critical
Single
Single precision (float32) - balanced precision and performance Recommended for most quantum simulations
Double
Double precision (float64) - highest precision Required for high-fidelity simulations and error-sensitive algorithms
Mixed
Mixed precision (automatic FP16/FP32 switching) Uses FP16 for matrix operations (tensor cores) and FP32 for accumulation Provides near-FP32 accuracy with FP16 speed
Implementations§
Source§impl ComputePrecision
impl ComputePrecision
Sourcepub fn bytes_per_amplitude(self) -> usize
pub fn bytes_per_amplitude(self) -> usize
Get bytes per complex amplitude for this precision
Sourcepub fn speed_factor(self) -> f64
pub fn speed_factor(self) -> f64
Get relative speed multiplier (approximate) Higher values = faster computation
Sourcepub fn accuracy_factor(self) -> f64
pub fn accuracy_factor(self) -> f64
Get relative accuracy (approximate) Higher values = more accurate
Sourcepub fn uses_tensor_cores(self) -> bool
pub fn uses_tensor_cores(self) -> bool
Check if precision uses tensor cores (if available)
Sourcepub fn description(self) -> &'static str
pub fn description(self) -> &'static str
Get human-readable description
Trait Implementations§
Source§impl Clone for ComputePrecision
impl Clone for ComputePrecision
Source§fn clone(&self) -> ComputePrecision
fn clone(&self) -> ComputePrecision
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputePrecision
impl Debug for ComputePrecision
Source§impl PartialEq for ComputePrecision
impl PartialEq for ComputePrecision
impl Copy for ComputePrecision
impl Eq for ComputePrecision
impl StructuralPartialEq for ComputePrecision
Auto Trait Implementations§
impl Freeze for ComputePrecision
impl RefUnwindSafe for ComputePrecision
impl Send for ComputePrecision
impl Sync for ComputePrecision
impl Unpin for ComputePrecision
impl UnwindSafe for ComputePrecision
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.