qiskit-community / qiskit-braket-provider

Qiskit-Braket provider to execute Qiskit programs on quantum computing hardware devices through Amazon Braket.
https://qiskit-community.github.io/qiskit-braket-provider/
Apache License 2.0
57 stars 45 forks source link

Fix some Parameter translation edge cases #159

Closed jcjaskula-aws closed 2 months ago

jcjaskula-aws commented 4 months ago

Summary

The transpiler sometimes returns payloads that we don't translate well. This PR fixes a couple of issues I ran into.

Details and comments

yitchen-tim commented 4 months ago

Parameter can sometimes be composed of only a single numerical values, which is not translated to a FreeParameter.

Could you elaborate on this point a bit? Do you mean the qiskit's parameter is a single parameter instead of a List? If so, I'm not sure which part fixes this.

jcjaskula-aws commented 4 months ago

Could you elaborate on this point a bit? Do you mean the qiskit's parameter is a single parameter instead of a List? If so, I'm not sure which part fixes this.

Parameter(1.23) is valid and cannot be translated to a FreeParameter object. So we just return a float here.

jcjaskula-aws commented 2 months ago

It is probably worth investigating the problem fixed here in a bigger picture. Closing.