This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
Add option to no pad idle qubits in scheduling passes #725
Merged
kt474
merged 11 commits into
Qiskit:main
from
mtreinish:pad-idle-qubits-at-your-own-risk
Sep 22, 2023
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ba5e587
Add option to no pad idle qubits in scheduling passes
mtreinish 29b9e7b
Add missing inline type hint
mtreinish 49bc1ef
Don't put barriers on idle qubits either
mtreinish 49390e0
Fix formatting
mtreinish 6d47404
Add schedule_idle_qubits to parent constructor
dieris 964c416
Reneable padding in control flow
dieris 8a9ee5c
Omit idle qubits in control flow
dieris 454fb28
Merge pull request #1 from dieris/dr/pad-control-flow
mtreinish 6574b44
Merge branch 'main' into pad-idle-qubits-at-your-own-risk
mtreinish bc5893c
Run black
mtreinish c7cec73
Merge branch 'main' into pad-idle-qubits-at-your-own-risk
kt474 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
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
20 changes: 20 additions & 0 deletions
20
releasenotes/notes/scheduling-no-idle-bbadd1e95d2a71b8.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,20 @@ | ||
--- | ||
features: | ||
- | | ||
Added a new flag, ``schedule_idle_qubits`` to the constructor for the | ||
:class:`.PadDelay` and :class:`.PadDynamicalDecoupling` passes. This | ||
flag when set to ``True`` will have the scheduling passes insert a full | ||
circuit duration delay on any idle qubits in the circuit. | ||
upgrade: | ||
- | | ||
The default behavior of the :class:`.PadDelay` and | ||
:class:`.PadDynamicalDecoupling` passes for idle qubits in the circuit | ||
have changed. Previously, by default the passes would schedule any idle | ||
qubits in the circuit by inserting a delay equal to the full circuit | ||
duration. This has been changed so by default only active qubits are | ||
scheduled. This change was made because the extra delays were additional | ||
overhead in the job payload that were effectively a no-op so they added | ||
extra overhead to job submission for no gain. If you need to restore | ||
the previous behavior you can instantiate :class:`.PadDelay` or | ||
:class:`.PadDynamicalDecoupling` with the keyword argument | ||
``schedule_idle_qubits=True`` which will restore the previous behavior. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
only nitpicking here, perhaps rename
fast_path_node
toskip_padding
or something like that, as there are two different conditions for that to happenThere 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.
On a second thought, I'm not sure we want to disable padding within the control flow here. As a result of this (and related changes at L163-169), this circuit will miss padding (and potentially DD) in the conditional block:
Whereas the expected behavior should be (reverting those changes):