qiskit-addon-cutting icon indicating copy to clipboard operation
qiskit-addon-cutting copied to clipboard

Provide options in the cut-finder API to turn LO gate and wire cut finding off or on.

Open ibrahim-shehzad opened this issue 1 year ago • 2 comments

Add fields gate_lo and wire_lo to OptimizationParameters in cutting.automated_cut_finding.py to allow the user to turn LO gate and wire cutting off or on. The default is to have them both on.

To do:

  • [x] Enabling only wire cutting causes multiple tests to fail. The same thing will likely happen if only gate cutting is enabled. Test both of these out and fix these tests.
  • [x] Add tests for the CutBothWires action. While running the cut-finder on some circuits with gate_lo set to False (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.
  • [ ] Decide if pieces of the code that track the cost of LOCC wire cuts should be removed completely (cf https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/pull/471#discussion_r1475017958).
  • [x] Remove any pieces of the code that were excluded from coverage because they were tied to the rarely invoked CutBothWires instances.

ibrahim-shehzad avatar May 10 '24 17:05 ibrahim-shehzad

ibrahim-shehzad added this to the 0.7.2 milestone

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.

garrison avatar May 11 '24 01:05 garrison

Pull Request Test Coverage Report for Build 9295628099

Details

  • 30 of 30 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 9290071298: 0.0%
Covered Lines: 2401
Relevant Lines: 2401

💛 - Coveralls

coveralls avatar May 14 '24 20:05 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.

ibrahim-shehzad avatar May 23 '24 17:05 ibrahim-shehzad