-
Notifications
You must be signed in to change notification settings - Fork 3
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
CupyBackend
matrices are np.ndarray
s
#196
Comments
I believe that there were some discussion about this in the past qiboteam/qibo#928 |
Mmmh I see, I would still argue that at some point you have to cast to |
This was true at the time but it changed since the |
Indeed, I would say that in general we should cast to whichever type is necessary as long as we don't trigger qiboteam/qibo#928 (or we find an alternative solution for it). |
While working on qiboteam/qibo#1548 I noticed that if you try to get the matrices from the
CupyBackend
, namely:you get a
np.ndarray
rather than acp.ndarray
. This does not seem to be the case for other backends that do not havenp.ndarray
as native arrays, e.g.PyTorchBackend
orTensorflowbackend
.I was wondering what was the reason behind this, because this makes some things in qiboteam/qibo#1548 more annoying, requiring for you to explicitely cast to cupy arrays when needed.
The text was updated successfully, but these errors were encountered: