In virtually all of the US states you can shoot or otherwise dispatch of someone in the commission of, or fleeing after, a violent crime. All that varies are the definitions of when or where.
Executions by State is just legal murder, who has the right to pull the switch that kills another human? Just as you don't have that right neither should the State. At lease in some countries they get the victim's family to perform the execution and some cases even allow them to pardon the prisoner.
If the individual can in those circumstances, why not the state as punishment for particularly heinous crimes?