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

Update Emulator interface. #943

Merged
merged 18 commits into from
May 29, 2024
Merged

Update Emulator interface. #943

merged 18 commits into from
May 29, 2024

Conversation

weinbe58
Copy link
Member

@weinbe58 weinbe58 commented May 15, 2024

  • Space.zero_state() now returns a StateVector object
  • AnalogGate all public APIs accept/return StateVector
  • Adding StateVector.sample and StateVector.normalize API's
  • Adding tocsr to RydbergHamiltonian for interacting with external packages.
  • Fix bug where __hash__ and __eq__ do not match for Register.

@weinbe58 weinbe58 marked this pull request as draft May 15, 2024 14:28
Copy link
Contributor

github-actions bot commented May 15, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-29 15:17 UTC

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 93.69369% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 89.89%. Comparing base (98e2d0f) to head (f62fae6).

Files Patch % Lines
src/bloqade/emulate/ir/state_vector.py 96.20% 3 Missing ⚠️
src/bloqade/emulate/ir/emulator.py 77.77% 2 Missing ⚠️
src/bloqade/emulate/ir/space.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #943      +/-   ##
==========================================
+ Coverage   89.76%   89.89%   +0.13%     
==========================================
  Files         110      110              
  Lines        8031     8088      +57     
==========================================
+ Hits         7209     7271      +62     
+ Misses        822      817       -5     

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

Copy link
Collaborator

@johnzl-777 johnzl-777 left a comment

Choose a reason for hiding this comment

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

If we're confident this is the way to go for the Hamiltonian API it would be nice to get some additional tests although that can be in a separate PR if necessary

pyproject.toml Show resolved Hide resolved
@weinbe58 weinbe58 marked this pull request as ready for review May 29, 2024 02:11
@weinbe58 weinbe58 requested a review from johnzl-777 May 29, 2024 02:18
@weinbe58 weinbe58 enabled auto-merge (squash) May 29, 2024 14:30
@weinbe58 weinbe58 disabled auto-merge May 29, 2024 15:14
@weinbe58 weinbe58 merged commit 0317977 into main May 29, 2024
10 checks passed
@weinbe58 weinbe58 deleted the improve-emu-api branch May 29, 2024 15: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.

2 participants