I think the point is that you're not allowed to 'booby trap' your house.
So when your friendly local DIY store uses razor wire along the top of a 3m fence with signs up saying "caution razor wire" that's OK but just running 40,000 volts through the top is not.
I guess it would depend on how visible it would be - I'd imagine carpet gripper could be rather hard to see and you could be in difficulties
Chunkeymonk, I did a similar thing around the top of my fence. Local bobby told me I was legally able to put that up to deter the local cats ;-) and therefore did not need to warn potential intruders...
I think that you are(within reason)allowed to put a deterrents anywhere you like as long as you accept responsibility for any consequences.
For example it is still quite common to see boundary walls with glass embedded in them.
Only today a saw a small wall/sill with spikes embedded in it to stop pigeons roosting.
Perhaps a secured concrete lintel above the wooden frame(obviously I don't know how practical this is in your case) with the broken glass idea might suit.
Using a bit of lateral thinking and knowing that you have a computer, why not put a CCTV setup to observe the area. Need not be too expensive and especially if it is conjunction with a motion detector light