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 support for compressed double factorization #6611

Merged
merged 41 commits into from
Nov 29, 2024

Conversation

obliviateandsurrender
Copy link
Contributor

Context: This adds a compressed-based double factorization routine with optional regularization.

Description of the Change: A compressed kwarg has been added to the pennylane.qchem.factorize function along with support for adding some compression-based kwargs.

Benefits: We have a more tunable and scalable method for obtaining double factorization.

Possible Drawbacks: N/A

Related GitHub Issues: [sc-72646]

Copy link
Contributor

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.

@obliviateandsurrender obliviateandsurrender changed the title add initial code Add support for compressed double factorization Nov 20, 2024
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (afb7e54) to head (9fb7ae7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6611   +/-   ##
=======================================
  Coverage   99.65%   99.65%           
=======================================
  Files         455      455           
  Lines       42936    42993   +57     
=======================================
+ Hits        42787    42844   +57     
  Misses        149      149           

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

Copy link
Contributor

@soranjh soranjh left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender, left some comments, the main ones being:

  1. Not sure we need hard-coded jax and jit optimisation.
  2. Will be great if the private functions called by factorise have same return type.

pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/resource/second_quantization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
Copy link
Contributor

@ddhawan11 ddhawan11 left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender. Left some minor comments.

pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
Copy link
Contributor

@DSGuala DSGuala left a comment

Choose a reason for hiding this comment

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

Looks good to me. Left some minor comments.

pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
Copy link
Contributor

@ddhawan11 ddhawan11 left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender, left some minor comments

pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
pennylane/qchem/factorization.py Outdated Show resolved Hide resolved
@obliviateandsurrender obliviateandsurrender merged commit 8ad0ab9 into master Nov 29, 2024
46 checks passed
@obliviateandsurrender obliviateandsurrender deleted the compressed-df branch November 29, 2024 17:10
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