-
Notifications
You must be signed in to change notification settings - Fork 604
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
Inverse circuit not computed correctly in pennylane 0.15.0 #1242
Comments
Thanks for catching this @EliasCombarro! This is certainly a concerning bug, we'll look into this and see if we can uncover what is happening. |
My pleasure |
@EliasCombarro, a quick update: I believe I have found the issue and fixed it in #1243 |
Thanks! Just a quick question: what should I use instead of qml.inv()? |
Hey @EliasCombarro! If you install PennyLane from the branch in the PR, pip install git+https://github.com/PennyLaneAI/pennylane.git@fix-inv then you should be able to use either Note that, while |
Excellent, thank you. |
no worries @EliasCombarro! |
Thank you! |
Hi @EliasCombarro - we just realized a bugfix version of PennyLane, v0.15.1, that fixes this bug 🙂 The kernel demo on the website should now also be returning the correct result |
Great! Thanks so much |
Issue description
I do not know if it has to do with this other issue #1240 but it seems that in version 0.15.0 the inverse of a circuit is not computed correctly. I noticed it while executing the kernel classifier from https://pennylane.ai/qml/demos/tutorial_kernel_based_training.html
In fact, when executing
I obtain 0.15190944036912452
and when printing the circuit I get
with not inverse in the second column of rotations)
This works correctly with pennylane 0.14.1, with which I obtain
The one described above
100%
import pennylane as qml; qml.about()
)Name: PennyLane
Version: 0.15.0
Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc.
Home-page: https://github.com/XanaduAI/pennylane
Author: None
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python3.7/dist-packages
Requires: scipy, toml, appdirs, numpy, semantic-version, autograd, networkx
Required-by:
Platform info: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic
Python version: 3.7.10
Numpy version: 1.19.5
Scipy version: 1.4.1
Installed devices:
The text was updated successfully, but these errors were encountered: