By any standard, this would be cruel and unusual.
The great state of Oklahoma tried something similar many years ago, and the SCOTUS said “No”.