circuit_knitting_toolbox.utils.orbital_reduction.reduce_bitstrings

reduce_bitstrings(bitstrings, orbitals_to_reduce)[source]

Eliminates the specified orbitals in the bitstrings.

This is achieved by simply deleting those orbitals from the elements of the bitstrings.

Example: >>> reduce_bitstrings([[1, 0, 0, 1, 0], [1, 0, 0, 0, 1], [1, 1, 1, 1, 0]], [0, 1]) [(0, 1, 0), (0, 0, 1), (1, 1, 0)]

Parameters:
  • bitstrings (-) – the list of bitstrings to be reduced

  • orbitals_to_reduce (-) – the positions/orbitals to remove from the bitstrings

Returns:

the list of reduced bitstrings

Return type:

  • (List[Tuple])