quri_parts.openfermion.utils.post_selection_filters module#

quri_parts.openfermion.utils.post_selection_filters.create_jw_electron_number_post_selection_filter_fn(n_electrons: int, sz: float | None = None) Callable[[int], bool]#

Returns PostSelectionFilterFunction that checks if the number of occupied orbitals matchs given n_electrons (and sz if specified).

Here bits is a bitstring obtained by measuring the states mapped by Jordan-Wigner transformation.

quri_parts.openfermion.utils.post_selection_filters.create_bk_electron_number_post_selection_filter_fn(qubit_count: int, n_electrons: int, sz: float | None = None) Callable[[int], bool]#

Returns PostSelectionFilterFunction that checks if the number of occupied orbitals matchs given n_electrons (and sz if specified).

Here bits is a bitstring obtained by measuring the states mapped by Bravyi-Kitaev transformation.

quri_parts.openfermion.utils.post_selection_filters.create_scbk_electron_number_post_selection_filter_fn(qubit_count: int, n_electrons: int, sz: float) Callable[[int], bool]#

Returns PostSelectionFilterFunction that checks if the number of occupied orbitals matchs given n_electrons.

Here bits is a bitstring obtained by measuring the states mapped by symmetry-conserving Bravyi-Kitaev transformation.