def create_not_equal_mask(
        key: cirq.MeasurementKey, bitmask: int, *, index: int = -1
    ) -> BitMaskKeyCondition:
        """Creates a condition that evaluates (meas & bitmask) != bitmask."""
        return BitMaskKeyCondition(
            key, index, target_value=bitmask, equal_target=False, bitmask=bitmask
        )
Creates a condition that evaluates (meas & bitmask) != bitmask.
cirq-core/cirq/value/condition.py