Closed LenaPer closed 1 year ago
I don't think this is actually a bug. The backend()
method just selects a backend given some parameters - it does not select an instance. To select an instance within a session, it would be done through options
backend = service.backend(name='ibmq_qasm_simulator')
options = Options(instance='ibm-q/open/main')
with Session(service=service, backend=backend) as session:
sampler = Sampler(session=session, options=options)
job = sampler.run(bell, shots=1024)
print(f"Job ID: {job.job_id()}")
@jyu00 thoughts on this?
I think we should honor the h/g/p selection because that's what most users would expect. @kt474 I think you had code to fix a similar issue in qiskit-ibm-provider
(by attaching h/g/p to the backend instance).
Describe the bug When I want to specify which instance to use when loading a backend before using it in a session (available through multiple providers with my account), I noticed on the job page in iqx that it completely ignores which instance is specified. Also noticed that when I don't specify anything, it will choose the same premium provider by default each time.
Steps to reproduce This doesn't work :
This does :
Expected behavior When I load
backend=service.backend(name='ibmq_quito', instance='ibm-q/open/main')
, the session should run through the right specified provider.Suggested solutions
Additional Information