quri_parts.algo.mitigation.post_selection package#
- quri_parts.algo.mitigation.post_selection.create_general_post_selection_sampler(sampler: Callable[[NonParametricQuantumCircuit, int], Mapping[int, int | float]], filter_fn: Callable[[int], bool]) Callable[[NonParametricQuantumCircuit, int], Mapping[int, int | float]] #
Returns `class`:Sampler: that performs post-selection after sampling.
Note that the effective shots might decrease by discarding the measurement results which do not pass
filter_fn
.