Skip to content

Conversation

@andrijapau
Copy link
Contributor

@andrijapau andrijapau commented Sep 11, 2025

Context:

See #8244.

Description of the Change:

Patches the logic so the correct expand shape is given to .reshape.

Fixes #8244

[sc-99115]

@github-actions

This comment was marked as resolved.

@andrijapau andrijapau added the WIP 🚧 Work-in-progress label Sep 11, 2025
@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.39%. Comparing base (3600b4b) to head (ebf6f6e).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8251   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files         551      551           
  Lines       57214    57216    +2     
=======================================
+ Hits        56870    56872    +2     
  Misses        344      344           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrijapau andrijapau removed the WIP 🚧 Work-in-progress label Sep 12, 2025
@andrijapau andrijapau changed the title fix eigvals batching issue fix: improve parameter batch handling for Z-basis gates in default.mixed Sep 12, 2025
Copy link
Contributor

@JerryChen97 JerryChen97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Have we checked if this works for the user's circuit now:

import pennylane as qml

@qml.qnode(device=qml.device("default.mixed", wires=1))
def circuit(theta):
    qml.RZ(theta, wires=0)
    return qml.density_matrix(wires=[0])
circuit(np.array([1,2]))

@andrijapau
Copy link
Contributor Author

Thanks a lot! Have we checked if this works for the user's circuit now:

import pennylane as qml

@qml.qnode(device=qml.device("default.mixed", wires=1))
def circuit(theta):
    qml.RZ(theta, wires=0)
    return qml.density_matrix(wires=[0])
circuit(np.array([1,2]))

Yup!
image

@andrijapau andrijapau added this pull request to the merge queue Sep 12, 2025
Merged via the queue into master with commit c63b94c Sep 12, 2025
54 checks passed
@andrijapau andrijapau deleted the fix-batch-eigvals-issue branch September 12, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Parameter batching not working for Z-basis gates

5 participants