quri_parts.openfermion.utils.post_selection_filters module#

create_jw_electron_number_post_selection_filter_fn(n_electrons, sz=None)#

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.

Parameters:
  • n_electrons (int) –

  • sz (float | None) –

Return type:

algo.mitigation.post_selection.post_selection.PostSelectionFilterFunction

create_bk_electron_number_post_selection_filter_fn(qubit_count, n_electrons, sz=None)#

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.

Parameters:
  • qubit_count (int) –

  • n_electrons (int) –

  • sz (float | None) –

Return type:

algo.mitigation.post_selection.post_selection.PostSelectionFilterFunction

create_scbk_electron_number_post_selection_filter_fn(qubit_count, n_electrons, sz)#

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.

Parameters:
  • qubit_count (int) –

  • n_electrons (int) –

  • sz (float) –

Return type:

algo.mitigation.post_selection.post_selection.PostSelectionFilterFunction