Academic Islamic scholarship clarifies that verses in the Quran addressing warfare against non-Muslims were historically revealed during active, state-level conflicts with the pagan tribes of Mecca and their military allies.
Mainstream historians emphasize that these specific martial passages must be read within their situational context of self-defence and treaty violations, rather than as an open-ended command to attack peaceful non-Muslims.
The historical context is that this Quran verse was revealed at the Battle of Badr, a battle in which the pagans of Makkah traveled over 200 miles to destroy the Muslims of Madinah. The Pagans of Makkah had an army of about 1000 while the Muslims were only 300 followers. Muhammad and his followers had suffered severe persecutions and torture for 13 years in the city of Makkah. Having fled from Makkah to the safety of Madinah, they found that they were once again threatened.
From a historical and textual context this Quran verse does not promote the killing of innocents.