-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Refactor] Batch dimension as first dimension in tensors #11
Comments
@Brogis1 Could you please add a small code snippets to the description above? |
Right now the PyQ convention is made to align with the qubit index (qubit indices between 0, ... n-1 coincide with the dimensions 0, ... n-1 of the tensor). I think however that changing it would not be too much problematic for the usage. It seems that there is no critical reason for the batch to be last dimension, so I would be in favor to change it as you suggest. Implementing both conventions seems hard because we would make all functions like |
@dominikandreasseitz Is this still relevant ? I have the feeling it is closeable. |
I think long-term it would make sense to make the switch |
Problem
Right now we have the batch dimension at the back of tensors in PyQ. However, in PyTorch it is in front.
Consequence
This entails reshaping tensors back and forth to make them compatible with PyTorch/PyQ convention. Hence, there are unnecessary code lines just for that.
Suggested Solution
We can make it possible to have both conventions (with a keyword argument) or just one (for instance, the batch dimension is the first and not last in PyQ tensors).
The text was updated successfully, but these errors were encountered: