Sharia strictly applies to Muslims only, so non-Muslims have an automatic opt-out. Traditionally the only exceptions are when a non-Muslim came into conflict with a Muslim, or when a Muslim becomes a non-Muslim. The latter makes it difficult to opt-out if you are already a Muslim, considering that the punishment for apostasy traditionally is death.
I believe the apostasy thing came about in order to save the nascent Caliphate from fragmentation immediately after Muhammad's death. Haroon may want to expand/correct me on this.
you are correct, there is no a single verses in Quran that order death penalty for the punishment of apostasy, in contrary there are many verses that even indicate the person who return back forward from faith to disbelieve and repeat again to faith then disbelieve without any given command for execution. Take for example this verse:
"believe in the morning what is revealed to the believers, but reject it at the end of the day; perchance they may (themselves) turn back." (Quran, 3:72)
It told in this verses they were became Muslims in the morning and turn to
kufr or disbelieve at the day however there is no further command regarding execution for the apostate.
Or this verse:
"Behold, as for those who come to believe, and then deny the truth, and again come to believe, and again deny the truth, and thereafter grow stubborn in their denial of truth — Allah will not forgive them, nor will guide them in any way." (Quran, 4:137)
This even indicate the action already done couples of time, which indicate there is no punishment for such action in this world the punishment are in the after life.
If El-Machine want to argue otherwise he should check up the argumentation between Muslims who pro death penalty for disbeliever or with the contra death penalty, both are agree there is no such account in the Quran however such account exist within the hadith. This is something that already a fixed terms if there are any single verses in Quran that command death penalty for apostasy of course the pro death penalty already quoted as a main argument, that is a debated between someone who memorize the Quran by heart. But if El-Machine know better than us and those
hafiz (those who remember the Quran with their mind perfectly) regarding our own book, then he free to prove himself by quoting the verse of the Quran that ordering the Muslims to killed the apostate.
However to be fair, the Quran order the Muslims to wage war those who wage war against the Prophet or themselves (Quran, 5:33), which is logically acceptable of course anyone have right to defend themselves from war and occupation.
And some ulama, like Yusuf Qardhawi for example, interpretate the hadith that command to execute the apostate because at that time apostasy mean deserting from the Muslims to the polytheist Arabs tribes that was in war with the Muslims at that time. And deserting troops are pretty much punished to death even now in modern time.
Again to support TK point (as he quoted the Quran) here is another verses regarding there are no compulsion in religion:
There is no compulsion or coercion in religion, as Allah says:
"And say: 'The truth is from your Lord,' so let him who please believe, and let him who please disbelieve." (Quran, 18:29)
"Let there be no compulsion in religion." (Quran, 2:256)
"And so (O Prophet): admonish them; your task is only to admonish. You cannot compel them (to believe.)" (quran, 88:21-22)
"If they surrender (to God), then truly they are rightly guided, and if they turn away, then behold, your duty is no more than to deliver the message." (Quran, 3:20)