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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to no pad idle qubits in scheduling passes (#725)
* Add option to no pad idle qubits in scheduling passes This commit adds a new flag to the scheduling padding passes, schedule_idle_qubits, which is used to opt-in to scheduling idle qubits. By default these passes will only schedule qubits which are active. This is a change in behavior from before where the previous default is all qubits were scheduled. This was undesireable because it's adding uneceesary instructions to the job payload which will need to be processed which are effectively a no-op. The only real use case for adding delays to idle wires is visualization, so it's left as an option to re-enable the previous default. Fixes #723 Co-authored-by: Thomas Alexander <[email protected]> * Add missing inline type hint * Don't put barriers on idle qubits either * Fix formatting * Add schedule_idle_qubits to parent constructor * Reneable padding in control flow * Omit idle qubits in control flow * Run black --------- Co-authored-by: Thomas Alexander <[email protected]> Co-authored-by: Diego Ristè <[email protected]> Co-authored-by: Kevin Tian <[email protected]>
- Loading branch information
1 parent
f94cab5
commit 84818f9
Showing
7 changed files
with
359 additions
and
83 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
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.