Skip to content

Improve ConsolidateBlocks documentation#15890

Open
mtreinish wants to merge 2 commits intoQiskit:mainfrom
mtreinish:cons-block-docs
Open

Improve ConsolidateBlocks documentation#15890
mtreinish wants to merge 2 commits intoQiskit:mainfrom
mtreinish:cons-block-docs

Conversation

@mtreinish
Copy link
Copy Markdown
Member

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

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.
@mtreinish mtreinish requested a review from a team as a code owner March 27, 2026 11:36
@qiskit-bot
Copy link
Copy Markdown
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@mtreinish mtreinish removed their assignment Mar 27, 2026
@mtreinish mtreinish added documentation Something is not clear or an error documentation stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge. mod: transpiler Issues and PRs related to Transpiler Changelog: None Do not include in the GitHub Release changelog. labels Mar 27, 2026
@ShellyGarion ShellyGarion linked an issue Mar 29, 2026 that may be closed by this pull request

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's -> its

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: None Do not include in the GitHub Release changelog. documentation Something is not clear or an error documentation mod: transpiler Issues and PRs related to Transpiler stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document runs vs blocks in ConsolidateBlocks logic

5 participants