-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 methods to retrieve info from channels config in backends #4097
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lcapelluto
reviewed
Apr 7, 2020
lcapelluto
suggested changes
Apr 7, 2020
SooluThomas
requested review from
ajavadia,
chriseclectic,
ewinston,
jyu00 and
mtreinish
as code owners
April 8, 2020 20:01
taalexander
reviewed
Apr 8, 2020
lcapelluto
reviewed
Apr 9, 2020
SooluThomas
changed the title
Add methods to retrieve info from channels config in backends
[WIP] Add methods to retrieve info from channels config in backends
Apr 9, 2020
SooluThomas
commented
Apr 9, 2020
lcapelluto
reviewed
Apr 10, 2020
lcapelluto
reviewed
Apr 14, 2020
lcapelluto
changed the title
[WIP] Add methods to retrieve info from channels config in backends
Add methods to retrieve info from channels config in backends
Apr 14, 2020
lcapelluto
previously approved these changes
Apr 14, 2020
taalexander
requested changes
Apr 15, 2020
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'm sorry, @lcapelluto convinced me that channels dict shouldn't be public. It looks good otherwise!
taalexander
previously approved these changes
Apr 15, 2020
|
This reverts commit d602738.
lcapelluto
previously approved these changes
Apr 15, 2020
taalexander
requested changes
Apr 15, 2020
taalexander
approved these changes
Apr 15, 2020
lcapelluto
approved these changes
Apr 15, 2020
kdk
approved these changes
Apr 15, 2020
lcapelluto
added
the
Changelog: New Feature
Include in the "Added" section of the changelog
label
Apr 30, 2020
faisaldebouni
pushed a commit
to faisaldebouni/qiskit-terra
that referenced
this pull request
Aug 5, 2020
…#4097) * Add get_channel_qubits method to get info from channels config * Add tests * Update docstrings * Remove unwanted imports * Review suggestions * Fix get_qubit_channels * Deprecation warning to use control(qubits: List) instead of control(channel: int) * typos * update the control based on the new backend schema * typos * More logic fixes * lint * lint * add older code * More logic fixes * lint * Update docstrings and typehints * Unused imports * Release notes * Review suggestions * Bug fix for get_qubit_channels(0) Updated tests too * Review Suggestions * lint * Change error message of _get_channel_prefix_index * Added raise error for backends without 'channel' information * Update docstrings for raise errors * Fix error messages and docstrings * make self.channels private * Remove collections.Counter * Revert "Remove collections.Counter" This reverts commit d602738. * change list() -> set()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changelog: New Feature
Include in the "Added" section of the changelog
mod: pulse
Related to the Pulse module
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes #3311 and adds methods
get_channel_qubits(channel)
to get a list of all qubits operated by the given channel.get_qubit_channels(qubit)
to get a list of channels operating on the given qubit.Details and comments
ControlChannels(qubit)
is now generated by using the data inchannels
in the backend configuration (added this to fake pulse backends in PR #4085).The backend configuration
channels
is a dictionary containing information of each channel -- their purpose, type, and qubits operated on.TODO