India very much does consider Hamas a terrorist organization. Modi has clearly condemned its actions and repeatedly expressed support for Israel
against terrorism.
It's true that they have not publicly criticized Qatar for harboring Hamas or supporting terrorist groups.