-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate an arbitrary quantum state #76
Comments
|
I am thinking of a function that prepares a desired state, preferably with a low-depth/count circuit, of course. For example, I was trying to use QASM to present the QFT techniques for the period finding algorithm. Usually, people would have to use an oracle (a periodic function) and measurement concepts to produce an input to the function, then start from there to do the actual interesting things offered by the QFT. That seems to be an unnecessary distraction for the students. I want to just give them an initial state as if it were an input for that periodic function. That would focus their attention on the actual period finding. It is something like this:
(The The
That would be awesome, and it would be also very similar to the |
@DevelopDaily Looks useful indeed. I'll implement when I get the time :) |
Could I contribute to this issue ? I should note that I'm fairly new to open source contributions and it looks like a pretty big feature, but I would be happy to try and give it all I've got and learn something myself too! :) |
The regetti / grove API has this very convenient and useful function:
create_arbitrary_state()
I used to think it would be difficult to achieve that, but I am amazed a function of about a hundred lines of Python code based on a 5 page paper could transform 0 to any states with only
pow(2, n+2) - 4n - 4
CNOT gates andpow(2, n+2) - 5
one-qubit elementary rotation gates.I cannot find a similar function in the Quantum++. If it doesn't exist, I think it would be nice to implement it.
The text was updated successfully, but these errors were encountered: