-
Notifications
You must be signed in to change notification settings - Fork 558
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
Issue when using batched data on StronglyEntanglingLayers template.[BUG] #5695
Comments
Thanks @BenYyyyyy for posting! This does sound like a bug, we'll take a look and get back to you. Would you be able to share the output of |
Platform info: Linux-5.14.21-150400.24.81_12.0.75-cray_shasta_c-x86_64-with-glibc2.31
|
Thanks for sharing this info @BenYyyyyy . I see that you're not using the latest version of PennyLane. Are you able to update it to v0.36 which is our current version? My colleague David is working on a fix for your bug but you'll need to update PennyLane in order to be able to use it. You can run |
) **Context:** The decomposition of `StronglyEntanglingLayers` "almost" takes broadcasting into account: The indexing into the `weights` tensor is fine, but the number of layers is not determined correctly, leading to flawed indexing, and in particular to #5695. **Description of the Change:** Fix the `n_layers` determined from `weights` in `compute_decomposition`. **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** Fixes #5695 [sc-63457]
Expected behavior
I want to use the StronglyEntanglingLayers template to process batched data. the shape of the data is like [batch_size, layers, wires, 3].
Actual behavior
Some errors happened:
Additional information
I check the strongly_entangling.py and find this bug may comes from this code:
the correct code may be
Source code
No response
Tracebacks
No response
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: