forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add methods to retrieve info from channels config in backends (Qiskit…
…#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()
- Loading branch information
1 parent
5d6df9f
commit 9c2dfb9
Showing
4 changed files
with
219 additions
and
12 deletions.
There are no files selected for viewing
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
19 changes: 19 additions & 0 deletions
19
releasenotes/notes/fix-control-channel-logic-cdb45b7adae394d8.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
features: | ||
- | | ||
Added methods -- | ||
:mod:`qiskit.providers.models.PulseBackendConfiguration.get_channel_qubits(channel)` | ||
to get a list of all qubits operated by the given channel and | ||
:mod:`qiskit.providers.models.PulseBackendConfiguration.get_qubit_channel(qubits)` | ||
to get a list of channels operating on the given qubit. | ||
deprecations: | ||
- | | ||
Previously, ``control(channel)`` returned ``ControlChannel(channel)``. This logic | ||
was not accurate (Issue `#3311 <https://github.com/Qiskit/qiskit-terra/issues/3311>`__). | ||
The parameter ``channel`` has been deprecated. ControlChannel(index) is now generated from | ||
the backend configuration ``channels`` which has the information of all channels and the | ||
qubits they operate on. Now, the method | ||
:mod:`qiskit.providers.models.PulseBackendConfiguration.control` takes the parameter -- | ||
``qubits`` of the form **(control_qubit, target_qubit)** and type **list or tuple**, | ||
and returns a list of control channel(s). |
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
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