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.substitute_node_with_dag #10381

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

jakelishman
Copy link
Member

Summary

Most of this was automatically upgraded during the switchover of DAGCircuit.compose to use the same general variable-remapping forms that QuantumCircuit.compose does. The remaining piece is to skip attempting to propagate the condition onto the subnodes; that is legacy behaviour from an old model of treating conditions as some "extra" to an operation, and not an inherent component of what was being applied.

Details and comments

Resolve #10379. 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 12:22
@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 5604497003

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.003%) to 86.08%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.76%
crates/qasm2/src/lex.rs 5 91.14%
Totals Coverage Status
Change from base Build 5603596398: -0.003%
Covered Lines: 72625
Relevant Lines: 84369

💛 - Coveralls

Most of this was automatically upgraded during the switchover of
`DAGCircuit.compose` to use the same general variable-remapping forms
that `QuantumCircuit.compose` does.  The remaining piece is to skip
attempting to propagate the condition onto the subnodes; that is legacy
behaviour from an old model of treating conditions as some "extra" to an
operation, and not an inherent component of what was being applied.
@jakelishman jakelishman force-pushed the expr/dag-substitite-dag branch from 0797e90 to 14c9dd2 Compare July 19, 2023 21:25
@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.

Thanks for the update, LGTM

@mtreinish mtreinish enabled auto-merge July 19, 2023 22:03
@mtreinish mtreinish added this pull request to the merge queue Jul 20, 2023
Merged via the queue into Qiskit:main with commit 4f7aa2b Jul 20, 2023
@jakelishman jakelishman deleted the expr/dag-substitite-dag branch July 20, 2023 08:17
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 to DAGCircuit.substitute_node_with_dag
5 participants