def F3d(state, qubit):
    """
    Applies a rotation (F3^{\\dagger}) about a stabilizer octahedron face to stabilizers and destabilizers

    X -> -Z
    Z -> -iW = -Y
    W -> -iX
    Y -> X
    """
    stabs = state.stabs
    stabs.signs_minus ^= stabs.col_x[qubit] | stabs.col_z[qubit]
    gens_common = stabs.signs_i & stabs.col_z[qubit]
    gens_only_z = stabs.col_z[qubit] - stabs.signs_i
    stabs.signs_minus ^= gens_common
    stabs.signs_i -= gens_common
    stabs.signs_i |= gens_only_z
    for gens in state.gen_list:
        xonly = gens.col_x[qubit] - gens.col_z[qubit]
        zonly = gens.col_z[qubit] - gens.col_x[qubit]
        xzshared = gens.col_x[qubit] & gens.col_z[qubit]
        for i in xzshared:
            gens.row_z[i].discard(qubit)
        for i in zonly:
            gens.row_x[i].add(qubit)
        for i in xonly:
            gens.row_x[i].discard(qubit)
            gens.row_z[i].add(qubit)
        gens.col_x[qubit], gens.col_z[qubit] = gens.col_z[qubit], gens.col_x[
            qubit]
        gens.col_z[qubit] ^= gens.col_x[qubit]
