Skip to content
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

Add Expr support to DAGCircuit.replace_block_with_node #10383

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

jakelishman
Copy link
Member

Summary

Control-flow operations might not include their classical resources in their cargs fields while in the DAGCircuit form (since the resources have no particular order, and are inherent to the operation), so we needed to update the logic of the wire_pos_map sorter to have a way to specify that some bits need not be present in the output.

Details and comments

Close #10231. Depends on #10377.

@jakelishman jakelishman added the Changelog: New Feature Include in the "Added" section of the changelog label Jul 4, 2023
@jakelishman jakelishman added this to the 0.25.0 milestone Jul 4, 2023
@jakelishman jakelishman requested a review from a team as a code owner July 4, 2023 14:57
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

@coveralls
Copy link

coveralls commented Jul 4, 2023

Pull Request Test Coverage Report for Build 5604249573

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 86.083%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/dagcircuit/dagcircuit.py 11 13 84.62%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 2 91.9%
Totals Coverage Status
Change from base Build 5603596398: 0.0%
Covered Lines: 72636
Relevant Lines: 84379

💛 - Coveralls

@kdk kdk added the on hold Can not fix yet label Jul 18, 2023
@kevinhartman kevinhartman self-assigned this Jul 19, 2023
Control-flow operations might not include their classical resources in
their `cargs` fields while in the `DAGCircuit` form (since the resources
have no particular order, and are inherent to the operation), so we
needed to update the logic of the `wire_pos_map` sorter to have a way to
specify that some bits need not be present in the output.
@jakelishman jakelishman removed the on hold Can not fix yet label Jul 19, 2023
@jakelishman
Copy link
Member Author

Rebased on main.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM

@mtreinish mtreinish enabled auto-merge July 19, 2023 21:46
@mtreinish mtreinish added this pull request to the merge queue Jul 19, 2023
Merged via the queue into Qiskit:main with commit 722b452 Jul 20, 2023
13 checks passed
@jakelishman jakelishman deleted the expr/dag-replace-block branch July 20, 2023 08:16
to24toro pushed a commit to to24toro/qiskit-terra that referenced this pull request Aug 3, 2023
)

Control-flow operations might not include their classical resources in
their `cargs` fields while in the `DAGCircuit` form (since the resources
have no particular order, and are inherent to the operation), so we
needed to update the logic of the `wire_pos_map` sorter to have a way to
specify that some bits need not be present in the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Expr values to DAGCircuit.replace_block_with_op
6 participants