Skip to content

Conversation

coreyostrove
Copy link
Contributor

@coreyostrove coreyostrove commented Oct 9, 2025

We recently ran into a scenario where it was desirable to perform germ selection in a manner which minimized the number of applications of a particularly expensive gate operation. To support that sort of use case this PR adds a new algorithm_kwarg option called gate_penalty for find_germs which is compatible with the 'greedy' and 'grasp' search algorithms which allows a user to specify and additional penalty factors for the number of instances of particular gates in a candidate germ set. Also included are some additional unit tests for both this new gate penalty as well as tests for the existing op_penalty option (which penalized the total number of gate operations overall).

Corey Ostrove added 4 commits September 29, 2025 19:09
Add a new penalty option for germ selection to penalize the number of times specified gates are used. Currently only implemented for CompactEVD mode for greedy search.
Add a new option for penalizing the number of applications of a specified gate in germ selection.
Finish adding in the plumbing for the gate penalties, and add in new unit tests for the gate penalty and op penalties.
Fix the new unit tests added for testing germ selection penalties.
@coreyostrove coreyostrove added this to the 0.9.15 milestone Oct 9, 2025
@coreyostrove coreyostrove self-assigned this Oct 9, 2025
@coreyostrove coreyostrove marked this pull request as ready for review October 9, 2025 23:50
@coreyostrove coreyostrove requested review from a team and rileyjmurray as code owners October 9, 2025 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant