Open yaelbh opened 2 years ago
As I stated in #9439 right now the fake backends pass the circuit directly to aer (or basicaer if aer isn't installed) with a noise model set to simulate the circuit with the backend's properties. If aer isn't enforcing this for us based on the noise model then we will have to do validation on input circuits in the fake backend's run method directly. Basically just check that all(x.num_qubits == self.num_qubits for x in run_input)
and a similar check for basis gates on each input before passing the circuit to the simulator.
Hi there, Can I be assigned to this issue please?
Hi, if this issue hasn't been assigned and has no WIP PRs at the moment, @andrea-miramonserr and I would like to work on this! Could we be assigned to the issue?
@Theo-Reignier @NelsonOoi @Andrea-MiramonSerr Hi all, you've expressed interest in this issue previously but it slipped through the cracks. If you are still interested in and available to contribute to this issue please ping me here and I will assign the issue to the first responder.
@AngeloDanducci, I'd like to take this issue if that's okay! (I'm also a newcomer 😄)
@JustinWoodring assigned, thanks!
Environment
What is happening?
Fake backends' behavior is sometimes different from their corresponding real devices.
Concretely, a device won't run a circuit that contains gates that do not belong to the set of basis gates. The fake backend will run the circuit.
Similarly, the device won't run a circuit that refers to non-existing qubits, while the fake backend will.
How can we reproduce the issue?
Code:
Output:
What should happen?
My understanding of the role of the fake backends is that they should mimic as much as possible the behavior of the device. If this view is correct, then in the code snippet above they should raise exceptions similar to the device, and set the job status to ERROR.
Any suggestions?
No response