-
Notifications
You must be signed in to change notification settings - Fork 593
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
[BUG] pattern_matching_optimization
eliminates all measurements
#6088
Comments
Hi, if no one's working on this right now maybe I can be assigned to it. Thanks. |
Hey @tonmoy-b! Thanks for your interest in fixing this 💪. We see this bug as possibly straightforward to fix, but (of course 😅) it might be more complicated. Feel free to work on this and we can assist where possible. If it ends up being too demanding of a fix, we'll reassess 🙂. Make sure to read our contributing guidelines before getting started! https://docs.pennylane.ai/en/stable/development/guide/contributing.html |
Hi @tonmoy-b 👋🏼 , Thank you for volunteering to work on this issue 💪🏼! I wanted to check in and see if you’ve had a chance to make any progress. We’re in the middle of our feature freeze, with the release of PennyLane v0.38 coming up next week, so it’s crucial that we complete this fix by Friday. If you haven’t had time, no worries, please just let us know as soon as possible so we can decide if we need to take over to ensure the deadline is met—If that’s the case, we’ll be happy to find another good first issue for you to work on 😎. Thank you again for your contribution!! |
Hi @Alex-Preciado, I haven't been able to put in much time on this yet. Kindly assign it to someone else so there's no delay. I will take up another task. Thanks |
Hi @tonmoy-b, thanks for letting me know! No worries at all—we’ve gone ahead and reassigned this to a member of our team to ensure we stay on track. We regularly have new good first issues, so feel free to let us know if you would like to take on another task when you’re ready. Thanks again for your help! 🚀 |
#6153) **Context:** In #4651, `tape._qfunc_output` was removed. As a consequence, for `qml.pattern_matching_optimization`, the original quantum function output (used to re-create the quantum function output of the new tape) was removed. Since in the optimization process of `qml.pattern_matching_optimization` the measurements of the original tape are not involved, the measurements of the tape coming out from the optimization process correspond to an empty list, causing information on such a variable to be lost in the optimization process. **Description of the Change:** We simply store the original measurements and assign them to the new (optimized) tape, similarly to the original approach (see #2032). **Benefits:** Measurements are preserved in the optimization process. **Possible Drawbacks:** I can think of none since measurements should not be involved in the optimization process. **Related GitHub Issues:** #6088 **Related Shortcut Stories** [sc-71174] --------- Co-authored-by: Christina Lee <christina@xanadu.ai>
Expected behavior
I expect
pattern_matching_optimization
to preserve the user's measurements.Actual behavior
The are all eliminated and the function simply returns a tuple
Additional information
No response
Source code
Tracebacks
No response
System information
PL master. But this issue has been around for at least a year.
Existing GitHub issues
The text was updated successfully, but these errors were encountered: