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

Make shallow circuit demo Catalyst-Compatible #816

Merged
merged 26 commits into from
Jul 8, 2024

Conversation

tzunghanjuang
Copy link
Collaborator

@tzunghanjuang tzunghanjuang commented Jun 14, 2024

Context:
Convert Shallow Circuit Demo into a Catalyst-compatiable one.

Description of the Change: Mainly replace jax.jit with qjit. However, it introduces errors related to functools.partial (#814 and #815). Right now I circumvent the errors by avoiding using functools.partial. Will open the other PRs to fix the issues.

  • Since catalyst has trouble parsing State information from optax optimizers, we use pytree to handle such information.
  • Also exclude optax from the AutoGraph conversion.

Related GitHub Issues:
[sc-65901]

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/changelog.md on your branch 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.

Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Thanks @tzunghanjuang !

doc/index.rst Outdated Show resolved Hide resolved
demos/qml/tutorial_learningshallow.ipynb Outdated Show resolved Hide resolved
@paul0403
Copy link
Contributor

Just a note that codecov/project coverage failure usually means (a) the feature branch's new feature is not covered by a new test and/or (b) the feature branch is out of sync with main branch.

demos/qml/tutorial_learningshallow.ipynb Outdated Show resolved Hide resolved
demos/qml/tutorial_learningshallow.ipynb Outdated Show resolved Hide resolved
@tzunghanjuang tzunghanjuang requested a review from dime10 July 3, 2024 13:57
Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

Nice work on the demo, it seems like it uncovered quite a few issues for us so that's great!

frontend/catalyst/autograph/ag_primitives.py Show resolved Hide resolved
demos/qml/tutorial_learningshallow.ipynb Outdated Show resolved Hide resolved
demos/qml/tutorial_learningshallow.ipynb Show resolved Hide resolved
demos/qml/tutorial_learningshallow.ipynb Show resolved Hide resolved
tzunghanjuang and others added 2 commits July 5, 2024 10:53
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Co-authored-by: David Ittah <dime10@users.noreply.github.com>
Copy link
Contributor

@dime10 dime10 left a comment

Choose a reason for hiding this comment

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

🎉

@tzunghanjuang tzunghanjuang merged commit bd09fe1 into main Jul 8, 2024
45 checks passed
@tzunghanjuang tzunghanjuang deleted the learningshallow-demo branch July 8, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants