def H5(state, qubit):
    """
    Applies a Hadamard gate (H2) rotation to stabilizers and destabilizers

    Z + Y

    X -> -X
    Z -> iW = Y
    W -> -iZ
    Y -> Z
    """
    stabs = state.stabs
    stabs.signs_minus ^= stabs.col_x[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:
        gens.col_x[qubit] ^= gens.col_z[qubit]
        for i in gens.col_z[qubit]:
            gens.row_x[i] ^= {qubit}
