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

Add explicit serialization support for Obs and Ops binding classes for H distribution #591

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from

Conversation

mlxd
Copy link
Member

@mlxd mlxd commented Jan 11, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context: This PR adds explicit support for serialization and pickling of C++ bound classes in the Lightning backends. Additional functionality is added to validate this supports with scaled distribution of the pickled work using mpi4py.

Description of the Change: Enables explicit pickling support to C++ bound classes. Unlocks support for mpi4py concurrent futures API evaluation of pickled classes with forward pass and adjoint gradients of H.

Benefits: Allows immediate scaling evaluations of forward pass and adjoint gradients of Hamiltonians with LightningKokkos.

Possible Drawbacks: Functionality integration requires subtle architectural changes to better integrate with other backends in ecosystem.

Related GitHub Issues:

Shortcut Stories:
[sc-53909]

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.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.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (df43949) 98.18% compared to head (cb3f7ad) 98.38%.
Report is 1 commits behind head on master.

Files Patch % Lines
...ane_lightning/lightning_kokkos/lightning_kokkos.py 50.00% 4 Missing ⚠️
...ylane_lightning/lightning_qubit/lightning_qubit.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
+ Coverage   98.18%   98.38%   +0.19%     
==========================================
  Files          10      146     +136     
  Lines        1210    19324   +18114     
==========================================
+ Hits         1188    19011   +17823     
- Misses         22      313     +291     

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

@mlxd
Copy link
Member Author

mlxd commented Feb 6, 2024

Note: LUMI data collected using the current changes as of the latest commit.

@mlxd mlxd changed the title Add explicit serialization support for Obs and Ops binding classes Add explicit serialization support for Obs and Ops binding classes for H distribution Feb 6, 2024
@mlxd
Copy link
Member Author

mlxd commented Feb 6, 2024

Currently pausing development until a full integration strategy has been defined.

@mlxd mlxd added the do not merge Do not merge PR until this label is removed label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge PR until this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant