I would regard it as cruel and unusual punishment.
I can see that. However, is it really that cruel given the alternatives?
If a person is sexually attracted only to children. He or she is struggling immensely with the issue and abuses children regularly, we should ask ourselves what we should do about the issue...
As this person cannot and will not ever be attracted to consenting adults, which is the worst? Letting him or her abuse (and through this destroy) children? Or stopping the drive for it? If we do not stop the drive and just lock him or her up for a few years, letting the person go only to incarcerate the person again after several new offenses... Is that any less cruel?
If we can't stop the pedophile from abusing by psychology or another form for rehab. Possibly not even with cognitive reprogramming - we are left with a choice.
On the one hand we can sever the person from society permanently. Lock him or her up permanently. Execution is another option. And lobotomy is a third.
On the other hand we can try to eliminate the source of the criminal behavior. This can be done by several methods I am sure, for some I hope psychological help can be enough while for others the disease is quite hardwired into them. Hence one option is to remove the sex drive. We can also make the person live under constant and very close surveillance.
And then to provide a third option we can let him or her continue abusing children unhindered.
Now, child abuse leaves kids with extremely extremely deep scars. Some never recover. Quite a few commit suicide. A lot have so many troubles it severely affects their social and professional lives in a very deep fashion. Hence I think letting kids be abused is completely out of the question. I also think lobotomy - essentially making him or her a zombie - is completely out of the question. Execution is hopelessly outdated and I consider it barbaric.
So, as I see it we are left with four options.
A; Lock him/her up.
B; Reprogram or help him/her by use of psychology or cognitive reprogramming
C; Place him or her under close and constant supervision
D; Chemical removal of sex drive.
I believe locking a person up for the remainder of his or her life is bad. Economically, socially and ethically.
I also believe constant supervision to be out of the question as it is too expensive. Even more so, possibly, than incarceration for life.
Reprogramming may work for some, and can help them lead worthy and fulfilling lives. Yet there are those who either want to be pedophiles or can't help it and can't be rid of it. We then go back to two options. Permanent imprisonment or neutering. I'd go for neutering.
As this disease causes such a powerful impact on it's victims and hence also on society it must be dealt with. I do not think amputation of a sick limb is cruel and unusual punishment. I think it's a necessary medical procedure to make sure further complications (possibly death) doesn't arise. We don't consider taking medications to overcome suicidal tendencies or deep depression 'cruel and unusual' either.
This - chemical 'neutering' - would be amputation of a sick limb which causes great peril and possibly death for many people. It should be amputated. This disease causes so much trouble it should be dealt with. And I don't consider this punishment at all.