-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fixes a bug where backend_options
would be passed to backends that don't support it.
#51
Conversation
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 99.34% 99.35% +<.01%
==========================================
Files 8 8
Lines 307 311 +4
==========================================
+ Hits 305 309 +4
Misses 2 2
Continue to review full report at Codecov.
|
backend_options
would be passed to backends that don't support it.backend_options
would be passed to backends that don't support it.
backend_options
would be passed to backends that don't support it.backend_options
would be passed to backends that don't support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, but a couple small questions and comments
super().__init__(wires, qiskit.Aer, backend=backend, shots=shots, **kwargs) | ||
self._noise_model = noise_model | ||
|
||
def run(self, qobj): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this was removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this was part of the same bug. There were no tests for noise models, so it wasn't picked up. Since the logic for kwargs is now part of the base class, this method is redundant and can be removed.
Context: The current
QiskitDevice
assumes that all backends accept backend options, but this isn't the case --- hardware backends on IBMQ do not accept backend options. This leads to anTypeError
for hardware-bound jobs.Description of change:
inspect.signature
is used to determine what keyword arguments the backend supports.A new attribute
self.run_args
is now used to correctly store a dictionary of allowed keyword arguments.Version number incrementation for a minor bugfix release.
Benefits: Fixes the bug
GitHub Issues: https://discuss.pennylane.ai/t/pennylane-qiskit-error/204