qiskit_addon_sqd.qubit.sort_and_remove_duplicates

sort_and_remove_duplicates(bitstring_matrix, inplace=True)[source]

Sort a bitstring matrix and remove duplicate entries.

The lowest bitstring values will be placed in the lowest-indexed rows.

Parameters:
  • bitstring_matrix (ndarray) – A 2D array of bool representations of bit values such that each row represents a single bitstring.

  • inplace (bool) – Whether to modify the input array in place.

Returns:

Sorted version of bitstring_matrix without repeated rows.

Return type:

ndarray