-
Notifications
You must be signed in to change notification settings - Fork 41
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
Daily rc sync to main #1459
Merged
Merged
Daily rc sync to main #1459
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
**Context:** ![Before](https://github.com/user-attachments/assets/3ec337c1-a898-4abd-a9c6-990d8767679c) **Description of the Change:** ![After](https://github.com/user-attachments/assets/a07c6a1c-f98d-4b00-b9aa-9afd0a893673) **Benefits:** No floating `}` and well formatted contents. **Possible Drawbacks:** Do we also want to show the libraries we use? **Related GitHub Issues:**
**Context:** Fix some typos and phrasing in the docs
…e file naming (#1405) **Context:** This PR fixes some small bugs or lack of documentation for catalyst-cli gathered from @dime10's feedbacks. - The `--help` flag seems to dump a lot of unrelated options which makes it difficult to navigate through catalyst options. - The possible stages for the --checkpoint-stage option are not mentioned in the documentation - When using `--checkpoint-stage`, `--save-ir-after-each=pipeline` no longer works. - The output from --save-ir-after-each=pass produces one output for each function when dealing with a function pass which results in a large number of outputs and one has to find the function of interest randomly. **Description of the Change:** - `--help` option now prints all the catalyst-cli specific options first before jumping into mlir-opt options - Added more details to documentation - Fixed the bug for `save-ir-after-each` and `save-ir-after-each` coexisting together. - Output from `save-ir-after-each` now appends the name of the function to the file name making it easier to identify the desired output. **Benefits:** easier experience for catalyst-cli user **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Joey Carter <[email protected]> Co-authored-by: erick-xanadu <[email protected]> Co-authored-by: David Ittah <[email protected]>
…ment (#1404) **Context:** The documentation for MLIR plugins did not state anything about `entry_points` nor relevant functions when loading MLIR plugins from python. Also changed the type of the `pass_pipeline` kwarg. Instead of it being a tuple of Passes, it is now a list of Passes. This is nicer for developers. **Description of the Change:** The `pass_pipeline` keyword argument is now a list instead of a tuple. This list is converted into a tuple at the moment the qnode primitive is bound. Added documentation for MLIR plugins. --------- Co-authored-by: Isaac De Vlugt <[email protected]>
**Context:** PR #1387, adds support for static parameters in customOp. However support for GlobalPhase and MultiRZ gates are missing. **Description of the Change:** This PR adds support for the missing two gates. We unified the way `GlobalPhase` and `MultiRZ` are treated in the frontend. right now, GlobalPase has its own primitive (`qphase_p`) however `MultiRZ` is binded through the `qinst_p` primitive. `qphase_p` is now removed from frontend and binded through `qints_p` similar to MultiRZ. If a `MultiRZ` or `GlobalPhase` gate has static parameters parameters, a `staticCustomOp` is created which will be lowered to the respective gate in static_custom_lowering pass. **Benefits:** removed inconsistency in the definition of odd custom gates (MultiRZ and GlobalPhase) static circuit IR now supports more parameterized gates. **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: ringo-but-quantum <[email protected]> Co-authored-by: paul0403 <[email protected]> Co-authored-by: Ritu Thombre <[email protected]> Co-authored-by: Ritu Thombre <[email protected]> Co-authored-by: lillian542 <[email protected]> Co-authored-by: Joey Carter <[email protected]> Co-authored-by: Raul Torres <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]> Co-authored-by: erick-xanadu <[email protected]>
Co-authored-by: Joey Carter <[email protected]>
**Context:** The `apply_pass` function from the frontend is capable of scheduling any MLIR pass from the frontend for a specific qnode. However, in order for the pass to succeed in its compilation, it must allow itself to be scheduled to transform a module. **Description of the Change:** There is another branch that I worked on where I moved the bulk of the transformation to Patterns; however, the pattern applicators that are upstream in MLIR do not support running a single iteration of the worklist. I would like at some point to add a custom pattern applicator that doesn't fold and only does a single pass through the worklist (or take a variable). The passes as written represent a single iteration through the worklist. Running a single iteration through the worklist may not yield all full optimizations, but that's how it is currently coded. I think this is acceptable as we don't yet do a cost benefit analysis for any transformation. **Benefits:** Can write the following: ```python import jax import pennylane as qml import catalyst @qml.qjit(keep_intermediate=True) @catalyst.passes.apply_pass("disentangle-CNOT") @qml.qnode(qml.device("lightning.qubit", wires=2)) def foo(): qml.Hadamard(0) qml.Hadamard(0) qml.Hadamard(1) qml.Hadamard(1) qml.CNOT(wires=[0, 1]) return qml.state() foo() print(foo.mlir) ```
**Context:** Some invalid Python code formatting slipped into the codebase (on the `v0.10.0-rc` branch). The offending file is `frontend/test/pytest/test_mlir_plugin_interface.py`. **Description of the Change:** Run `make format` to fix formatting warnings.
**Context:** The `oqd_database_managers` Python module is no longer used since being superseded by the C++ implementation introduced in #1372. **Description of the Change:** Removes the `oqd_database_managers` module.
**Context:** Needed to rebase refactoring branch to test. **Description of the Change:** * Adds documentation to Pass, PassPlugin * Uses values from Pass's options as options in the ApplyRegisteredPassOps **Benefits:** Documentation, passes can have options. --------- Co-authored-by: David Ittah <[email protected]>
Renames the Catalyst CLI command name from `catalyst-cli` to `catalyst`, and also installs the tool in the active Python environment when installing from wheel or from non-editable source.
**Context:** Correct a minor error in the qjit docstring. The parameter `verbosity` was mistakenly used instead of `verbose`. --------- Co-authored-by: Joey Carter <[email protected]>
During the current release cycle we discovered that having exactly 2700 test items distributed on exactly 3 cores (e.g. GH M1 runner) produces a lot of test failures. Randomizing the test order (pytest-randomly) fixes the issue for now.
**Context:** Pass plugins cannot be scheduled directly from the command line. I.e., they need to go through the pass-pipeline. E.g., This is a bad command: `quantum-opt --standalone-switch-bar-foo`. This is a good command `quantum-opt --pass-pipeline=builtin.module(standalone-switch-bar-foo)` **Description of the Change:** Changes the documentation to reflect this fact. Changes the name of the pass in the example from `standalone-switch-bar-to-foo` to `standalone-switch-bar-foo`, which is the correct name. **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** Fixes #1449
**Context:** The ions decomposition pass accessible from the frontend is missing documentation. **Description of the Change:** Adds a docstring to the frontend `ions_decomposition` function. It was also necessary to add symbols for the MS gate to the runtime C-API in order for the sample code to run. --------- Co-authored-by: David Ittah <[email protected]>
This PR fixes two issues preventing wheel upload to PyPI: - removes the deprecated `provides` kwarg in setup.py - reduces the file size of the wheel due to duplicate packaging of the catalyst cli Here is the successful build & upload of all wheels based on this branch: https://github.com/PennyLaneAI/catalyst/actions/runs/12754030162
…1454) Bump the PennyLane and Lightning minimum versions in preparation for the Catalyst 0.10.0 release. These changes ensure we can build the wheels after the Lightning release and before the core PennyLane release.
joeycarter
added
urgent
Mark a pull request as high priority
author:build-wheels
Run the wheel building workflows on this Pull Request
labels
Jan 15, 2025
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1459 +/- ##
==========================================
- Coverage 96.73% 96.70% -0.03%
==========================================
Files 76 76
Lines 8171 8173 +2
Branches 846 846
==========================================
Hits 7904 7904
- Misses 213 215 +2
Partials 54 54 ☔ View full report in Codecov by Sentry. |
joeycarter
approved these changes
Jan 15, 2025
Hello. You may have forgotten to update the changelog!
|
dime10
reviewed
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author:build-wheels
Run the wheel building workflows on this Pull Request
urgent
Mark a pull request as high priority
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.
Automatic sync from the release candidate to main during a feature freeze.