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

Update drawer catalyst and add draw_mpl #4815

Merged
merged 39 commits into from
Nov 30, 2023
Merged

Conversation

rmoyard
Copy link
Contributor

@rmoyard rmoyard commented Nov 9, 2023

Description of the Change:

  • Update how to check if Catalyst available
  • Add draw mpl

maliasadi and others added 27 commits October 17, 2023 22:01
…e. Add the AvailableCompilers dataclass and update tests
**Context:** Catalyst frontend is being integrated into PL

**Description of the Change:** Attempt to add Catalyst to intersphinx to
help with cross referencing of docs

**Benefits:**

**Possible Drawbacks:**

[sc-46399]

---------

Co-authored-by: Ali Asadi <[email protected]>
From the doc page of
[pkg_resources](https://setuptools.pypa.io/en/latest/pkg_resources.html):

> Use of pkg_resources is deprecated in favor of
[importlib.resources](https://docs.python.org/3.11/library/importlib.resources.html#module-importlib.resources),
[importlib.metadata](https://docs.python.org/3.11/library/importlib.metadata.html#module-importlib.metadata)
and their backports
([importlib_resources](https://pypi.org/project/importlib_resources),
[importlib_metadata](https://pypi.org/project/importlib_metadata)). Some
useful APIs are also provided by
[packaging](https://pypi.org/project/packaging) (e.g. requirements and
version parsing). Users should refrain from new usage of pkg_resources
and should work to port to importlib-based solutions.

PR #4783 updates all occurrences of `pkg_resources` with
`importlib.metadata` across the entire PL. This PR, however, addresses
this replacement in the compiler driver, which has not yet been merged
into PL.

[sc-46399]
Context:
This PR adds support for QJIT compatible `qml.jacobian` and `qml.grad`.
Please see ADR 74 for implementation details.

[sc-46406]

---------

Co-authored-by: Josh Izaac <[email protected]>
Copy link
Contributor

github-actions bot commented Nov 9, 2023

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@rmoyard
Copy link
Contributor Author

rmoyard commented Nov 9, 2023

[sc-48842]

Copy link
Contributor

@timmysilv timmysilv left a comment

Choose a reason for hiding this comment

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

2 non-blocking comments, but I checked out the branch and drew the tests and they look good!

pennylane/drawer/draw.py Outdated Show resolved Hide resolved
tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

Thanks @rmoyard! 🎉

tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
tests/drawer/test_draw_catalyst.py Outdated Show resolved Hide resolved
pennylane/drawer/draw.py Outdated Show resolved Hide resolved
Base automatically changed from maa/integrate-catalyst-2 to master November 28, 2023 17:25
@rmoyard rmoyard requested a review from maliasadi November 29, 2023 18:18
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (48aeec8) 99.65% compared to head (4fa5ebe) 99.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4815      +/-   ##
==========================================
- Coverage   99.65%   99.64%   -0.02%     
==========================================
  Files         387      387              
  Lines       35018    34756     -262     
==========================================
- Hits        34898    34633     -265     
- Misses        120      123       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@maliasadi
Copy link
Member

LGTM 🎉

@rmoyard rmoyard enabled auto-merge (squash) November 30, 2023 21:13
@rmoyard rmoyard merged commit e043de2 into master Nov 30, 2023
34 checks passed
@rmoyard rmoyard deleted the update_drawer_catalyst branch November 30, 2023 21:17
mudit2812 pushed a commit that referenced this pull request Dec 7, 2023
**Description of the Change:**

- Update how to check if Catalyst available
- Add draw mpl

---------

Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Josh Izaac <[email protected]>
Co-authored-by: David Ittah <[email protected]>
Co-authored-by: Matthew Silverman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants