-
Notifications
You must be signed in to change notification settings - Fork 615
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
Allow postselecting on mid-circuit measurement results #4442
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add vjp/jvp capabilities * pylint * some tests for simulate * Fix syntax error * Split simulate * Add some tests * pylint * more device tests * pylint and fix tests * change tracker keys * Update pennylane/devices/qubit/adjoint_jacobian.py Co-authored-by: Christina Lee <[email protected]> * other places * Add docs for simulate funcs * revert suggestion * Remove validation * Add validation for use_device_gradient * remove None case * use device gradient in validation * changelog --------- Co-authored-by: Christina Lee <[email protected]>
…ded (#4394) * initialize dev rng from global state * change default value to global str * Apply suggestions from code review Co-authored-by: Frederik Wilde <[email protected]> * Update tests/devices/experimental/test_default_qubit_2.py * fix indentation --------- Co-authored-by: Frederik Wilde <[email protected]>
* Testing changes to operator __eq__ * Updated until `nodes_between` * Updated metric tensor, circuit graph * Updating `qml.equal` * Linters * Updated tape tests * Added coverage * Updates changelog * Removed changes to __eq__ and __hash__ * Update pennylane/operation.py Co-authored-by: Matthew Silverman <[email protected]> * Update pennylane/ops/functions/equal.py Co-authored-by: Christina Lee <[email protected]> --------- Co-authored-by: Matthew Silverman <[email protected]> Co-authored-by: Christina Lee <[email protected]>
* Fixes for new autoray version * unused import * Use if instead of try-except * Fix case of two torch tensors * pin autoray * dispatch * test with new version
…aviour (#4144) * Updated Operator * Added tests * Updated warning * black * Updated warning text * black * Update doc/development/deprecations.rst * Updated docs, tests * Updated deprecations.rst * Fixing tests * Updated tests and warnings * Pylint * Testing warnings * Testing changes * Updated tests * testing what breaks * Checking tests * Testing changes * Testing changes to operator __eq__ * Updated until `nodes_between` * Updated metric tensor, circuit graph * Updating `qml.equal` * Linters * Updated tape tests * Added coverage * Updates changelog * Removed changes to __eq__ and __hash__ * Update pennylane/operation.py Co-authored-by: Matthew Silverman <[email protected]> * Testing changes to operator __eq__ * Updated until `nodes_between` * Updated metric tensor, circuit graph * Updating `qml.equal` * Linters * Fixes for new autoray version (#4396) * Fixes for new autoray version * unused import * Use if instead of try-except * Fix case of two torch tensors * Updated tape tests * Add ability to apply `TransformProgram` to batch of tapes (#4364) * Draft structure * draf exec * Simple execute * Update * More tests * Update * Update exec * Pylint and black * Update tests * Update more tests * More tests * changelog * Coverage * Cover fix * pylint * Pylint * Pylint tests * proposed changes to transform program integration * oops * add to legacy, remove cotransform support * just transform program call component * just transform program call component * no longer support cotransforms, fix _batch_postprocessing * some more testing * test null postprocessing function * docstring, rename batch_slices to slices, black * Apply suggestions from code review Co-authored-by: Matthew Silverman <[email protected]> --------- Co-authored-by: rmoyard <[email protected]> Co-authored-by: Matthew Silverman <[email protected]> * torch qnode integration with DefaultQubit2 (#4392) * copy-paste torch file; replace device in most places * make tests work; little changes in pennylane * pylint fix * changelog * update test name and docstring for hamiltonian_expand * minimal test for single-shot bugfix * Added coverage * Updates changelog * Removed changes to __eq__ and __hash__ * Update pennylane/operation.py Co-authored-by: Matthew Silverman <[email protected]> * Updated deprecations to 0.32 * Added warnings * Trigger CI * Removed docstrings * Added correctness test * Trigger CI --------- Co-authored-by: Tom Bromley <[email protected]> Co-authored-by: Matthew Silverman <[email protected]> Co-authored-by: Edward Jiang <[email protected]> Co-authored-by: Christina Lee <[email protected]> Co-authored-by: rmoyard <[email protected]>
* copy-paste tf files * make tests work; little changes in pennylane * changes coming from torch PR first * update remaining test files * support tf.function by adding empty kwargs * update copyright year in test files * changelog * put all qnode integrations together
* Fix jax.ad deprecation. * Update changelog. * Print name of requested device in DeviceError. * Force push. * Fix pytest.raises in test_device.py
* fix has_decomposition for ControlledQubitUnitary * changelog * add comment; add test when super returns False
* `wire_order` kwarg for `Tensor.sparse_matrix()` * update changelog * swap kwarg order Co-authored-by: Matthew Silverman <[email protected]> * adapt docstring to the kwarg order swap * add comment about using over --------- Co-authored-by: Matthew Silverman <[email protected]>
…4388) * default shots on new device interface * make fewer changes and clean stuff up later * fix tests, lint, and sphinx * Update doc/releases/changelog-dev.md * Update tests/interfaces/test_set_shots.py Co-authored-by: Matthew Silverman <[email protected]> * Update tests/devices/experimental/test_default_qubit_2.py * make set_shots error with new device, shots type hinting * Update doc/releases/changelog-dev.md Co-authored-by: Tom Bromley <[email protected]> * Update pennylane/interfaces/set_shots.py Co-authored-by: Matthew Silverman <[email protected]> * Apply suggestions from code review * Update tests/devices/experimental/test_default_qubit_2.py * merge problem * black * Update doc/releases/changelog-dev.md * Update pennylane/qnode.py Co-authored-by: Edward Jiang <[email protected]> --------- Co-authored-by: Matthew Silverman <[email protected]> Co-authored-by: Tom Bromley <[email protected]> Co-authored-by: Edward Jiang <[email protected]>
* Support midcircuit stateprep * Added tests for code cobv * changelog * lint * fix typo * fix doc-string * address code review * lint * ci * Support `StatePrep` mid-circuit for `DefaultQubit2` (#4444) * Add support for defaultqubit2 * changelog * lint * ci * code review * Update doc/releases/changelog-dev.md Co-authored-by: Christina Lee <[email protected]> --------- Co-authored-by: Christina Lee <[email protected]>
* Allow shots reuse * various fixes * remove block comment * Add test for multiple shadow measurements * add test for shots reuse * Apply suggestions from code review Co-authored-by: Mudit Pandey <[email protected]> * Update pennylane/devices/qubit/sampling.py * split variable * simplification * fix * Update pennylane/devices/qubit/sampling.py Co-authored-by: Christina Lee <[email protected]> * Address PR comments * pylint --------- Co-authored-by: Mudit Pandey <[email protected]> Co-authored-by: Christina Lee <[email protected]>
* bugfix: substraction works with new opmath * changelog * add test when not implemented * use s_prod in Operator.__sub__
Co-authored-by: Christina Lee <[email protected]>
Postselection being implemented in #4604 . Closing this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: