-
Notifications
You must be signed in to change notification settings - Fork 617
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
Implement ExpectationMP.process_counts
#5241
Labels
good first issue
Good for newcomers
Comments
Hello @albi3ro , I'm new to Pennylane and eager to start contributing. Could I begin by working on this particular issue? Thank you! |
Thanks for reaching out @Tarun-Kumar07 . I've assigned you the issue. Feel free to reach out with any additional questions, or open a draft PR for early feedback. |
Tarun-Kumar07
added a commit
to Tarun-Kumar07/pennylane
that referenced
this issue
Feb 25, 2024
Tarun-Kumar07
added a commit
to Tarun-Kumar07/pennylane
that referenced
this issue
Feb 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Currently, our sample-based measurement processes that inherit from
SampleMeasurement
implement a process_samples method. This method is capable of turning any samples (array of int64) into the required measurement result. This method is currently used internally bydefault.qubit
.But external devices and plugins may want to store sampling information in the form of a counts dictionary instead, like
{'00': 45, '01': 55}
. This representation is much more condensed and memory efficient. Because of this, we have recently added aSampleMeasurement.process_counts
method, and implemented it forProbabilityMP
.Implementation Details
The task is to implement ExpectationMP.process_counts(counts, wire_order) in such a way that expectation values can be computed from a counts dictionary.
Note that the counts are assumed to be taken in the basis for the provided observable already, with any diagonalizing gates already applied.
Requirements
A completed PR should:
process_counts
method toExpecatationMP
The text was updated successfully, but these errors were encountered: