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

Fix Forte [Ambit Part] #53

Merged
merged 2 commits into from
Mar 26, 2022
Merged

Conversation

JonathonMisiewicz
Copy link
Collaborator

@JonathonMisiewicz JonathonMisiewicz commented Mar 26, 2022

This PR makes changes so that Psi can do DIIS on an ambit.BlockedTensor, as required by the forte plugin.

This PR accomplishes the following, as needed by this Psi PR:

  • Exposes the load_blocked_tensor method to Python as BlockedTensor.load
  • Changes the save function for BlockedTensor to a method, and exposes it py-side
  • Creates, exposes, and tests a method to clone a BlockedTensor
  • Creates, exposes, and tests a method to compute a dot product of BlockedTensor
  • Creates, exposes, and tests a method to axpy BlockedTensor

@fevangelista @lcyyork

Copy link
Owner

@jturney jturney 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!

@fevangelista
Copy link
Collaborator

This looks good to me. A comment on the style. Before this PR, load/save were implemented as free functions. I agree that save can be moved to a class function, but this now puts load/save in two different parts (free/member). Then perhaps it would a good idea to make save a static class function. I am curious how other codes handle this aspect. @jturney: any thoughts on this?

Copy link
Collaborator

@fevangelista fevangelista 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. Can I squash/merge?

@JonathonMisiewicz
Copy link
Collaborator Author

That's fine with me, but I can also finish moving save/load to class functions if you want.

Jet's policy has been that if tests are passing and he's approved, it's good to merge.

@robparrish
Copy link
Collaborator

robparrish commented Mar 26, 2022 via email

@fevangelista
Copy link
Collaborator

Then let's do class functions (good to see you here @robparrish!).

@JonathonMisiewicz
Copy link
Collaborator Author

Done. The static function load is now called load_and_build.

@fevangelista fevangelista merged commit f967974 into jturney:master Mar 26, 2022
@JonathonMisiewicz JonathonMisiewicz deleted the hattrick branch March 26, 2022 22:14
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