Generate the I product operator for a single spin.

gen_I(n, spin_num, op)

Arguments

n

spin index number for the required operator.

spin_num

vector of spin numbers in the system.

op

operator, one of "x", "y", "z", "p", "m".

Value

I product operator matrix.