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

Remove unnecessary resets in generate_cutting_experiments #458

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

garrison
Copy link
Member

Fixes #452.

I'd still like to swap the tutorial and how-to as suggested in the second point at #452 (comment), but this can be done independently in a follow-up PR.

@garrison garrison added the cutting QPD-based circuit cutting code label Nov 21, 2023
@garrison garrison added this to the 0.6.0 milestone Nov 21, 2023
@coveralls
Copy link

coveralls commented Nov 21, 2023

Pull Request Test Coverage Report for Build 6949706214

  • 27 of 27 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 92.498%

Totals Coverage Status
Change from base Build 6934663221: 0.06%
Covered Lines: 2984
Relevant Lines: 3226

💛 - Coveralls

Copy link
Collaborator

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

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

Cool! Thanks for setting this up. LGTM I'm sure we will continue to have more ideas for transpiler passes

I just had one question about the control flow stuff

ConsolidateResets(),
DAGFixedPoint(),
],
do_while=lambda property_set: not property_set["dag_fixed_point"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

So you repeat these passes until this condition is False. What exactly triggers this? I haven't come up to speed on how control flow operations work yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

The DAGFixedPoint pass sets this property. It's neat; I learned about it only by reading the tests for the RemoveResetInZeroState pass in qiskit.

Transpiler passes (:mod:`circuit_knitting.utils.transpiler_passes`)
===================================================================

.. automodule:: circuit_knitting.utils.transpiler_passes
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀 fancy

@garrison garrison merged commit 8d0baf1 into main Nov 28, 2023
11 checks passed
@garrison garrison deleted the elide-unnecessary-resets branch November 28, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cut Move instructions do not work on hardware backends unless they support the Reset operation
3 participants