-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Resolves #262: add qiskit.backend methods... #363
Conversation
for getting parameter, calibration, and status.
1. Added to the quantum program warnings — may of done this incorrect 2. Removed old versions 3. In the configuration we lost the rewrite of the mapping. I agree we want to update the API but first we need the backend configuration to work 4. Made the test use quantum program Still to be done — check why failing some test — add some test to backend that test the test_basebackends that test new methods
@ewinston Thanks Erick. Getting I made some linter changes, and marked as approved. @jaygambetta is creating some extra features such as DeprecationWarnings, to warn users that support for these functions will be dropped from the |
@ewinston we decided that all new code should use the new map and all old code the older one. I have remove the complicated identity map we inserted :-)
Add a context manager for ensuring the DeprecationWarnings are shown regardless of the user configuration, as by default they are hidden for end users (ie. when not on an interpreter). Revise the strings for the warnings and add entries to the docstrings for visually showing them on the online docs.
Enable the display of deprecation warnings during qiskit.__init__ instead of via a context manager, for simplifying the deprecated calls and help providing visual aids for the editors.
@diego-plan9 Can we clarify what the QISKit convention for displaying warnings should be? |
Yes, they have a different semantic meaning (and also are treated differently): the short version is that |
These were pylint warnings. The configuration one was due to having a function of of the same name as a parameter in _backendutils.py.
@ajavadia @ewinston @diego-plan9 i think we are good. |
Fix several backendutils methods raising ConnectionError instead of LookupError when the entities were not found. Update the structure of those methods for simplicity and consistency. Fix commented out code on tests.
It seems we are indeed! I did some further plumbing at 864a068 (mostly, revising some lines that were commented probably inadvertently and homogenized a bit the family of |
* Resolves Qiskit#262: add qiskit.backend methods... for getting parameter, calibration, and status. * linting quantumprogram * Update _backendutils.py * Update _backendutils.py * Update _basebackend.py * Update _qeremote.py * Update _basebackend.py * Update _quantumprogram.py * Update _qeremote.py * Warning, updates to test, and backencs 1. Added to the quantum program warnings — may of done this incorrect 2. Removed old versions 3. In the configuration we lost the rewrite of the mapping. I agree we want to update the API but first we need the backend configuration to work 4. Made the test use quantum program Still to be done — check why failing some test — add some test to backend that test the test_basebackends that test new methods * Fixing some spelling and linting * Spelling fixes * Lint and spelling * Linter fixes and some spelling in backendutils * Cleaning up the coupling_map @ewinston we decided that all new code should use the new map and all old code the older one. I have remove the complicated identity map we inserted :-) * Renaming configuration as config to fix scope error * Linting in test * Linting more * Fixing the vqe * More linting * Update test_quantumprogram.py * lint errors I found trying to debug the error * Removing backend from quantum_program test * Making the backend object based * Adding tests for the backend object * Linting tests * Spelling and linting * Removing some set_api that are not needed * set log level to debug * Removing the api from the tests and needed by the program * Cleaning up and adding a discover * correct travis.yml env variable specification * Removing more old code * Updated lengths with rename of q_name and c_name * Lint errors found from travis fixed * Moving import order to help travis linter * Revise DeprecationWarnings, add note to docstrings Add a context manager for ensuring the DeprecationWarnings are shown regardless of the user configuration, as by default they are hidden for end users (ie. when not on an interpreter). Revise the strings for the warnings and add entries to the docstrings for visually showing them on the online docs. * Enable deprecation warnings during __init__ Enable the display of deprecation warnings during qiskit.__init__ instead of via a context manager, for simplifying the deprecated calls and help providing visual aids for the editors. * fix cyclic import and scope of configuration These were pylint warnings. The configuration one was due to having a function of of the same name as a parameter in _backendutils.py. * fix linter * remove converting coupling_map to dict * minor lint fix * Small fix to the backends. * Fix LookupErrors, style, comments Fix several backendutils methods raising ConnectionError instead of LookupError when the entities were not found. Update the structure of those methods for simplicity and consistency. Fix commented out code on tests.
Adds backend methods for getting parameter, calibration, and status similar to how calibration is currently retrieved.
Description
One difference between how this is implemented and configuration, however, is that these methods get query the device whenever the method is called whereas "configuration" only gets it when backends are discovered.
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: