Skip to main content

grover_search

Function grover_search 

Source
pub fn grover_search(
    oracle: &dyn Fn(usize) -> bool,
    n_qubits: usize,
    iterations: usize,
) -> usize
Expand description

Grover’s search algorithm. oracle: marks the target state (returns true for target). Returns the found state index.