pub struct QuantumDQN { /* private fields */ }
Expand description
Quantum Deep Q-Network (QDQN) agent
Implementations§
Source§impl QuantumDQN
impl QuantumDQN
Sourcepub fn new(config: QuantumRLConfig) -> QuantRS2Result<Self>
pub fn new(config: QuantumRLConfig) -> QuantRS2Result<Self>
Create a new Quantum DQN agent
Sourcepub fn select_action(&mut self, state: &Array1<f64>) -> QuantRS2Result<usize>
pub fn select_action(&mut self, state: &Array1<f64>) -> QuantRS2Result<usize>
Select action using epsilon-greedy policy with quantum enhancement
Sourcepub fn store_experience(&mut self, experience: Experience)
pub fn store_experience(&mut self, experience: Experience)
Store experience in replay buffer
Sourcepub fn train(&mut self) -> QuantRS2Result<TrainingMetrics>
pub fn train(&mut self) -> QuantRS2Result<TrainingMetrics>
Train the agent using quantum advantage techniques
Sourcepub fn end_episode(&mut self, _total_reward: f64)
pub fn end_episode(&mut self, _total_reward: f64)
End episode and update statistics
Sourcepub fn get_statistics(&self) -> QLearningStats
pub fn get_statistics(&self) -> QLearningStats
Get training statistics
Auto Trait Implementations§
impl Freeze for QuantumDQN
impl RefUnwindSafe for QuantumDQN
impl Send for QuantumDQN
impl Sync for QuantumDQN
impl Unpin for QuantumDQN
impl UnwindSafe for QuantumDQN
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 more