pub struct QuantumCounting {
pub n_items: usize,
pub precision_bits: usize,
pub oracle: Box<dyn Fn(usize) -> bool>,
}Expand description
Quantum Counting algorithm
Counts the number of solutions to a search problem
Fields§
§n_items: usizeNumber of items in the search space
precision_bits: usizeNumber of precision bits for counting
oracle: Box<dyn Fn(usize) -> bool>Oracle function that marks solutions
Implementations§
Auto Trait Implementations§
impl Freeze for QuantumCounting
impl !RefUnwindSafe for QuantumCounting
impl !Send for QuantumCounting
impl !Sync for QuantumCounting
impl Unpin for QuantumCounting
impl !UnwindSafe for QuantumCounting
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