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

Register QuantumScript and QuantumTape as pytrees #4608

Merged
merged 12 commits into from
Sep 21, 2023
Merged

Conversation

albi3ro
Copy link
Contributor

@albi3ro albi3ro commented Sep 18, 2023

QuantumScript and QuantumTape now have _flatten and _unflatten methods and are registered as jax pytrees.

[sc-40589]

Base automatically changed from measurement-process-pytree to master September 20, 2023 20:25
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (408c4f7) 99.63% compared to head (c76f4f5) 99.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4608   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files         375      375           
  Lines       33536    33547   +11     
=======================================
+ Hits        33412    33423   +11     
  Misses        124      124           
Files Changed Coverage Δ
pennylane/measurements/__init__.py 100.00% <ø> (ø)
pennylane/tape/qscript.py 100.00% <100.00%> (ø)
pennylane/tape/tape.py 98.57% <100.00%> (+0.02%) ⬆️

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

@albi3ro albi3ro marked this pull request as ready for review September 21, 2023 14:16
@albi3ro albi3ro requested a review from a team September 21, 2023 16:51
pennylane/tape/tape.py Show resolved Hide resolved
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.

very cool 😎 🌵

@albi3ro albi3ro enabled auto-merge (squash) September 21, 2023 20:19
@albi3ro albi3ro merged commit f56e4fe into master Sep 21, 2023
39 checks passed
@albi3ro albi3ro deleted the qscript-pytree branch September 21, 2023 21:14
mudit2812 pushed a commit that referenced this pull request Sep 22, 2023
`QuantumScript` and `QuantumTape` now have `_flatten` and `_unflatten`
methods and are registered as jax pytrees.

[sc-40589]
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.

None yet

3 participants