The difference is quite clear, and there is no moral equivalence. The IDF aims at military targets to the extent possible, whereas Hamas, Jihad etc. have as a goal the successful targeting of population centers.
Firebomb thrown during demonstration in northern Israeli town of Umm al Fahm (Haaretz)
from the article: A state that abducted itself