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

LO circuit cuts optimizer #471

Closed
wants to merge 146 commits into from
Closed

Conversation

caleb-johnson
Copy link
Collaborator

@caleb-johnson caleb-johnson commented Jan 9, 2024

Create a subpackage, circuit_knitting.cutting.cut_finding, for users to automatically find LO gate + wire cuts, given some cut criteria.

@caleb-johnson caleb-johnson changed the title Lo circuit cuts optimizer LO circuit cuts optimizer Jan 9, 2024
@coveralls
Copy link

coveralls commented Mar 26, 2024

Pull Request Test Coverage Report for Build 8482139047

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1036 of 1036 (100.0%) changed or added relevant lines in 13 files are covered.
  • 17 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.8%) to 95.383%

Files with Coverage Reduction New Missed Lines %
circuit_knitting/cutting/cutqc/wire_cutting_evaluation.py 17 83.78%
Totals Coverage Status
Change from base Build 8426627253: 1.8%
Covered Lines: 3409
Relevant Lines: 3574

💛 - Coveralls

@ibrahim-shehzad
Copy link
Collaborator

Thoughts now on merging this PR, @garrison , @caleb-johnson ?

@caleb-johnson
Copy link
Collaborator Author

Thoughts now on merging this PR, @garrison , @caleb-johnson ?

I'll wait for you both to give the 👍 , and I'll give it one more pass before merging

@ibrahim-shehzad
Copy link
Collaborator

I think we're good to go, from my perspective.

"""Test optimization parameters for being valid data types."""

with pytest.raises(ValueError):
_ = OptimizationSettings(max_gamma=max_gamma, max_backjumps=max_backjumps)
Copy link
Member

Choose a reason for hiding this comment

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

I'm afraid to even suggest this, but I think the following would have been sufficient. No need to change this since all the linters are happy.

Suggested change
_ = OptimizationSettings(max_gamma=max_gamma, max_backjumps=max_backjumps)
OptimizationSettings(max_gamma=max_gamma, max_backjumps=max_backjumps)

circuit_knitting/cutting/find_cuts.py Show resolved Hide resolved
test/cutting/test_find_cuts.py Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
@caleb-johnson
Copy link
Collaborator Author

Closing in favor of #520

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 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cut finder design decisions and to-do items.
6 participants