-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add backend refresh() method #1955
base: main
Are you sure you want to change the base?
Conversation
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.
can you also add a test?
instance=self._instance, | ||
): | ||
self._configuration = config | ||
self._get_properties(datetime=python_datetime.now()) |
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.
Looking at the code, _get_properties()
and properties()
seem to nearly identical, with the exception that the latter support refresh
. I wonder if we can consolidate them and just pass refresh=True
.
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.
Yeah I think we can consolidate the two methods - i'll do that when fixing #1956
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.
ok is the plan to use _get_properties(datetime)
in this PR and then switch to using properties()
after #1956 is done?
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.
Yeah I think it's easier that way
qiskit_ibm_runtime/ibm_backend.py
Outdated
): | ||
self._configuration = config | ||
self._get_properties(datetime=python_datetime.now()) | ||
self._get_defaults() |
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.
Looks like _get_defaults
also uses cached data if it already exists.
qiskit-ibm-runtime/qiskit_ibm_runtime/ibm_backend.py
Lines 251 to 253 in f8323dc
def _get_defaults(self) -> None: | |
"""Gets defaults if pulse backend and decodes it""" | |
if not self._defaults and isinstance(self._configuration, PulseBackendConfiguration): |
Summary
Details and comments
Fixes #