no qisas is carried out against a child or an insane person, nor against anyone whose reason is suspended for an excusable cause, such as one who is asleep or unconscious.
Third condition: parity between the victim and the killer at the moment of the crime, meaning that they must be equal in religion, freedom, and slave status, so that the killer is not superior to the slain by virtue of Islam or freedom.
Accordingly, a Muslim is not executed for killing a disbeliever, because the Prophet ﷺ said, “No Muslim is to be killed for a disbeliever,” related by al-Bukhari and Abu Dawud.
Likewise, a free person is not executed for a slave, as reported by Ahmad from ʿAli (d. 40 AH): “Part of the Sunnah is that a free man is not put to death for a slave.”
If the victim does not match the killer in the qualities just mentioned, putting the killer to death would entail taking more than what is rightfully due.
Any other disparity between perpetrator and victim is of no consequence: the handsome is killed for the ugly, the noble for the commoner, the elderly for the young, the male for the female, and the sound-minded for the mentally impaired, in accordance with the general divine statement, “We ordained for them in it: a life for a life” (Quran 5:45), and His words, “the free man for the free man” (Quran 2:178).