Improve ConsolidateBlocks documentation#15890
Open
mtreinish wants to merge 2 commits intoQiskit:mainfrom
Open
Conversation
The consolidate blocks transpiler pass was lacking concrete documentation on it's operation. Especially for how it iteracted with other passes and specific property set fields. This commit aims to close that gap and explicitly document how the pass behaves, both in the expected current configuration as well as the still supported legacy operation modes.
Collaborator
|
One or more of the following people are relevant to this code:
|
|
|
||
| There are two legacy modes of operation for this pass based on whether either ``block_list`` or | ||
| ``run_list`` is set in the property set when this pass is run. ``block_list`` should contain a | ||
| a list of lists of node indices where each inner list represents a collection of blocks to be |
Member
There was a problem hiding this comment.
Suggested change
| a list of lists of node indices where each inner list represents a collection of blocks to be | |
| list of lists of node indices where each inner list represents a collection of blocks to be |
(a appears twice)
| the analysis of the input :class:`.DAGCircuit` to find all the two qubit blocks in the circuit | ||
| and then determine based on an internal heuristic whether that block should be consolidated to | ||
| a :class:`.UnitaryGate` or not. However if either ``block_list`` or ``run_list`` are set in the | ||
| property set than this pass will not do it's own analysis of the dag. |
Contributor
There was a problem hiding this comment.
"then" may be instead of "than"?
| the analysis of the input :class:`.DAGCircuit` to find all the two qubit blocks in the circuit | ||
| and then determine based on an internal heuristic whether that block should be consolidated to | ||
| a :class:`.UnitaryGate` or not. However if either ``block_list`` or ``run_list`` are set in the | ||
| property set than this pass will not do it's own analysis of the dag. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The consolidate blocks transpiler pass was lacking concrete documentation on it's operation. Especially for how it iteracted with other passes and specific property set fields. This commit aims to close that gap and explicitly document how the pass behaves, both in the expected current configuration as well as the still supported legacy operation modes.
Details and comments