-
Couldn't load subscription status.
- Fork 706
Updating the documentation of qml.device
#8294
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
Conversation
|
Hello. You may have forgotten to update the changelog!
|
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! 🚀
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 a lot! Just wonder if we are actually widely using WiresLike in the public interface
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.
As discussed in the standup of 17 Sept my only confusion is not a big deal for now!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8294 +/- ##
==========================================
- Coverage 99.39% 99.39% -0.01%
==========================================
Files 558 558
Lines 57811 57781 -30
==========================================
- Hits 57462 57431 -31
- Misses 349 350 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit d6e9c08 Author: ringo-but-quantum <[email protected]> Date: Thu Sep 18 09:51:46 2025 +0000 [no ci] bump nightly version commit 61ba7c3 Author: Astral Cai <[email protected]> Date: Wed Sep 17 12:11:01 2025 -0400 Resolve some old todo comments (#8295) **Context:** **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** commit 7b4262c Author: Pietropaolo Frisoni <[email protected]> Date: Wed Sep 17 11:59:37 2025 -0400 Updating the documentation of `qml.device` (#8294) **Context:** The documentation of `qml.device` was outdated, so this PR updates it. **Description of the Change:** As above. **Benefits:** The example are compatible with latest PL. **Possible Drawbacks:** None that I can think of. **Related GitHub Issues:** #7992 [sc-99473] commit 404b192 Author: Andrija Paurevic <[email protected]> Date: Wed Sep 17 11:02:51 2025 -0400 chore: add tests for nested `adjoint` and `ctrl` transforms with `autograph` (#8283) **Context:** Missing some important tests in the autograph module. **Description of the Change:** Add a test to make sure these functions get captured in the plxpr. We don't care about plxpr execution through PL anymore. **Benefits:** Robust code. [sc-99324] --------- Co-authored-by: Mudit Pandey <[email protected]> Co-authored-by: Astral Cai <[email protected]> commit fb5b095 Author: Astral Cai <[email protected]> Date: Wed Sep 17 10:59:01 2025 -0400 `has_decomps` and `list_decomps` work with operator instances (#8286) **Context:** These two helpers used to work with classes. As a result, one might see usage (e.g. this [commit](https://github.com/PennyLaneAI/pennylane/pull/8260/files#diff-9da436a44007b8abb8170447c6b939836bbb5920b1a05f26454fe3c3537aab30R523)) like ```python has_decomp(type(op)) ``` **Description of the Change:** **Benefits:** Now we can simply ```python has_decomp(op) ``` **Possible Drawbacks:** **Related GitHub Issues:** [sc-99425] --------- Co-authored-by: Yushao Chen (Jerry) <[email protected]> Co-authored-by: Isaac De Vlugt <[email protected]> commit 3220785 Author: Astral Cai <[email protected]> Date: Wed Sep 17 10:33:00 2025 -0400 Remove useless pylint suppressions (#8292) **Context:** **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** commit 7ee8274 Author: Utkarsh <[email protected]> Date: Wed Sep 17 23:24:20 2025 +0900 Improvements to decompositions using `ChangeOpBasis` (#8207) **Context:** Updates the decomposition for the following templates: 1. `Adder` 2. `OutAdder` 3. `Multiplier` 4. `OutMultiplier` 5. `PrepSelPrep` **Description of the Change:** 1. Adds a `change_op_basis_resource_rep` for generating compressed resource representation for `ChangeOpBasis` operations. 2. Modifies the relevant decompositions to now use `qml.change_op_basis`. **Benefits:** 1. Cleaner decompositions that would lead to more efficient controlled decompositions. **Possible Drawbacks:** None **Related GitHub Issues:** [sc-98776], [sc-98777] --------- Co-authored-by: Astral Cai <[email protected]> commit 357fdd8 Author: ringo-but-quantum <[email protected]> Date: Wed Sep 17 09:51:45 2025 +0000 [no ci] bump nightly version commit 135dab0 Author: Utkarsh <[email protected]> Date: Wed Sep 17 06:11:15 2025 +0900 Port non-parametric resource operators (#8240) **Context:** Ports non-parametric resource operators to the `estimator` module **Description of the Change:** Following changes are done: 1. `qml_estimator.rst`: Updated to list all the key objects for the module. Shifted stuff from `estimator/__init__.py` and consolidated them here. 2. `conf.py`: Added two custom hooks to the Sphinx configuration. The first one acts when stubs are read. It checks for `qml.estimator.ops` in the path and attaches `:noindex:` directive to it. The second one acts after the stubs have been written as HTML, and adds links to the non-indexed stubs ONLY in the `qml_estimator` page. 3. `ops/identity.py`: contains `Identity` and `GlobalPhase` (yes, I know this one is parametric, but it was easier to do). 4. `ops/qubit/non_parametric_ops.py`: contains all the non-parametric resource operators. **Benefits:** **Possible Drawbacks:** only drawback for the new hooks for `sphinx` configuration is that one won't be able to cross-reference operators within the sub-module `qml.estimator.ops`. This side effect is limited to that one sub-module and doesn't affect anything else; in fact, other items in `qml.estimator` can still be cross-referenced. **Related GitHub Issues:** --------- Co-authored-by: Diksha Dhawan <[email protected]> Co-authored-by: Diksha Dhawan <[email protected]> Co-authored-by: Andrija Paurevic <[email protected]> Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Austin Huang <[email protected]> Co-authored-by: Soran Jahangiri <[email protected]> Co-authored-by: ANT0N <[email protected]> commit d11e442 Author: Andrija Paurevic <[email protected]> Date: Tue Sep 16 17:01:27 2025 -0400 chore: improve type hinting in `workflow` module (#8284) **Context:** Easy PR to just add some type hints in our workflow module. **Benefits:** Better static type checking --------- Co-authored-by: Astral Cai <[email protected]> commit 901171a Author: Astral Cai <[email protected]> Date: Tue Sep 16 15:55:51 2025 -0400 remove useless pylint disable (#8287) **Context:** **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** commit d2deac8 Author: David Wierichs <[email protected]> Date: Tue Sep 16 21:22:16 2025 +0200 Add unary iterator decomposition of `Select(..., partial=False)` (#8011) **Context:** #7658 added a keyword argument `partial` to `Select` and deactivates the unary iterator decomposition of `Select` for `partial=False`, because it assumes the partial Select property of the control state. **Description of the Change:** - Add a decomposition based on the unary iterator for `partial=False`. - Register the number of work wires as resource key of `Select`. - Condition unary iterator decomposition on the number of work wires being sufficiently large. **Benefits:** Feature parity of unary iterator decomposition of `Select`, compared to multi-control decomposition. **Possible Drawbacks:** N/A **Related GitHub Issues:** [sc-94729] --------- Co-authored-by: albi3ro <[email protected]> Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Astral Cai <[email protected]> Co-authored-by: Guillermo Alonso-Linaje <[email protected]> commit 3cdcb63 Author: Diksha Dhawan <[email protected]> Date: Tue Sep 16 12:51:19 2025 -0400 Modified the signature for ResourceOperator class (#8279) **Context:** Modified the signature for controlled decomposition of ResourceOperator class. **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Soran Jahangiri <[email protected]> Co-authored-by: Christina Lee <[email protected]> commit 45107bf Author: Christina Lee <[email protected]> Date: Tue Sep 16 12:07:10 2025 -0400 Include jax version in about (#8277) **Context:** We are really picky about jax versions, so the jax version should be included in the `qml.about()` to help us debug issues. **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Mudit Pandey <[email protected]> Co-authored-by: Andrija Paurevic <[email protected]> commit 0b18c7f Author: David Wierichs <[email protected]> Date: Tue Sep 16 16:56:38 2025 +0200 Use `TemporaryAND` in `MulticontrolledX` decompositions (#8172) **Context:** There are multiple decompositions of `MulticontrolledX` that use auxiliary wires. **Description of the Change:** If the auxiliary wires are of `work_wire_type="zeroed"`, we may replace `Toffoli` gates acting on them by `TemporaryAND` gates. **Benefits:** Cheaper decompositions **Possible Drawbacks:** N/A **Related GitHub Issues:** [sc-95311] --------- Co-authored-by: Astral Cai <[email protected]> commit 4d21739 Author: runora95 <[email protected]> Date: Tue Sep 16 10:28:03 2025 -0400 removing push trigger from nightly RC builds (#8282) **Context:** RC branch nightly builds were added recently but mistakenly include a trigger to run on push. **Description of the Change:** Removing `push` trigger from RC nightly build. **Benefits:** prevent accidental uploads. **Possible Drawbacks:** **Related GitHub Issues:** commit b5613cb Author: ringo-but-quantum <[email protected]> Date: Tue Sep 16 09:51:35 2025 +0000 [no ci] bump nightly version commit 9ea5986 Author: Austin Huang <[email protected]> Date: Tue Sep 16 00:48:58 2025 -0400 Add resource config class to Pennylane core (#8259) **Context:** We are moving the resource config class from labs to pennylane. **Description of the Change:** Add resource_config.py and test_resource_config.py to pennylane.estimator. Since we do not have the templates, we do not add them and their related tests. **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** [sc-96876] --------- Co-authored-by: Diksha Dhawan <[email protected]> Co-authored-by: Diksha Dhawan <[email protected]> Co-authored-by: Astral Cai <[email protected]> Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Andrija Paurevic <[email protected]> Co-authored-by: Soran Jahangiri <[email protected]> Co-authored-by: ANT0N <[email protected]> Co-authored-by: obliviateandsurrender <[email protected]> commit 104b5e8 Author: Mehrdad Malek <[email protected]> Date: Mon Sep 15 22:46:20 2025 -0400 Add data movement operations to StableHLO dialect (#8217) **Context:** Adding some of data movement operations to StableHLO dialect. **Description of the Change:** Operations: - [x] Add BroadcastInDimOp - [x] Add ConcatenateOp - [x] Add GatherOp - [x] Add ReshapeOp - [x] Add ScatterOp - [x] Add SliceOp traits: - [x] Add SliceArraysSameSizeTrait Attributes: - [x] ScatterDimensionNumbers - [x] GatherDimensionNumbers **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** [sc-98427] --------- Co-authored-by: Mudit Pandey <[email protected]> commit c2f3714 Author: Pietropaolo Frisoni <[email protected]> Date: Mon Sep 15 21:11:03 2025 -0400 `SampleMP.process_samples` does not raise an error when the observable is multiplied by a complex coefficient (#8271) **Context:** If an observable is multiplied by a complex coefficient, the `indices` array created within `process_raw_samples` as `indices = samples @ powers_of_two` might be created with complex values. This creates issues when we try to use them as actual indices. **Description of the Change:** We move the conversion to the requested `dtype` selected by the user just before returning, so we avoid any possible implicit casting unintentionally performed under the hood in the execution workflow. **Benefits:** `process_samples` works with complex values when the `dtype` argument is specified **Possible Drawbacks:** None that I can think of. **Related GitHub Issues:** None commit 58570ba Author: Andrija Paurevic <[email protected]> Date: Mon Sep 15 16:27:05 2025 -0400 fix: allow autograph to work on wrapped `adjoint` and `ctrl` functions (#8215) **Context:** ```python import pennylane as qml qml.capture.enable() dev = qml.device("default.qubit", wires=5) def adjoint_fn(y): if y < 2: qml.RX(y, 0) qml.RY(y, 0) else: qml.RY(y, 0) qml.RZ(y, 0) qml.Hadamard(0) @qml.qnode(dev) def f(x): qml.adjoint(adjoint_fn)(x) return qml.expval(qml.Z(0)) qml.capture.run_autograph(f)(1.5) ``` previously failed. Now it correctly returns a result. **Description of the Change:** Changes which function gets selected for the convert call patch. This follows what Catalyst does. **Benefits:** Mimic Catalyst. **Possible Drawbacks:** None identified. **Related GitHub Issues:** Fixes #6992 [sc-84934] --------- Co-authored-by: Mudit Pandey <[email protected]>
Context: The documentation of
qml.devicewas outdated, so this PR updates it.Description of the Change: As above.
Benefits: The example are compatible with latest PL.
Possible Drawbacks: None that I can think of.
Related GitHub Issues: #7992
[sc-99473]