-
Notifications
You must be signed in to change notification settings - Fork 616
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
Additional useful standard transforms #6130
Comments
Thanks @cvjjm, definitely something we want to improve down the line! Are there any particular ones in the list that have come up which you would find useful? |
They all would have been useful at some point to me and some of them I had also implemented at some point... For the merging/deleting of the global phase I still have this code lying around:
|
Note that
Though it will also perform other simplications. |
To avoid oversimplifying, you can also set the @qml.qnode(qml.device('default.qubit'))
def circuit(x):
qml.adjoint(qml.RX(x,0), lazy=False)
qml.adjoint(qml.X(0), lazy=False)
return qml.state() print(qml.draw(circuit, level=1)(0.5))
0: ──RX(-0.50)──X─┤ State |
I must say that a transform with an "obscure" name such as simplify that does not really tell me what it does and potentially does things I do not want, which I then have to switch off with another option with an obscure name such as "lazy" is less useful than a collection of transforms with descriptive names (so that they can be found easily via search or by glancing over the list) that do exactly one thing and do it well, and which I can then chain together in exactly the order I want. Here are a two more for the wish list:
|
Hi @cvjjm , you raise some very good points. Thank you very much for these suggestions. Would any of the things in the wish list have higher priority for you than the others? |
Feature details
PennyLane ships a few useful transform, but some obvious one that would be nice to have are missing. These include for example transforms that:
While I understand that it will never be possible to cover all transforms a user could ever want, an added benefit of a slightly larger library of transforms would that there are more templates for users to start implementing their own transforms from.
Implementation
No response
How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information
No response
The text was updated successfully, but these errors were encountered: