-
Notifications
You must be signed in to change notification settings - Fork 163
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
Qiskit Runtime Sampler , sampler not taking the argument "backend" #1033
Comments
It seems to be a problem related with an out-of-sync version of
If lower than |
@sirgeorgesawcon Where did you import that
|
@sirgeorgesawcon if you're using the latest version of from qiskit_ibm_runtime import QiskitRuntimeService, Sampler
service = QiskitRuntimeService(channel="ibm_quantum")
backend = service.backend("ibmq_qasm_simulator")
sampler = Sampler(backend=backend) |
Hi, Yes, It is running perfectly now, thanks, The issue was that in the big file of imports, I was importing I understand that |
Closing for now, following up discussion in #1043 |
Environment
What is happening?
Following the Qiskit tutorial on sampler : https://qiskit.org/ecosystem/ibm-runtime/tutorials/how-to-getting-started-with-sampler.html
while invoking the Qiskit runtime sampler, with any backend (backend =
ibmq_qasm_simulator
) and then running thesampler = Sampler(backend=backend)
gives the error: TypeError: Sampler.init() got an unexpected keyword argument 'backend'
It should not happen, since the sampler function in qiskit takes in the following input
but here it's flagging
backend
as unexpected keywordHow can we reproduce the issue?
What should happen?
Sampler should take in the
backend
and then when executed with a quantum circuit qc should return the job results.Any suggestions?
No response
The text was updated successfully, but these errors were encountered: