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
Create limited devices.qubit.simulate
internal function
#3700
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #3700 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 329 330 +1
Lines 28878 28909 +31
=======================================
+ Hits 28827 28858 +31
Misses 51 51
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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 love how the new device API is looking! 😍 🔥
Left some minor comments.
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 good! The test suite is very comprehensive 😄 . I left some minor questions and comments.
Co-authored-by: Mudit Pandey <muditpandey2812@gmail.com>
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.
this looks good to me! just wondering: what was your motivation for putting measure
in this file? every other aspect of this device has been fairly chunked up so it caught my eye, but it's all good in my books
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 good to me! 💯
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.
Nice work! 🎉
Just because most of the "problem solving" is done by the measurement process. As the code for measuring gets more complicated, we can move it to another file. |
Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
* add create_initial_state method to devices/qubit * steal init docstring from Christina's PR * fix default to output correct shape * initialize simulate function * fix toctree function name * add basic execution and backpropogation tests * default to numpy, cast wires to list before calling state_vector * add more integration tests * more tests * move changelog entry to new device API section * fix multiply jitting problem, remove like keyword * Update pennylane/devices/qubit/__init__.py * more tests and map wires * qinfo tests for numpy and jax * some more tests, docstrings * black, remove type hint * Apply suggestions from code review Co-authored-by: Mudit Pandey <muditpandey2812@gmail.com> * Update doc/releases/changelog-dev.md Co-authored-by: Matthew Silverman <matthews@xanadu.ai> * test clean --------- Co-authored-by: Matthew Silverman <matthews@xanadu.ai> Co-authored-by: Mudit Pandey <muditpandey2812@gmail.com>
Depends on #3683
This will be an internal function used by the next-generation Python device. The logic is extracted from the device to allow easy simulation of batches and the ability to distribute multiple simulations across different threads.
This first iteration will only support state-based measurement of observables with diagonalizing gates. Later PR's will add state-based measurements of observables with sparse or dense matrices and sample-based measurements.
This function will allow simultaneous measurement of non-commuting observables.