-
Notifications
You must be signed in to change notification settings - Fork 603
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
[new opmath 3] Make qml.Hamiltonian
alias for qml.LinearCombination
with new op math using __getattr__
#5393
Merged
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
mudit2812
commented
Mar 15, 2024
mudit2812
force-pushed
the
getattr-ham-lc-aliasing
branch
from
March 18, 2024 18:33
5db7111
to
53207fc
Compare
Qottmann
reviewed
Mar 18, 2024
Qottmann
reviewed
Mar 18, 2024
astralcai
reviewed
Mar 18, 2024
…into getattr-ham-lc-aliasing
…eAI/pennylane into getattr-ham-lc-aliasing
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## ham-tests #5393 +/- ##
=============================================
- Coverage 99.47% 99.47% -0.01%
=============================================
Files 400 400
Lines 37136 37133 -3
=============================================
- Hits 36940 36937 -3
Misses 196 196 ☔ View full report in Codecov by Sentry. |
trbromley
reviewed
Mar 19, 2024
mudit2812
commented
Mar 19, 2024
Co-authored-by: Astral Cai <astral.cai@xanadu.ai> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
Co-authored-by: Astral Cai <astral.cai@xanadu.ai> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
**Context:** A couple of tests failed with the new `stim` release. **Description of the Change:** Force `int` conversion from `numpy.int64` type and increase the number of shots to improve the robustness of sampling tests. **Benefits:** **Possible Drawbacks:** N/A **Related GitHub Issues:** N/A
### Before submitting Please complete the following checklist when submitting a PR: - [x] 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 test directory! - [x] 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`. - [x] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `doc/releases/changelog-dev.md` file, summarizing the change, and including a link back to the PR. - [x] The PennyLane source code conforms to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). We check all of our code against [Pylint](https://www.pylint.org/). To lint modified files, simply `pip install pylint`, and then run `pylint pennylane/path/to/file.py`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** The Lightning simulators derive from `QubitDevice`. With the recent addition of `MidMeasureMP` support in `lightning.qubit`, we can potentially enable dynamic circuit execution in the Lightning family. **Description of the Change:** If the tape has mid-circuit measurements before apply, pass a `mid_measurements` dictionary through `apply` via `kwargs`. Finally return `mid_measurements` along with the results if operating in dynamic mode. Also add `dynamic_one_shot` to the `full_transform_program` if MCMs are present in the tape and the device has capability `supports_mid_measure`. **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Nathan Killoran <co9olguy@users.noreply.github.com> Co-authored-by: Matthew Silverman <matthews@xanadu.ai> Co-authored-by: Astral Cai <astral.cai@xanadu.ai> Co-authored-by: Mikhail Andrenkov <mikhail@xanadu.ai>
Automatic update of stable requirement files to snapshot valid python environments. Because bots are not able to trigger CI on their own, please do so by pushing an empty commit to this branch using the following command: ``` git commit --allow-empty -m 'trigger ci' ``` Alternatively, wait for this branch to be out-of-date with master, then just use the "Update branch" button! Note that it is expected that the PennyLane-Lightning repo is a version ahead of the release, because the version number is taken from the dev branch. Trying to `pip install` from the files will fail until that major version of Lightning is released. If pip install fails with a not found error when installing because of this, it can be fixed by manually downgrading the PennyLane-Lightning version number in the file by 1 version and trying again. --------- Co-authored-by: GitHub Actions Bot <> Co-authored-by: Alex Preciado <alex.preciado@xanadu.ai> Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Astral Cai <astral.cai@xanadu.ai>
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.
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
test 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
doc/releases/changelog-dev.md
file, summarizing thechange, and including a link back to the PR.
The PennyLane source code conforms to
PEP8 standards.
We check all of our code against Pylint.
To lint modified files, simply
pip install pylint
, and thenrun
pylint pennylane/path/to/file.py
.When all the above are checked, delete everything above the dashed
line and fill in the pull request template.
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: