Skip to content
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
281 commits
Select commit Hold shift + click to select a range
4b5153e
Clean up specs code
jzaia18 Nov 11, 2025
0c0683f
oops all type hints
jzaia18 Nov 11, 2025
963d60f
Cleaner error messages
jzaia18 Nov 11, 2025
9f2664a
Fix specs not properly handling tape transforms with capture enabled
jzaia18 Nov 12, 2025
76639cf
Linting
jzaia18 Nov 12, 2025
d9fa927
Support ranges
jzaia18 Nov 13, 2025
79bb963
Merge branch 'main' into chore/xdsl-utils
jzaia18 Nov 13, 2025
9bb09f3
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 13, 2025
649f328
Rename visualization to inspection
jzaia18 Nov 13, 2025
b3c332a
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 13, 2025
59ad388
Fix missed spots
jzaia18 Nov 13, 2025
6ad2907
Temp
jzaia18 Nov 13, 2025
023da7e
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 13, 2025
a05ec98
Make format
jzaia18 Nov 13, 2025
45b8782
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 13, 2025
d7f72dc
UI cleanup
jzaia18 Nov 13, 2025
69cd5a6
More cleanup
jzaia18 Nov 13, 2025
7fc2f0d
Move get_mlir_module to shared utility file
jzaia18 Nov 13, 2025
13e6b4a
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 13, 2025
1eb76f7
Remove redundant code
jzaia18 Nov 13, 2025
1308ca3
Build out framework for unit testing mlir_specs
jzaia18 Nov 13, 2025
7ebd5e5
Merge branch 'main' into chore/xdsl-utils
jzaia18 Nov 14, 2025
49bd139
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 14, 2025
6e9fac3
Specs testing
jzaia18 Nov 14, 2025
cf187da
Add more mlir_specs tests. Run all tests with AND without PLxPR
jzaia18 Nov 17, 2025
daebf3e
Test more level values
jzaia18 Nov 17, 2025
715bda4
Merge branch 'main' into chore/xdsl-utils
jzaia18 Nov 17, 2025
d3466d5
Merge branch 'chore/xdsl-utils' into feature/specs-levels
jzaia18 Nov 17, 2025
d828d90
Remove specs integration from this branch
jzaia18 Nov 17, 2025
2ffd877
Merge mlir_specs into branch
jzaia18 Nov 17, 2025
4fd3991
Better handle user specified compilation options
jzaia18 Nov 17, 2025
b849bba
Merge branch 'chore/xdsl-utils' into feature/mlir-specs
jzaia18 Nov 17, 2025
5df2973
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 17, 2025
e90d3b5
Skip external function declarations
jzaia18 Nov 17, 2025
51e3ca5
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 17, 2025
3b34f09
remove unused qjit from xdsl_conversion.py
andrijapau Nov 17, 2025
9ea75bc
Merge branch 'main' into chore/xdsl-utils
jzaia18 Nov 18, 2025
940ba41
Merge branch 'chore/xdsl-utils' into feature/mlir-specs
jzaia18 Nov 18, 2025
5f9674a
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 18, 2025
5a243ca
Begin adding support for CallOp
jzaia18 Nov 18, 2025
87f4d5a
Fix xDSL conversion to once again allow for QNodes
jzaia18 Nov 18, 2025
c0d04da
rename remove-chained-self-inverses to cancel-inverses
andrijapau Nov 19, 2025
05947fd
Merge branch 'main' into chore/xdsl-utils
jzaia18 Nov 19, 2025
7314cfd
Merge branch 'chore/xdsl-utils' into feature/mlir-specs
jzaia18 Nov 19, 2025
3a3f2c4
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 19, 2025
200e687
Support function calls
jzaia18 Nov 19, 2025
dabf998
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 19, 2025
4c3e2b0
Temp fixes to get around bug in FTQC specs collection
jzaia18 Nov 19, 2025
f0e56e7
Oops, typo
jzaia18 Nov 20, 2025
862bf44
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 20, 2025
8156919
Take max instead of sum for conditionals
jzaia18 Nov 20, 2025
739bd51
Revert change to resource tracking specs
jzaia18 Nov 20, 2025
d3b415f
Add 'mlir-specs' option
jzaia18 Nov 20, 2025
93e1f22
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 21, 2025
1d234d2
Support IndexSwitchOp
jzaia18 Nov 21, 2025
729f882
Merge branch 'main' into feature/mlir-specs
jzaia18 Nov 24, 2025
752303f
Ensure dialects are fully recognized
jzaia18 Nov 24, 2025
f9edccd
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 24, 2025
415f9d1
More dialect support
jzaia18 Nov 24, 2025
17628e9
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 24, 2025
191b07a
Small name change to accomodate new mlir_specs changes
jzaia18 Nov 24, 2025
43ec629
Fix several unit tests
jzaia18 Nov 24, 2025
f182b89
More cleanup
jzaia18 Nov 24, 2025
6e86005
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 24, 2025
0ebd9ef
Specs output
jzaia18 Nov 24, 2025
38fff07
change how resource size is tracked
jzaia18 Nov 25, 2025
c150bc3
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 25, 2025
f39afc0
Cleanup
jzaia18 Nov 25, 2025
9849387
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 25, 2025
6460a16
Integrate with changes to how mlir_specs stores data
jzaia18 Nov 25, 2025
53def9b
Handle adjoint op
jzaia18 Nov 25, 2025
6f2486d
More cleanup
jzaia18 Nov 26, 2025
9fcbc9d
More unit tests
jzaia18 Nov 26, 2025
97e2126
Merge branch 'main' into feature/specs-levels
jzaia18 Nov 26, 2025
711920b
Merge branch 'main' into feature/mlir-specs
jzaia18 Nov 26, 2025
5b4fe8d
Merge branch 'feature/mlir-specs' into feature/specs-levels
jzaia18 Nov 26, 2025
f92ca68
Revert changes inherited from other branches (unified compiler migrat…
jzaia18 Nov 26, 2025
d5ae1f7
Compiler moved
jzaia18 Nov 26, 2025
8b675bd
Disentangle this branch from new specs features
jzaia18 Nov 28, 2025
5c37ef3
Update unit tests to match new specs
jzaia18 Nov 28, 2025
651ae93
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Nov 28, 2025
7c42d74
Fix botched merge
jzaia18 Nov 28, 2025
d37e027
Formatting
jzaia18 Nov 28, 2025
1ad4919
Make more tests pass
jzaia18 Nov 28, 2025
0799379
Update docs
jzaia18 Nov 29, 2025
f89312e
More tweaks to how resources are returned
jzaia18 Nov 29, 2025
8b0d16e
Fix more unit tests
jzaia18 Nov 29, 2025
3cb11ac
Yet more test tweaks
jzaia18 Nov 29, 2025
335caa4
More updates
jzaia18 Nov 29, 2025
039512a
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 1, 2025
cef960f
Fix last failing test
jzaia18 Dec 1, 2025
336e9c7
Merge branch 'chore/specs-outputs' of github.com:PennyLaneAI/pennylan…
jzaia18 Dec 1, 2025
4eb692d
Docs for SpecsResources
jzaia18 Dec 1, 2025
a63dcb1
Fix yet another test
jzaia18 Dec 1, 2025
592ffc0
Add docs for SpecsResult
jzaia18 Dec 1, 2025
243692d
These tests Q-Q
jzaia18 Dec 1, 2025
3f0c23a
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 1, 2025
3dfc168
Unit tests for SpecsResources
jzaia18 Dec 1, 2025
88eaec0
Merge branch 'chore/specs-outputs' of github.com:PennyLaneAI/pennylan…
jzaia18 Dec 1, 2025
7f833cd
Re-add tests for _count_resources
jzaia18 Dec 1, 2025
d2e5569
Re-add tests for _count_resources
jzaia18 Dec 1, 2025
53aa47d
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 1, 2025
ba0514c
Test to_dict
jzaia18 Dec 1, 2025
321d605
Tests for SpecsResult
jzaia18 Dec 1, 2025
ef97962
Merge branch 'chore/specs-outputs' of github.com:PennyLaneAI/pennylan…
jzaia18 Dec 1, 2025
cd117ba
Docs updates
jzaia18 Dec 1, 2025
e448e77
Update changelog
jzaia18 Dec 1, 2025
8f09c21
Update pennylane/devices/_qubit_device.py
jzaia18 Dec 1, 2025
35f6698
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 1, 2025
04285d0
Rename SpecsResult to CircuitSpecs
jzaia18 Dec 1, 2025
d8266ac
Missed one!
jzaia18 Dec 1, 2025
b4238ed
Update how multi-controlled gates are displayed in specs
jzaia18 Dec 1, 2025
3fd0bca
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 1, 2025
8de9d4c
Missed one!
jzaia18 Dec 1, 2025
be91036
Rename 1st transform level
jzaia18 Dec 1, 2025
b7ab2e9
Docs updates
jzaia18 Dec 2, 2025
93535e7
More docs updates
jzaia18 Dec 2, 2025
9322d20
Update formatting of null.qubit in docs
jzaia18 Dec 2, 2025
397a15e
Sphinx?
jzaia18 Dec 2, 2025
17691de
Indenting got messed up
jzaia18 Dec 2, 2025
4fc0da1
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 2, 2025
817500b
More docs fixes
jzaia18 Dec 2, 2025
d78e309
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 2, 2025
fd1e2fb
Merge branch 'main' into chore/specs-outputs
jzaia18 Dec 2, 2025
6bdefa1
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 2, 2025
682546e
Use new pass names
jzaia18 Dec 2, 2025
ca1a13f
Smarter compute_depth to avoid extraneous warnings
jzaia18 Dec 2, 2025
a5d76da
Oops
jzaia18 Dec 2, 2025
3081978
Better separation for pretty printing
jzaia18 Dec 2, 2025
239f9b7
Better output for 'level'
jzaia18 Dec 2, 2025
a435f85
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 2, 2025
60e90af
ipython display
jzaia18 Dec 2, 2025
a034f6d
Magical BLANKLINE incantations
jzaia18 Dec 2, 2025
c20c38a
Streamline resource conversion
jzaia18 Dec 2, 2025
ca47e4b
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 2, 2025
45a3ad9
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 2, 2025
0230d47
Apply suggestions from code review
jzaia18 Dec 2, 2025
c07f560
Format
jzaia18 Dec 2, 2025
970df34
Remove unused import
jzaia18 Dec 2, 2025
7453239
Make qml.specs work with the new marker transforms
jzaia18 Dec 2, 2025
b40c925
Remove 'pycon' codeblock
jzaia18 Dec 3, 2025
57a00b1
Add new unit test for qml.marker with qml.specs
jzaia18 Dec 3, 2025
b2bf47b
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 3, 2025
1d58ba4
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 3, 2025
a0012a5
Update how str is made
jzaia18 Dec 3, 2025
1fe81dd
Update docs
jzaia18 Dec 3, 2025
d18c41d
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 3, 2025
436aa81
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 3, 2025
55c3951
Bad return type
jzaia18 Dec 3, 2025
7410293
Small update
jzaia18 Dec 4, 2025
f81bae9
Return observable info within measurements for plain PL specs
jzaia18 Dec 4, 2025
5ce0ab4
Merge branch 'main' into chore/specs-outputs
jzaia18 Dec 4, 2025
53edb6d
Update unit tests
jzaia18 Dec 4, 2025
e63fdf4
Update docs
jzaia18 Dec 4, 2025
e65c72b
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 4, 2025
e1e3af3
Skip coverage on ipython display helper
jzaia18 Dec 4, 2025
65f7359
Changes for better marker behaviour
jzaia18 Dec 4, 2025
b3b2b24
Add hamiltonian tests
jzaia18 Dec 5, 2025
f78be3f
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 5, 2025
bca94d4
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
b7d54f4
Change how batching is handled
jzaia18 Dec 5, 2025
aba6550
Docs fixes
jzaia18 Dec 5, 2025
78f64ac
Apply suggestions from code review
jzaia18 Dec 5, 2025
7c4994a
Docs changes
jzaia18 Dec 5, 2025
1b31c14
Merge branch 'chore/specs-outputs' of github.com:PennyLaneAI/pennylan…
jzaia18 Dec 5, 2025
8f4e995
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
54c298a
Minor typo
jzaia18 Dec 5, 2025
bc1ff64
Switch back to list as possible output
jzaia18 Dec 5, 2025
34f2398
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
dcfee7b
Fix printing for CircuitSpecs
jzaia18 Dec 5, 2025
77e9543
Fix doctests
jzaia18 Dec 5, 2025
ab070dd
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
51ca4b1
Clean up specs output
jzaia18 Dec 5, 2025
9531387
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
ea8582f
Minor tweak
jzaia18 Dec 5, 2025
eebde8d
Placate codefactor
jzaia18 Dec 5, 2025
29ebfbb
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
294f2fb
More thorough testing for new batch output
jzaia18 Dec 5, 2025
5250274
Add more coverage
jzaia18 Dec 5, 2025
192849a
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 5, 2025
f3b7ec3
Apply suggestions from code review
jzaia18 Dec 6, 2025
74cfce3
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 6, 2025
b894da4
Implement Anton's suggestions
jzaia18 Dec 7, 2025
1031a2c
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 7, 2025
1e8a45a
Apply suggestions from code review
jzaia18 Dec 8, 2025
e80bd40
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 8, 2025
cf9c3b3
Update how hamiltonians are tracked
jzaia18 Dec 8, 2025
8efa45b
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 8, 2025
4268a68
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 8, 2025
a694229
Update test
jzaia18 Dec 8, 2025
39e4601
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 8, 2025
ac15ca0
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 8, 2025
4b3ee0c
Standardize how observables are printed
jzaia18 Dec 8, 2025
03045c3
Merge branch 'chore/specs-outputs' of github.com:PennyLaneAI/pennylan…
jzaia18 Dec 8, 2025
c03c44b
Doctests
jzaia18 Dec 8, 2025
1103800
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 8, 2025
842bbe8
Improve error messages for bad pass levels
jzaia18 Dec 8, 2025
fed1a3d
Update pennylane/resource/__init__.py
jzaia18 Dec 8, 2025
ff91811
Fix missing import
jzaia18 Dec 8, 2025
bb3fdab
Docs updates
jzaia18 Dec 8, 2025
6f797fc
Coverage
jzaia18 Dec 8, 2025
337ddf0
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 8, 2025
b9fcbf1
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 8, 2025
1a6e40d
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 8, 2025
ccbf8c6
Merge branch 'master' into chore/specs-outputs
jzaia18 Dec 9, 2025
7e3809b
Codecov
jzaia18 Dec 9, 2025
0a37c89
Merge branch 'chore/specs-outputs' into feature/specs-levels
jzaia18 Dec 9, 2025
9cd3a32
Merge branch 'main' into feature/specs-levels
jzaia18 Dec 9, 2025
cff98ee
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 9, 2025
f5005e3
Changelog entry
jzaia18 Dec 9, 2025
f7b0b9e
Merge branch 'feature/specs-levels' of github.com:PennyLaneAI/pennyla…
jzaia18 Dec 9, 2025
f442348
Streamline level parsing
jzaia18 Dec 9, 2025
0d783c5
Ensure sybil has xdsl installed for necessary doctests
jzaia18 Dec 9, 2025
3ebaf68
Ensure sybil has xdsl installed for necessary doctests
jzaia18 Dec 9, 2025
fd5609b
Fix doctest
jzaia18 Dec 9, 2025
0a1eea2
Fix wrong PR number
jzaia18 Dec 9, 2025
111414a
Coverage
jzaia18 Dec 9, 2025
dd836fb
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 9, 2025
93aed34
Maybe fix sphinx issues?
jzaia18 Dec 9, 2025
dd1a625
Coverage
jzaia18 Dec 9, 2025
8493183
Improve specs docstring
jzaia18 Dec 9, 2025
578ddff
Improve CircuitSpecs docstring
jzaia18 Dec 9, 2025
5a928be
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 10, 2025
c7f1815
Apply suggestions from code review
jzaia18 Dec 10, 2025
2f473e3
Apply suggestions from code review
jzaia18 Dec 11, 2025
12334e1
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 11, 2025
d7462ed
Apply some of Isaac's feedback
jzaia18 Dec 12, 2025
499a287
Rename 'qubits' -> 'wires'
jzaia18 Dec 12, 2025
4fea2b5
Show how to index into CircuitSpecs
jzaia18 Dec 12, 2025
5e8b12b
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 12, 2025
d930dc2
Apply suggestions from code review
jzaia18 Dec 15, 2025
ddc627d
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 15, 2025
e7a99b7
Format
jzaia18 Dec 15, 2025
623c74c
Apply suggestions from code review
jzaia18 Dec 15, 2025
1481a90
Docs update for compute depth
jzaia18 Dec 15, 2025
c5e966e
Merge branch 'feature/specs-levels' of github.com:PennyLaneAI/pennyla…
jzaia18 Dec 15, 2025
a9f8add
Update order of examples in specs docstring
jzaia18 Dec 15, 2025
114717a
Apply suggestion from @isaacdevlugt
jzaia18 Dec 15, 2025
45d9bf7
More docs tweaks
jzaia18 Dec 15, 2025
f32d55e
Formatting
jzaia18 Dec 15, 2025
035ac6d
Fix bug in transform level enumeration
jzaia18 Dec 15, 2025
d94b1b6
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 16, 2025
9fb8f1e
Apply suggestions from code review
jzaia18 Dec 16, 2025
d6d07a6
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 16, 2025
6616f34
Add better typing to specs args
jzaia18 Dec 17, 2025
fe2314e
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 17, 2025
315f0f1
Small docs tweak
jzaia18 Dec 17, 2025
412f48e
Merge branch 'master' into feature/specs-levels
jzaia18 Dec 17, 2025
076d636
Merge branch 'master' into feature/specs-levels
isaacdevlugt Dec 17, 2025
db3fae0
moved warning
isaacdevlugt Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/documentation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
needs: [determine_runner]
runs-on: ${{ needs.determine_runner.outputs.runner_group }}

name: Documentation Tests on Python 3.11
name: Documentation Tests on Python 3.11

steps:
- name: Checkout repository
Expand All @@ -43,22 +43,22 @@ jobs:
python-version: "3.11"

- name: Install pip and setuptools
run: |
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools

- name: Install Catalyst and Lightning (dev)
- name: Install Catalyst and Lightning (dev)
run: |
pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --pre --no-deps pennylane-catalyst pennylane-lightning

- name: Install dependencies
run: |
pip install --upgrade --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pennylane-catalyst pennylane-lightning
pip install -e .
pip install sybil pytest "jax==0.7.1" "jaxlib==0.7.1" torch matplotlib pyzx
pip install sybil pytest "jax==0.7.1" "jaxlib==0.7.1" torch matplotlib pyzx xdsl xdsl-jax
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on discussion in yesterday's meeting, we may want to pin the xdsl/-jax versions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the plan is to add these as Catalyst dependencies, this change wouldn't be needed at all (since we'd get these packages when we install Catalyst 2 steps prior)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan is to add them as dependencies 😁


- name: Print Dependencies
run: |
run: |
python -c "import pennylane as qml; qml.about()"
python -m pip list

Expand Down
112 changes: 85 additions & 27 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,64 @@

<h3>New features since last release</h3>

* :func:`~pennylane.specs` can now be used to analyze arbitrary compilation passes for
workflows compiled with :func:`~pennylane.qjit`.

```python
@qml.qjit
@qml.transforms.merge_rotations
@qml.transforms.cancel_inverses
@qml.qnode(dev)
def circuit(x):
qml.RX(x, wires=0)
qml.RX(x, wires=0)
qml.X(0)
qml.X(0)
qml.CNOT([0, 1])
return qml.probs()
```

The supplied levels may be individual `int` values, or an iterable of multiple levels.
The strings "all" and "all-mlir" are also allowed, and return all user-applied transforms
and MLIR passes, or all user-applied MLIR passes only respectively.

```pycon
>>> print(qml.specs(circuit, level=[1,2])(1.23))
Device: lightning.qubit
Device wires: 3
Shots: Shots(total=None)
Level: ['Before MLIR Passes (MLIR-0)', 'cancel-inverses (MLIR-1)']
<BLANKLINE>
Resource specifications:
Level = Before MLIR Passes (MLIR-0):
Total qubit allocations: 3
Total gates: 5
Circuit depth: Not computed
<BLANKLINE>
Gate types:
RX: 2
PauliX: 2
CNOT: 1
<BLANKLINE>
Measurements:
probs(all wires): 1
<BLANKLINE>
------------------------------------------------------------
<BLANKLINE>
Level = cancel-inverses (MLIR-1):
Total qubit allocations: 3
Total gates: 3
Circuit depth: Not computed
<BLANKLINE>
Gate types:
RX: 2
CNOT: 1
<BLANKLINE>
Measurements:
probs(all wires): 1
```
[(#8606)](https://github.com/PennyLaneAI/pennylane/pull/8606)

* Users can now perform rapid Clifford+T decomposition with QJIT and program capture enabled,
using the new :func:`~pennylane.transforms.gridsynth` compilation pass.
This pass discretizes ``RZ`` and ``PhaseShift`` gates to either the Clifford+T basis or to the PPR basis.
Expand All @@ -20,7 +78,7 @@
[(#8522)](https://github.com/PennyLaneAI/pennylane/pull/8522)

* The :func:`~pennylane.transforms.decompose` transform now accepts a `minimize_work_wires` argument. With
the new graph-based decomposition system activated via :func:`~pennylane.decomposition.enable_graph`,
the new graph-based decomposition system activated via :func:`~pennylane.decomposition.enable_graph`,
and `minimize_work_wires` set to `True`, the decomposition system will select decomposition rules that
minimizes the maximum number of simultaneously allocated work wires.
[(#8729)](https://github.com/PennyLaneAI/pennylane/pull/8729)
Expand Down Expand Up @@ -71,10 +129,10 @@
* Added a new decomposition, `_decompose_2_cnots`, for the two-qubit decomposition for `QubitUnitary`.
It supports the analytical decomposition a two-qubit unitary known to require exactly 2 CNOTs.
[(#8666)](https://github.com/PennyLaneAI/pennylane/issues/8666)
* Arithmetic dunder methods (`__add__`, `__mul__`, `__rmul__`) have been added to
:class:`~.transforms.core.TransformDispatcher`, :class:`~.transforms.core.TransformContainer`,
and :class:`~.transforms.core.TransformProgram` to enable intuitive composition of transform

* Arithmetic dunder methods (`__add__`, `__mul__`, `__rmul__`) have been added to
:class:`~.transforms.core.TransformDispatcher`, :class:`~.transforms.core.TransformContainer`,
and :class:`~.transforms.core.TransformProgram` to enable intuitive composition of transform
programs using `+` and `*` operators.
[(#8703)](https://github.com/PennyLaneAI/pennylane/pull/8703)

Expand All @@ -94,10 +152,10 @@
with :func:`~.specs` and :func:`~.drawer.draw` instead of having to increment ``level``
by integer amounts when not using any Catalyst passes.
[(#8684)](https://github.com/PennyLaneAI/pennylane/pull/8684)

The :func:`~.marker` function works like a transform in PennyLane, and can be deployed as
a decorator on top of QNodes:

```
from functools import partial

Expand Down Expand Up @@ -145,15 +203,15 @@
[(#8516)](https://github.com/PennyLaneAI/pennylane/pull/8516)
[(#8555)](https://github.com/PennyLaneAI/pennylane/pull/8555)
[(#8558)](https://github.com/PennyLaneAI/pennylane/pull/8558)
[(#8538)](https://github.com/PennyLaneAI/pennylane/pull/8538)
[(#8538)](https://github.com/PennyLaneAI/pennylane/pull/8538)
[(#8534)](https://github.com/PennyLaneAI/pennylane/pull/8534)
[(#8582)](https://github.com/PennyLaneAI/pennylane/pull/8582)
[(#8543)](https://github.com/PennyLaneAI/pennylane/pull/8543)
[(#8554)](https://github.com/PennyLaneAI/pennylane/pull/8554)
[(#8616)](https://github.com/PennyLaneAI/pennylane/pull/8616)
[(#8602)](https://github.com/PennyLaneAI/pennylane/pull/8602)
[(#8600)](https://github.com/PennyLaneAI/pennylane/pull/8600)
[(#8601)](https://github.com/PennyLaneAI/pennylane/pull/8601)
[(#8601)](https://github.com/PennyLaneAI/pennylane/pull/8601)
[(#8595)](https://github.com/PennyLaneAI/pennylane/pull/8595)
[(#8586)](https://github.com/PennyLaneAI/pennylane/pull/8586)
[(#8614)](https://github.com/PennyLaneAI/pennylane/pull/8614)
Expand Down Expand Up @@ -250,7 +308,7 @@
* `qml.transforms.map_wires` no longer supports plxpr transforms.
[(#8683)](https://github.com/PennyLaneAI/pennylane/pull/8683)

* ``QuantumScript.to_openqasm`` has been removed. Please use ``qml.to_openqasm`` instead. This removes duplicated
* ``QuantumScript.to_openqasm`` has been removed. Please use ``qml.to_openqasm`` instead. This removes duplicated
functionality for converting a circuit to OpenQASM code.
[(#8499)](https://github.com/PennyLaneAI/pennylane/pull/8499)

Expand Down Expand Up @@ -342,9 +400,9 @@
We recommend upgrading your version of NumPy to benefit from enhanced support and features.
[(#8578)](https://github.com/PennyLaneAI/pennylane/pull/8578)
[(#8497)](https://github.com/PennyLaneAI/pennylane/pull/8497)
* The ``custom_decomps`` keyword argument to ``qml.device`` has been deprecated and will be removed
in 0.45. Instead, with ``qml.decomposition.enable_graph()``, new decomposition rules can be defined as

* The ``custom_decomps`` keyword argument to ``qml.device`` has been deprecated and will be removed
in 0.45. Instead, with ``qml.decomposition.enable_graph()``, new decomposition rules can be defined as
quantum functions with registered resources. See :mod:`pennylane.decomposition` for more details.

* `qml.measure`, `qml.measurements.MidMeasureMP`, `qml.measurements.MeasurementValue`,
Expand Down Expand Up @@ -383,22 +441,22 @@
and the function should be passed to the ``stopping_condition`` argument instead.
[(#8533)](https://github.com/PennyLaneAI/pennylane/pull/8533)

The example below illustrates how you can provide a function as the ``stopping_condition`` in addition to providing a
``gate_set``. The decomposition of each operator will then stop once it reaches the gates in the ``gate_set`` or the
The example below illustrates how you can provide a function as the ``stopping_condition`` in addition to providing a
``gate_set``. The decomposition of each operator will then stop once it reaches the gates in the ``gate_set`` or the
``stopping_condition`` is satisfied.

```python
import pennylane as qml
from functools import partial

@partial(qml.transforms.decompose, gate_set={"H", "T", "CNOT"}, stopping_condition=lambda op: len(op.wires) <= 2)
@qml.qnode(qml.device("default.qubit"))
def circuit():
qml.Hadamard(wires=[0])
qml.Toffoli(wires=[0,1,2])
return qml.expval(qml.Z(0))
```

```pycon
>>> print(qml.draw(circuit)())
0: ──H────────╭●───────────╭●────╭●──T──╭●─┤ <Z>
Expand All @@ -421,34 +479,34 @@
* Bump `jax` version to `0.7.0` for `capture` module.
[(#8701)](https://github.com/PennyLaneAI/pennylane/pull/8701)

* Improve error handling when using PennyLane's experimental program capture functionality with an incompatible JAX version.
* Improve error handling when using PennyLane's experimental program capture functionality with an incompatible JAX version.
[(#8723)](https://github.com/PennyLaneAI/pennylane/pull/8723)

* Bump `autoray` package version to `0.8.2`.
[(#8674)](https://github.com/PennyLaneAI/pennylane/pull/8674)

* Update the schedule of nightly TestPyPI uploads to occur at the end rather than the beginning of all week days.
[(#8672)](https://github.com/PennyLaneAI/pennylane/pull/8672)

* Add workflow to bump Catalyst and Lightning versions in the RC branch, create a new release tag and draft release, tag the RC branch, and create a PR to merge the RC branch into master.
[(#8352)](https://github.com/PennyLaneAI/pennylane/pull/8352)

* Added `MCM_METHOD` and `POSTSELECT_MODE` `StrEnum` objects to improve validation and handling of `MCMConfig` creation.
[(#8596)](https://github.com/PennyLaneAI/pennylane/pull/8596)

* Updated various docstrings to be compatible with the new documentation testing approach.
[(#8635)](https://github.com/PennyLaneAI/pennylane/pull/8635)

* In program capture, transforms now have a single transform primitive that have a `transform` param that stores
the `TransformDispatcher`. Before, each transform had its own primitive stored on the
the `TransformDispatcher`. Before, each transform had its own primitive stored on the
`TransformDispatcher._primitive` private property. It proved difficult to keep maintaining dispatch behaviour
for every single transform.
[(#8576)](https://github.com/PennyLaneAI/pennylane/pull/8576)
[(#8639)](https://github.com/PennyLaneAI/pennylane/pull/8639)

* Updated documentation check workflow to run on pull requests on `v[0-9]+\.[0-9]+\.[0-9]+-docs` branches.
[(#8590)](https://github.com/PennyLaneAI/pennylane/pull/8590)

* When program capture is enabled, there is no longer caching of the jaxpr on the QNode.
[(#8629)](https://github.com/PennyLaneAI/pennylane/pull/8629)

Expand Down Expand Up @@ -542,12 +600,12 @@ A warning message has been added to :doc:`Building a plugin <../development/plug
* Update `interface-unit-tests.yml` to use its input parameter `pytest_additional_args` when running pytest.
[(#8705)](https://github.com/PennyLaneAI/pennylane/pull/8705)

* Fixes a bug where in `resolve_work_wire_type` we incorrectly returned a value of `zeroed` if `both work_wires`
* Fixes a bug where in `resolve_work_wire_type` we incorrectly returned a value of `zeroed` if `both work_wires`
and `base_work_wires` were empty, causing an incorrect work wire type.
[(#8718)](https://github.com/PennyLaneAI/pennylane/pull/8718)

* The warnings-as-errors CI action was failing due to an incompatibility between `pytest-xdist` and `pytest-benchmark`.
Disabling the benchmark package allows the tests to be collected an executed.
* The warnings-as-errors CI action was failing due to an incompatibility between `pytest-xdist` and `pytest-benchmark`.
Disabling the benchmark package allows the tests to be collected an executed.
[(#8699)](https://github.com/PennyLaneAI/pennylane/pull/8699)

* Adds an `expand_transform` to `param_shift_hessian` to pre-decompose
Expand Down
8 changes: 5 additions & 3 deletions pennylane/resource/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,11 @@ class CircuitSpecs:
num_device_wires (int): The number of wires on the device.
shots (Shots): The shots configuration used.
level (Any): The level of the specs (see :func:`~pennylane.specs` for more details).
resources (SpecsResources | dict[int | str, SpecsResources]): The resource specifications.
Depending on the ``level`` chosen, this may be a single :class:`.SpecsResources` object
or a dictionary of multiple :class:`.SpecsResources` objects.
resources (SpecsResources | list[SpecsResources] |
dict[int | str, SpecsResources | list[SpecsResources]]): The resource specifications.
Depending on the ``level`` chosen, this may be a single :class:`.SpecsResources` object,
a list of :class:`.SpecsResources` objects, or a dictionary mapping levels to their
corresponding outputs.

.. details::

Expand Down
Loading