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 control flow support to UnitarySynthesis pass #8565

Merged
merged 5 commits into from
Sep 29, 2022

Conversation

ewinston
Copy link
Contributor

Summary

Add control flow support to UnitarySynthesis transpiler pass.

Details and comments

@ewinston ewinston requested a review from a team as a code owner August 17, 2022 03:27
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Aug 17, 2022

Pull Request Test Coverage Report for Build 3148714516

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 84.502%

Files with Coverage Reduction New Missed Lines %
qiskit/extensions/quantum_initializer/squ.py 2 79.78%
Totals Coverage Status
Change from base Build 3148712843: 0.2%
Covered Lines: 60261
Relevant Lines: 71313

💛 - Coveralls

@kdk kdk added this to the 0.22 milestone Sep 12, 2022
@jakelishman
Copy link
Member

From the meeting: we might want to replace this with the utility decorator on top of the run method to do the trivial recursion.

@jakelishman
Copy link
Member

I thought I'd added this further comment here already, sorry:

I think this is one pass we'll want to do a little bit of a refactor before doing the recursion - it does a lot of non-trivial setup work before getting to the core, and we'll want to make sure we don't repeat that every time. It should still be easily doable with the helper in #8752, but it probably wants the inner core refactoring into "setup", "do", and "teardown" components, so we can only recurse the "do" part.

The `UnitarySynthesis` runner does rather non-trivial setup of its
internal plugin class before beginning the run.  We don't want to
re-initialise the plugin on each run, nor pay the time penalty for the
setup.  Instead, we refactor the actual "run" loop into its own
function, and use that only for the recursion.
@jakelishman
Copy link
Member

As discussed, I've updated this PR to only recurse the post-setup "run" loop component of the pass, and to use the new utility functions added in #8752.

@kdk kdk added the automerge label Sep 28, 2022
@mtreinish mtreinish added the Changelog: New Feature Include in the "Added" section of the changelog label Sep 28, 2022
@jakelishman jakelishman added Changelog: New Feature Include in the "Added" section of the changelog and removed Changelog: New Feature Include in the "Added" section of the changelog labels Sep 28, 2022
@mergify mergify bot merged commit c7294d5 into Qiskit:main Sep 29, 2022
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.

6 participants