pub struct AdvancedMLErrorMitigator { /* private fields */ }
Expand description
Main advanced ML error mitigation system
Implementations§
Source§impl AdvancedMLErrorMitigator
impl AdvancedMLErrorMitigator
Sourcepub fn new(config: AdvancedMLMitigationConfig) -> Result<Self>
pub fn new(config: AdvancedMLMitigationConfig) -> Result<Self>
Create new advanced ML error mitigator
Sourcepub fn mitigate_errors(
&mut self,
measurements: &Array1<f64>,
circuit: &InterfaceCircuit,
) -> Result<AdvancedMLMitigationResult>
pub fn mitigate_errors( &mut self, measurements: &Array1<f64>, circuit: &InterfaceCircuit, ) -> Result<AdvancedMLMitigationResult>
Apply advanced ML error mitigation
Sourcepub fn create_deep_model(&self) -> Result<DeepMitigationNetwork>
pub fn create_deep_model(&self) -> Result<DeepMitigationNetwork>
Create deep learning model
Sourcepub fn create_rl_agent(&self) -> Result<QLearningMitigationAgent>
pub fn create_rl_agent(&self) -> Result<QLearningMitigationAgent>
Create reinforcement learning agent
Sourcepub fn extract_features(
&self,
circuit: &InterfaceCircuit,
measurements: &Array1<f64>,
) -> Result<Array1<f64>>
pub fn extract_features( &self, circuit: &InterfaceCircuit, measurements: &Array1<f64>, ) -> Result<Array1<f64>>
Extract features from circuit and measurements
Sourcepub fn select_mitigation_strategy(
&mut self,
features: &Array1<f64>,
) -> Result<MitigationAction>
pub fn select_mitigation_strategy( &mut self, features: &Array1<f64>, ) -> Result<MitigationAction>
Select optimal mitigation strategy using RL agent
Sourcepub fn apply_traditional_mitigation(
&self,
strategy: MitigationAction,
measurements: &Array1<f64>,
_circuit: &InterfaceCircuit,
) -> Result<f64>
pub fn apply_traditional_mitigation( &self, strategy: MitigationAction, measurements: &Array1<f64>, _circuit: &InterfaceCircuit, ) -> Result<f64>
Apply traditional mitigation methods
Sourcepub fn apply_activation(&self, x: f64, activation: ActivationFunction) -> f64
pub fn apply_activation(&self, x: f64, activation: ActivationFunction) -> f64
Apply activation function
Sourcepub fn forward_pass(
&self,
model: &DeepMitigationNetwork,
input: &Array1<f64>,
) -> Result<Array1<f64>>
pub fn forward_pass( &self, model: &DeepMitigationNetwork, input: &Array1<f64>, ) -> Result<Array1<f64>>
Public wrapper for forward pass (for testing)
Auto Trait Implementations§
impl Freeze for AdvancedMLErrorMitigator
impl !RefUnwindSafe for AdvancedMLErrorMitigator
impl Send for AdvancedMLErrorMitigator
impl Sync for AdvancedMLErrorMitigator
impl Unpin for AdvancedMLErrorMitigator
impl !UnwindSafe for AdvancedMLErrorMitigator
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> 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.