Provide options in the cut-finder API to turn LO gate and wire cut finding off or on, expose min-reached flag.#586
Conversation
| gate_lo: bool = OptimizationSettings().gate_lo | ||
| wire_lo: bool = OptimizationSettings().wire_lo |
There was a problem hiding this comment.
One might want to investigate what happens when one sets both gate_lo and gate_lo to False. Ideally this will result in an informative error message (right?).
There was a problem hiding this comment.
Yes, for sure.
There was a problem hiding this comment.
Also, I want to acknowledge somewhere (i.e., in this comment) that we'll probably change the name of gate_lo eventually. since I doubt it makes any sense to implement LOCC gate cutting now that https://arxiv.org/abs/2312.11638 is out. I cannot think of a better name right this moment. The proper names will depend how far we get implementing parallel and black box cutting from that paper.
There was a problem hiding this comment.
I have gone ahead and added some of the updates that we discussed (7fcfcb1).
This adds a feature, so it (as a whole) will have to wait for 0.8.0. It might be that some of the fixes are worth backporting, though. |
Pull Request Test Coverage Report for Build 9295628099Details
💛 - Coveralls |
|
Instances of the greedy search (warm start) algorithm still had access to the LOCC wire-cut cost function and did, in certain instances (when only wire cutting was enabled and the greedy search algorithm was being tested out), output costs that were inconsistent with the LO-only scenario that we currently support. This has now been changed to make things consistent and cost functions that track LOCC wire cuts are no longer exposed anywhere. |
caleb-johnson
left a comment
There was a problem hiding this comment.
This looks good. Only a couple of very minor nitpicks.
I wonder if this could've been two PRs but looks good to me as-is
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
Co-authored-by: Jim Garrison <garrison@ibm.com>
garrison
left a comment
There was a problem hiding this comment.
Thank you -- I am happy with this. 🚀
Add fields
gate_loandwire_lotoOptimizationParametersincutting.automated_cut_finding.pyto allow the user to turn LO gate and wire cutting off or on. The default is to have them both on.To do:
CutBothWiresaction. While running the cut-finder on some circuits withgate_loset toFalse(so only wire cut finding enabled), this action was implemented and we realized that there were some new bugs that were not covered by the existing tests.CutBothWiresinstances.