How do I get an anatz function under control?

Hi @RX1 , please stop tagging people in your threads. We do have other things to do sometimes. :smiley:

As I suggested in your other thread (see here: How can I use qml.select to make an overall selection of ansatz functions?), you can do this very easily if you define your ansatz function (with the 3 different options) as an operator, and then use Controlled, as you’re already trying to do (qml.ops.op_math.Controlled — PennyLane 0.32.0 documentation).
So long as your ansatz is an operator, this should work just fine. You can see the full instructions here: Adding new operators — PennyLane 0.32.0 documentation

Best of luck! :slight_smile: