gen_I function

Generate the I product operator for a single spin.