-
Notifications
You must be signed in to change notification settings - Fork 61
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 dtype of CZ matrix #503
Conversation
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.
Thanks for finding this. Looking at the implementation of self.backend.cast
for the numpy and other backends, I believe that the final array, here self._CZ
will have the backend complex type regardless of the type of the original array m
, right? If this is true the self.dtype
used in all matrix definitions here is essentially useless.
I am not sure why the macos tests fail though.
Codecov Report
@@ Coverage Diff @@
## rmbackends #503 +/- ##
===========================================
Coverage 99.99% 99.99%
===========================================
Files 84 84
Lines 11853 11854 +1
===========================================
+ Hits 11852 11853 +1
Misses 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Given that we merged #500, I changed the base branch to |
@mlazzarin, yes, sure. I was planning to merge directly to master, but we can instead merge this in |
I may have found an unwanted behavior. The dtype of CZ matrix in
src/qibo/backends/matrices.py
isint64
but I think it should be equal to thedtype
property ofqibo.backends.matrices.Matrices
class.