-
Notifications
You must be signed in to change notification settings - Fork 40
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
Prob with shots-noise #568
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @multiphaseCFD! 💯 Looking forward to see this support in Catalyst :)
pennylane_lightning/core/src/simulators/lightning_gpu/measurements/MeasurementsGPU.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/measurements/MeasurementsGPU.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/measurements/MeasurementsGPU.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/MeasurementsKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/MeasurementsKokkos.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/measurements/MeasurementsLQubit.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_qubit/measurements/MeasurementsLQubit.hpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just a super small suggestion. Happy to approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @multiphaseCFD, looks great 💯 The only thing I'm wondering, shouldn't there be a function with an observable and shot argument?
Thanks @dime10 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💯
The only thing that I find a bit confusing is the large amount of variations that exist for different measurement processes, and that don't always seem consistent or consistently available. For example, expval
and var
provide separate functions for:
- mp(obs)
- mp(obs, shots)
But probs
combines them into one:
- mp(obs, shots=0)
And that's on top of other variations like probs()
/probs(shots)
, and probs(wires)
/probs(wires, shots)
, where they are separate as well 😅
But it's not a blocker :)
Thanks @dime10 ! The reason why |
Before submitting
Please complete the following checklist when submitting a PR:
All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to the
tests
directory!All new functions and code must be clearly commented and documented.
If you do make documentation changes, make sure that the docs build and
render correctly by running
make docs
.Ensure that the test suite passes, by running
make test
.Add a new entry to the
.github/CHANGELOG.md
file, summarizing thechange, and including a link back to the PR.
Ensure that code is properly formatted by running
make format
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
Add shots-noise to
prob()
in the C++ layer.Description of the Change:
prob(Observable<StateVectorT> &obs, size_t number_shots)
,prob(size_t number_shots)
andprob(const std::vector<size_t> wires, size_t number_shots)
were added for the probabilities of a full system and sub-system.Benefits:
Possible Drawbacks:
Related GitHub Issues: