def find_stab(state, stab_xs, stab_zs):
    """
    Find the sign of the logical operator.

    Args:
        state:
        stab_xs:
        stab_zs:

    Returns:

    """
    if len(stab_xs) == 0 and len(stab_zs) == 0:
        return True
    stab_xs = set(stab_xs)
    stab_zs = set(stab_zs)
    stabs = state.stabs
    built_up_xs = set()
    built_up_zs = set()
    for q in stab_xs:
        for stab_id in state.destabs.col_z[q]:
            built_up_xs ^= stabs.row_x[stab_id]
            built_up_zs ^= stabs.row_z[stab_id]
    for q in stab_zs:
        for stab_id in state.destabs.col_x[q]:
            built_up_xs ^= stabs.row_x[stab_id]
            built_up_zs ^= stabs.row_z[stab_id]
    built_up_xs ^= stab_xs
    built_up_zs ^= stab_zs
    if len(built_up_xs) != 0 or len(built_up_zs) != 0:
        return False
    else:
        return True
