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
Bug in U2 gate parameter initialization #232
Labels
bug
Something isn't working
Comments
This is because we should use Let's fix it to make sure it runs with [0.1, 0.2] also |
I think it should be ? |
tring27
added a commit
to tring27/torchquantum
that referenced
this issue
Mar 12, 2024
Bug in U2 gate parameter initialization mit-han-lab#232
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the code I use that has some bugs related with parameter initialization(In dev branch):
U2 gate is the rotation gate with two parameters
U2 gate in qiskit
Running the above example will generate the following error message:
The error is caused by some strange manipulation on the dimension of the tensor, I don't understand why we have to use some squeeze and unsqueeze here.
It seems that many other gates with more than one parameters have similar issue. We should set the standard of how should user pass the parameters in. And perhaps more code comments in the above part can help developer to understand the convention of tensor dimensions.
The text was updated successfully, but these errors were encountered: