-
Notifications
You must be signed in to change notification settings - Fork 604
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
use int64 for samples instead of bool8 #4539
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4539 +/- ##
=======================================
Coverage 99.66% 99.66%
=======================================
Files 376 376
Lines 33059 33060 +1
=======================================
+ Hits 32949 32950 +1
Misses 110 110
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sad that we have to do this, but it allows us to move forward.
Context:
The new qubit device was going to return booleans for 0-1 samples because that is what a boolean represents. However, this change is different from what we had before.
, and booleans still take a full byte of memory to stay aligned (let's not get too crazy here in Pythonland anyway) which is the same asnp.int8
.Description of the Change:
sample_state
, and consequentiallyqml.sample()
now returns samples of dtype=np.int64 instead of np.bool8.Benefits:
Possible Drawbacks:
np.bool8
was smaller