pub struct GroverConfig {
pub num_qubits: u32,
pub target_states: Vec<usize>,
pub num_iterations: Option<u32>,
pub seed: Option<u64>,
}Expand description
Configuration for Grover’s search.
Fields§
§num_qubits: u32Number of qubits (search space has 2^num_qubits states).
target_states: Vec<usize>Indices of the marked (target) basis states. Each index must be in
0 .. 2^num_qubits.
num_iterations: Option<u32>Number of Grover iterations. When None, the theoretically optimal
count is computed from optimal_iterations.
seed: Option<u64>Optional RNG seed forwarded to QuantumState::new_with_seed.
Auto Trait Implementations§
impl Freeze for GroverConfig
impl RefUnwindSafe for GroverConfig
impl Send for GroverConfig
impl Sync for GroverConfig
impl Unpin for GroverConfig
impl UnsafeUnpin for GroverConfig
impl UnwindSafe for GroverConfig
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