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: typing issue for apply_hamiltonian #229

Merged
merged 5 commits into from
Mar 11, 2024
Merged

fix: typing issue for apply_hamiltonian #229

merged 5 commits into from
Mar 11, 2024

Conversation

math411
Copy link
Contributor

@math411 math411 commented Mar 8, 2024

Issue #, if available:

Description of changes:

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4f4fab) to head (9394799).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #229   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines         3745      3746    +1     
  Branches       910       910           
=========================================
+ Hits          3745      3746    +1     

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

@math411 math411 marked this pull request as ready for review March 11, 2024 17:45
@math411 math411 requested a review from a team as a code owner March 11, 2024 17:45
@math411 math411 requested a review from speller26 March 11, 2024 17:45
]

dk_tilde = [
np.linalg.solve(
np.eye(size_hilbert_space) + 1j * dt * _EIGVALS_A[i] * hamiltonian,
np.sum([_INV_EIGVECS_A[i][j] * kx[j] for j in range(_STAGES)], axis=0),
size_hilbert_space_eye_mat + 1j * dt * _EIGVALS_A[i] * hamiltonian,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to define size_hilbert_space_eye_mat when it's only used once?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This obj is being recreated for each iteration of _STAGES when iterated through on L119 and then passed on to the solver (np.linalg.solve) on L115

@math411 math411 merged commit c710dd9 into main Mar 11, 2024
33 checks passed
@math411 math411 deleted the hamil_typing branch March 11, 2024 18:28
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

2 participants