qiskit-aer icon indicating copy to clipboard operation
qiskit-aer copied to clipboard

Primitive `run_options` versus `options`

Open woodsp-ibm opened this issue 1 year ago • 3 comments

In Qiskit/qiskit-terra#8719 the primitive run_options was changed to options to align with the ibm runtime. Here in Aer the primitives still use run_options so switching from say using the reference Sampler in Terra sampler=Sampler(options={"shots": 100}) to importing the Aer Sampler instead fails.

TypeError: init() got an unexpected keyword argument 'options'

An issue was raised in Qiskit/qiskit-finance#254 but on further investigation it seems that the tutorial is in fact correct.

Maybe it just never got updated here in Aer, but having a different name for the same usage is likely to lead to further confusion and interoperability issues when switching between primitives.

woodsp-ibm avatar Apr 20 '23 19:04 woodsp-ibm

@ikkoham Could you answer to this request? You mentioned that you are planning to refactor run_options of primitive.

hhorii avatar Apr 24 '23 10:04 hhorii

@woodsp-ibm Thanks. The spec of options in qiskit-ibm-runtime may be changed in the future, so I do not want to change the Aer primitives' options now. After spec is fixed, I'll refactor this!

ikkoham avatar Apr 25 '23 14:04 ikkoham

Is there an update on this? This should be done ASAP as it easily leads to breaking code.

nonhermitian avatar Sep 28 '23 15:09 nonhermitian