pub struct PrecisionAnalysis {
pub recommended_precisions: HashMap<String, QuantumPrecision>,
pub error_estimates: HashMap<QuantumPrecision, f64>,
pub performance_metrics: HashMap<QuantumPrecision, PerformanceMetrics>,
pub selection_rationale: String,
pub quality_score: f64,
}
Expand description
Precision analysis result
Fields§
§recommended_precisions: HashMap<String, QuantumPrecision>
Recommended precision for each operation type
error_estimates: HashMap<QuantumPrecision, f64>
Estimated numerical error for each precision
performance_metrics: HashMap<QuantumPrecision, PerformanceMetrics>
Performance metrics for each precision
selection_rationale: String
Final precision selection rationale
quality_score: f64
Quality score (0-1, higher is better)
Implementations§
Source§impl PrecisionAnalysis
impl PrecisionAnalysis
Sourcepub fn add_recommendation(
&mut self,
operation: String,
precision: QuantumPrecision,
)
pub fn add_recommendation( &mut self, operation: String, precision: QuantumPrecision, )
Add a precision recommendation for an operation type
Sourcepub fn add_error_estimate(&mut self, precision: QuantumPrecision, error: f64)
pub fn add_error_estimate(&mut self, precision: QuantumPrecision, error: f64)
Add an error estimate for a precision level
Sourcepub fn add_performance_metrics(
&mut self,
precision: QuantumPrecision,
metrics: PerformanceMetrics,
)
pub fn add_performance_metrics( &mut self, precision: QuantumPrecision, metrics: PerformanceMetrics, )
Add performance metrics for a precision level
Sourcepub fn set_rationale(&mut self, rationale: String)
pub fn set_rationale(&mut self, rationale: String)
Set the selection rationale
Sourcepub fn calculate_quality_score(&mut self)
pub fn calculate_quality_score(&mut self)
Calculate and set the quality score
Sourcepub fn get_best_precision(&self, operation: &str) -> Option<QuantumPrecision>
pub fn get_best_precision(&self, operation: &str) -> Option<QuantumPrecision>
Get the best precision for a given operation type
Sourcepub fn get_overall_recommendation(&self) -> QuantumPrecision
pub fn get_overall_recommendation(&self) -> QuantumPrecision
Get overall recommended precision
Sourcepub fn is_high_quality(&self) -> bool
pub fn is_high_quality(&self) -> bool
Check if analysis indicates good quality
Sourcepub fn get_summary(&self) -> AnalysisSummary
pub fn get_summary(&self) -> AnalysisSummary
Get summary statistics
Trait Implementations§
Source§impl Clone for PrecisionAnalysis
impl Clone for PrecisionAnalysis
Source§fn clone(&self) -> PrecisionAnalysis
fn clone(&self) -> PrecisionAnalysis
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 moreSource§impl Debug for PrecisionAnalysis
impl Debug for PrecisionAnalysis
Source§impl Default for PrecisionAnalysis
impl Default for PrecisionAnalysis
Source§impl<'de> Deserialize<'de> for PrecisionAnalysis
impl<'de> Deserialize<'de> for PrecisionAnalysis
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrecisionAnalysis
impl RefUnwindSafe for PrecisionAnalysis
impl Send for PrecisionAnalysis
impl Sync for PrecisionAnalysis
impl Unpin for PrecisionAnalysis
impl UnwindSafe for PrecisionAnalysis
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.