amazon-braket / amazon-braket-sdk-python

A Python SDK for interacting with quantum devices on Amazon Braket
https://aws.amazon.com/braket/
Apache License 2.0
301 stars 117 forks source link

possible confusion of gate assignement #282

Closed mimigdal closed 3 years ago

mimigdal commented 3 years ago

Describe the bug When using a rotate gate (such as RZ), if by mistake the user swaps the order of the parameters, no error flag is risen. This is a potential issue because in QISKIT, the order of the parameters is the opposite (i.e., first the angle and then the qubit).

To reproduce qc.rz(np.pi/2,1) This is interpreted as a rotation of $1$ radian on the second qubit, i.e. $floor(np.pi/2)=1$. Instead, it should be interpreted as an error, to avoid potential mistakes.

Expected behavior The gate should check that the first parameter (i.e. the gate index) is an integer. If a float is sent, the gate should given an error.

krneta commented 3 years ago

Hi,

Thank you very much for your feedback!

We believe we fixed this issue in v1.6.5. Could you please check your SDK version and update per instructions here.

If you're already using the latest version, and still see this problem, please reach out again and we'll look into it. If updating the SDK fixes your issue, please mark this issue as solved/closed.

mimigdal commented 3 years ago

Thanks Milan. You're right. This bug was fixed in the present version. Thanks!

On Mon, Oct 11, 2021 at 1:32 PM Milan @.***> wrote:

Hi,

Thank you very much for your feedback!

We believe we fixed this issue in v1.6.5 https://github.com/aws/amazon-braket-sdk-python/releases/tag/v1.6.5. Could you please check your SDK version and update per instructions here https://github.com/aws/amazon-braket-sdk-python#updating-the-amazon-braket-python-sdk .

If you're already using the latest version, and still see this problem, please reach out again and we'll look into it. If updating the SDK fixes your issue, please mark this issue as solved/closed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aws/amazon-braket-sdk-python/issues/282#issuecomment-940333087, or unsubscribe https://github.com/notifications/unsubscribe-auth/APEAB2QRSJEWVZ5T3YCWD2TUGMUUZANCNFSM5FW7MKNA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.