def _get_hamming_distance(
    bitstring_1: npt.NDArray[np.int8], bitstring_2: npt.NDArray[np.int8]
) -> int:
    """Calculates the Hamming distance between two bitstrings.
    Args:
        bitstring_1: Bitstring 1
        bitstring_2: Bitstring 2
    Returns: The Hamming distance
    """
    return (bitstring_1 ^ bitstring_2).sum().item()
Calculates the Hamming distance between two bitstrings.
    Args:
        bitstring_1: Bitstring 1
        bitstring_2: Bitstring 2
    Returns: The Hamming distance
    
cirq-core/cirq/qis/entropy.py