def _bitstrings_to_probs(
    bitstrings: npt.NDArray[np.int8],
) -> tuple[npt.NDArray[np.int8], npt.NDArray[Any]]:
    """Given a list of bitstrings from different measurements returns a probability distribution.
    Args:
        bitstrings: The bitstring
    Returns:
        A tuple of bitstrings and their corresponding probabilities.
    """

    num_shots = bitstrings.shape[0]
    unique_bitstrings, counts = np.unique(bitstrings, return_counts=True, axis=0)
    probs = counts / num_shots

    return (unique_bitstrings, probs)
Given a list of bitstrings from different measurements returns a probability distribution.
    Args:
        bitstrings: The bitstring
    Returns:
        A tuple of bitstrings and their corresponding probabilities.
    
cirq-core/cirq/qis/entropy.py