ravikumar1728 / Mottonen-State-Preparation

Implementing the Mottonen state preparation for any dataset with at most one 8-element vector.
MIT License
1 stars 0 forks source link

Phase encoding missing #1

Open ACE07-Sev opened 4 months ago

ACE07-Sev commented 4 months ago

Greetings dear Ravi,

Hope you are doing well. I came across your repo when implementing Mottonen and noticed your implementation is missing the Rz gates (as far as I can tell). I tried it out, and it's not encoding the imaginary component of the vectors, so it leads to the wrong state when encoded.

I believe this to be an easy fix and would actually like you to add it as your implementation otherwise is rather clean and efficient.

ravikumar1728 commented 4 months ago

Yes, You are right. Unfortunately, I'm occupied with other projects right now. If you like I can add your implementation for imaginary component to the code.

Thanks.

ACE07-Sev commented 4 months ago

Sure, I'm also a bit occupied hence why I made the issue ticket. I'll try to make a PR if I get to it, but if you get the chance, it just needs the translation of get_alpha_z() function from the Pennylane template. I believe the rest is trivial.