Skip to content
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

[Capture] add plxpr_to_tape function #6343

Merged
merged 52 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e827977
exploring an idea
albi3ro Jun 21, 2024
33b946c
lightning interpreter
albi3ro Jun 21, 2024
bdc2b1e
add call jaxpr function
albi3ro Jun 21, 2024
5185112
add demo notebook
albi3ro Jun 21, 2024
786caf3
call is function transform
albi3ro Aug 9, 2024
d8f7e59
Merge branch 'master' into plxpr-interpreter
albi3ro Aug 13, 2024
13b091d
assorted improvements
albi3ro Aug 13, 2024
3f7b5ff
more moving things around
albi3ro Aug 13, 2024
6e2b334
something?
albi3ro Aug 15, 2024
4f3efb6
Merge branch 'master' into plxpr-interpreter
albi3ro Aug 21, 2024
a61acd2
Add PLxprInterpreter base class
albi3ro Aug 26, 2024
0d68f07
Merge branch 'master' into plxpr-interpreter-base
albi3ro Aug 26, 2024
1609ed3
qnode fix
albi3ro Aug 26, 2024
f4a6ba8
Merge branch 'plxpr-interpreter-base' of https://github.com/PennyLane…
albi3ro Aug 26, 2024
f593d45
starting to write tests
albi3ro Aug 27, 2024
0defdde
trying to improve op math handling
albi3ro Aug 28, 2024
0ecf1a8
testing
albi3ro Aug 30, 2024
65202fa
improvementS
albi3ro Aug 30, 2024
22e32f7
more fixes
albi3ro Sep 3, 2024
93724c4
Merge branch 'master' into plxpr-interpreter-base
albi3ro Sep 9, 2024
de6f4b3
Merge branch 'master' into plxpr-interpreter-base
albi3ro Sep 30, 2024
ba298eb
adding tests
albi3ro Oct 1, 2024
d9d9fd7
Merge branch 'master' into plxpr-interpreter-base
albi3ro Oct 1, 2024
1cc4e79
more tests
albi3ro Oct 1, 2024
1a8f410
more test changes
albi3ro Oct 2, 2024
769570f
Merge branch 'master' into plxpr-interpreter-base
albi3ro Oct 2, 2024
e8a5c5a
some more tests and polishing
albi3ro Oct 2, 2024
c42090c
Merge branch 'master' into plxpr-interpreter-base
albi3ro Oct 2, 2024
6f49902
add docs, use copy
albi3ro Oct 3, 2024
5bef8e3
Apply suggestions from code review
albi3ro Oct 3, 2024
db73482
add convert_to_tape function
albi3ro Oct 4, 2024
fc40a90
merging
albi3ro Nov 28, 2024
9197ea6
fixing up
albi3ro Nov 28, 2024
ab2a5f4
writing tests
albi3ro Dec 3, 2024
f7aaac9
Merge branch 'master' into convert-to-tape
albi3ro Dec 3, 2024
577a3eb
more test
albi3ro Dec 4, 2024
1a26906
moving things around
albi3ro Dec 9, 2024
bb01fba
moving things around and some tests
albi3ro Dec 9, 2024
65bcb45
Merge branch 'master' into convert-to-tape
albi3ro Dec 9, 2024
fbb6b9f
revert removal of make_qscript
albi3ro Dec 10, 2024
b6d419b
Merge branch 'master' into convert-to-tape
albi3ro Dec 10, 2024
0c142bc
remove duplicated tests
albi3ro Dec 10, 2024
1ea1b22
merge
albi3ro Dec 10, 2024
6d8d399
remove more duplicated code
albi3ro Dec 10, 2024
ddeddb5
fixing tests
albi3ro Dec 10, 2024
85f3ab3
Merge branch 'master' into convert-to-tape
albi3ro Dec 10, 2024
885f681
Apply suggestions from code review
albi3ro Dec 10, 2024
f9b57fe
trying to fix sphinx, more pragma no cover
albi3ro Dec 10, 2024
8db28a2
Update pennylane/tape/plxpr_conversion.py
albi3ro Dec 11, 2024
d1f39c3
Apply suggestions from code review
albi3ro Dec 11, 2024
aa8c6d1
rename jaxpr to plxpr
albi3ro Dec 12, 2024
d03a254
Merge branch 'master' into convert-to-tape
albi3ro Dec 12, 2024
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
Prev Previous commit
Next Next commit
Apply suggestions from code review
albi3ro authored Dec 10, 2024
commit 885f681d4f6109dafd265ae8d7eff255b5e4d674
3 changes: 1 addition & 2 deletions pennylane/capture/__init__.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@
~disable
~enable
~enabled
~convert_to_tape
~create_operator_primitive
~create_measurement_obs_primitive
~create_measurement_wires_primitive
@@ -61,7 +60,7 @@

.. currentmodule:: pennylane

..autosummary::
.. autosummary::
:toctree: api

~pennylane.tape.plxpr_to_tape

Unchanged files with check annotations Beta

try:
from .plxpr_conversion import plxpr_to_tape
except ImportError as e:

Check warning on line 25 in pennylane/tape/__init__.py

Codecov / codecov/patch

pennylane/tape/__init__.py#L25

Added line #L25 was not covered by tests
# pragma: no cover
def plxpr_to_tape(jaxpr: "jax.core.Jaxpr", consts, *args, shots=None):

Check warning on line 28 in pennylane/tape/__init__.py

Codecov / codecov/patch

pennylane/tape/__init__.py#L28

Added line #L28 was not covered by tests
"""A dummy version of ``plxpr_to_tape`` when jax is not installed on the system."""
raise ImportError("plxpr_to_tape requires jax to be installed")

Check warning on line 30 in pennylane/tape/__init__.py

Codecov / codecov/patch

pennylane/tape/__init__.py#L30

Added line #L30 was not covered by tests