Skip to content

Fix cases for qml.sample(..., counts=True)#2839

Merged
antalszava merged 21 commits intomasterfrom
fix_counts
Jul 26, 2022
Merged

Fix cases for qml.sample(..., counts=True)#2839
antalszava merged 21 commits intomasterfrom
fix_counts

Conversation

@antalszava
Copy link
Copy Markdown
Contributor

@antalszava antalszava commented Jul 20, 2022

Context:
In a recent PR it was found that the qml.shots(..., counts=True) behaves in unexpected ways in some cases. The original addition was made in this PR.

Description of the Change:

Fixed the use of returning counts when:

  • For varying number of wires (other than 3);
  • Using the interfaces;
  • Counts are returned as part of multiple measurements.

Note that counts now no longer return tensor objects, but rather raw dictionaries or sequences that contain dictionaries.

Benefits:

Returning counts works in more cases as expected.

Possible Drawbacks:
N/A

Related GitHub Issues:
N/A

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants