Skip to content
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

Handling of Aer kwargs for runs on IBMQ backends #1714

Closed
quantumjim opened this issue Jan 23, 2019 · 5 comments
Closed

Handling of Aer kwargs for runs on IBMQ backends #1714

quantumjim opened this issue Jan 23, 2019 · 5 comments
Labels
type: feature request New feature or request

Comments

@quantumjim
Copy link
Member

Sometimes I run jobs with a noisy simulator, and sometimes I run on real devices. It would be good to be able to do this with a single execute line

execute(qc,backend=backend,noise_model=noise_model,shots=shots,memory=True)

With noise_model=None when using a real device.

Currently this throws an exception because of the use of an Aer kwarg (noise_model in this case). I'd suggest making it throw an exception only when Aer kwargs are set to something non-trivial.

@ajavadia
Copy link
Member

This is partially addressed by Qiskit/qiskit-ibmq-provider#44, which adds these kwargs to IBMQ backends that are simulator. So you can submit your circuit and noise model to both local simulators and remote simulators.

But why do you want this for devices? i.e. why do you want to do

execute(qc,backend=backend,noise_model=None)

instead of just removing the kwarg and doing

execute(qc,backend=backend)

I would say that the expected behavior would be that noise models don't make sense for devices, so they don't even accept this option.

@quantumjim
Copy link
Member Author

My motivation is that I have applications that can be run on various backends, with and without noise models. Inside those applications I need to perform the execution, and sometimes this requires a big block of ifs and trys to deal with what is and isn't possible on all kinds of backends.

This will always be needed to some extent, I'm sure. But the easier it is, the better on the user. And allowing noise_model=None prevents the need for two different calls to execute.

@1ucian0
Copy link
Member

1ucian0 commented Dec 19, 2019

Currently, qiskit/execute.py:execute does not have noise_model argument. Is this issue still valid?

@1ucian0 1ucian0 added the type: feature request New feature or request label Dec 19, 2019
@nonhermitian
Copy link
Contributor

This is related to the run_config issue where backends do not ignore elements of run_config that they do not use.

@mtreinish
Copy link
Member

I'm closing this as fixed, with the backend's interface BackendV1 this works as expected either with backend.run() or execute. Aer backends expose a noise_model option in their options attributes which can be set via a kwarg on run (or via backend.set_options(noise_model=model), which adjusts the default value).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants