mqt.core.bench.grover_weak_measurement¶
Weak-measurement Grover benchmark instances and options.
Module Contents¶
- class Options(*, marked_bitstring: str, measurement_strength: float | None = None)¶
Parameters for a weak-measurement Grover benchmark.
- class Grover(options: Options)¶
A validated weak-measurement Grover benchmark.
The benchmark prepares a uniform state and applies one Grover iteration before each \(\kappa\)-measurement. The measurement computes the predicate with \(O_\chi\), applies the controlled \(R_\kappa\) rotation, uncomputes \(O_\chi\), and measures the probe. An outcome of \(0\) continues the loop; \(1\) exits with the marked state.
By default, the measurement strength is \(\kappa=2^{-n/2}\) for \(n\) search qubits. The accepted range \(0<\kappa\leq 2^{-n/2}\) follows the paper’s robustness bound.
- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.