-
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
Deprecate loose custom basis gates in preset pm pipieline #13394
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f5d10b
Deprecate loose custom basis gates
ElePT 02c5295
Filter from_configuration warning inside generate_preset_pm
ElePT c4fffc3
Fix reno
ElePT 8b46de7
Apply comments from Eli's code review. Refactor qsd code not to use t…
ElePT 1cf5a85
Add filter for target to backend props
ElePT 8058f34
Handle additional warnings triggered in tests
ElePT 3863549
Handle sneaky warnings. Not sure why they weren't triggered before.
ElePT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 18 additions & 0 deletions
18
releasenotes/notes/deprecate-custom-basis-gates-transpile-e4b5893377f23acb.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,18 @@ | ||
--- | ||
deprecations_transpiler: | ||
- | | ||
Providing custom gates through the ``basis_gates`` argument is deprecated | ||
for both :func:`.transpile` and :func:`generate_preset_pass_manager`, this functionality | ||
ElePT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
will be removed in Qiskit 2.0. Custom gates are still supported in the :class:`.Target` model, | ||
and can be provided through the ``target`` argument. One can build a :class:`.Target` instance | ||
from scratch or use the :meth:`.Target.from_configuration` method with the ``custom_name_mapping`` | ||
argument. For example:: | ||
|
||
from qiskit.circuit.library import XGate | ||
from qiskit.transpiler.target import Target | ||
|
||
basis_gates = ["my_x", "cx"] | ||
custom_name_mapping = {"my_x": XGate()} | ||
target = Target.from_configuration( | ||
basis_gates=basis_gates, num_qubits=2, custom_name_mapping=custom_name_mapping | ||
) |
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
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.
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.
Dead code now