pub struct CostOptimizationEngine { /* private fields */ }Expand description
Main cost optimization engine
Implementations§
Source§impl CostOptimizationEngine
impl CostOptimizationEngine
Sourcepub fn new(config: CostOptimizationConfig) -> Self
pub fn new(config: CostOptimizationConfig) -> Self
Create a new cost optimization engine
Sourcepub async fn estimate_cost<const N: usize>(
&self,
circuit: &Circuit<N>,
provider: HardwareBackend,
shots: usize,
) -> DeviceResult<CostEstimate>
pub async fn estimate_cost<const N: usize>( &self, circuit: &Circuit<N>, provider: HardwareBackend, shots: usize, ) -> DeviceResult<CostEstimate>
Estimate cost for a circuit execution
Sourcepub async fn compare_providers<const N: usize>(
&self,
circuit: &Circuit<N>,
providers: Vec<HardwareBackend>,
shots: usize,
) -> DeviceResult<ProviderComparisonResult>
pub async fn compare_providers<const N: usize>( &self, circuit: &Circuit<N>, providers: Vec<HardwareBackend>, shots: usize, ) -> DeviceResult<ProviderComparisonResult>
Compare costs across providers
Sourcepub async fn optimize_resource_allocation(
&self,
requirements: &ResourceRequirements,
) -> DeviceResult<OptimizationResult>
pub async fn optimize_resource_allocation( &self, requirements: &ResourceRequirements, ) -> DeviceResult<OptimizationResult>
Optimize resource allocation for cost
Sourcepub async fn get_budget_status(&self) -> DeviceResult<BudgetStatus>
pub async fn get_budget_status(&self) -> DeviceResult<BudgetStatus>
Get current budget status
Sourcepub async fn predict_costs(
&self,
prediction_horizon: Duration,
features: HashMap<String, f64>,
) -> DeviceResult<PredictionResult>
pub async fn predict_costs( &self, prediction_horizon: Duration, features: HashMap<String, f64>, ) -> DeviceResult<PredictionResult>
Predict future costs
Sourcepub async fn get_optimization_recommendations(
&self,
context: OptimizationContext,
) -> DeviceResult<Vec<OptimizationRecommendation>>
pub async fn get_optimization_recommendations( &self, context: OptimizationContext, ) -> DeviceResult<Vec<OptimizationRecommendation>>
Get optimization recommendations
Sourcepub async fn start_cost_monitoring(&self) -> DeviceResult<()>
pub async fn start_cost_monitoring(&self) -> DeviceResult<()>
Monitor costs in real-time
Auto Trait Implementations§
impl Freeze for CostOptimizationEngine
impl RefUnwindSafe for CostOptimizationEngine
impl Send for CostOptimizationEngine
impl Sync for CostOptimizationEngine
impl Unpin for CostOptimizationEngine
impl UnwindSafe for CostOptimizationEngine
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt 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.