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

Directly handle constant term in the MPO #37

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Directly handle constant term in the MPO #37

merged 2 commits into from
Nov 15, 2024

Conversation

awhite862
Copy link
Collaborator

For sparse MPOs (specifically SparseHamiltonian, DiagonalCoulomb and Diagonal), handle any constant directly as a term in the MPO instead of via the const attribute.

Related to #36

@hczhai
Copy link

hczhai commented Nov 14, 2024

Looks good to me.

Maybe use const=0.0 instead of const=0 to match the argument type.

@awhite862 awhite862 requested a review from JProvazza November 15, 2024 00:22
@JProvazza
Copy link
Contributor

Looks good!

@JProvazza JProvazza closed this Nov 15, 2024
@JProvazza JProvazza reopened this Nov 15, 2024
@JProvazza JProvazza merged commit 5f84159 into main Nov 15, 2024
2 checks passed
@JProvazza JProvazza deleted the const-mpo-fix branch November 15, 2024 01:15
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.

3 participants