qiskit-aer
qiskit-aer copied to clipboard
Primitive `run_options` versus `options`
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.
@ikkoham Could you answer to this request? You mentioned that you are planning to refactor run_options
of primitive.
@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!
Is there an update on this? This should be done ASAP as it easily leads to breaking code.