Kernel based training demonstration by using Z rotation

Hey everyone, I have a question. I didn’t quite understand a thing in my project results. When I am trying to use RX rotation gates by using Kernel based learning methods in this tutorial. I get 1 accuracy - and also for Y rotation gates, but when I used in same code and just changed to RZ rotation gates I get 0.44 accuracy. ( I used 4 wires and applying rotations on 4 wires just once.)

I don’t understand why I get that, do you know why and may you explain that?

Hi @NonsensicalInsane, thank you for posting your question here!

My guess is that your initial state is zero, and thus RZ rotations have no effect when your qubit is in the |0> state. This means that you’re basically unable to distinguish one RZ rotation from another. On the contrary, if you rotate around the X or Y axes you will definitely see a difference in the state of the qubit, and different rotations will give you distinguishable states. This means that you can train the parameters in the rotations to model your problem.

Please let me know if this helps!

1 Like

Hello @CatalinaAlbornoz.
Yeah, you might right about that, I haven’t noticed. Thank you for that answer, I will think about that.

I’m glad I could help @NonsensicalInsane! Don’t hesitate to post any other questions that may come up.

Enjoy using PennyLane!

1 Like