Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automated cut-finding module (#520)
* set up new branch with LO circuit cut finder * Update tutorial with bug fix pending * update tutorial with bug fix pending * fix bug and update notebook * update print method, Co-authored by: Edwin Pednault [email protected] * Update cut finding dir structure * commit before pulling changes * Add license blurbs * black errors * clean up notebook with updated print method * clean up printed output in tutorial * Add find_cuts tutorial * Use dataclasses for settings objects * Update tutorial to integrate with CKT * edit string output function * clean up utils doc strings. * Simplifications in xform func * black * update xform code to fix small bug * minor simplification * edit doc strings * edit field name in settings * Introduce a CircuitElement tuple * Remove remnants of other search algorithms. * Fix cost lookup logic * snapshot test notebook before pull * Add cut finder tests * rebase conflict * Add license blurbs * black errors * clean up notebook with updated print method * clean up printed output in tutorial * edit string output function * Add find_cuts tutorial * Use dataclasses for settings objects * Update tutorial to integrate with CKT * clean up utils doc strings. * Simplifications in xform func * black * update xform code to fix small bug * minor simplification * edit doc strings * edit field name in settings * Remove remnants of other search algorithms. * Introduce a CircuitElement tuple * Fix cost lookup logic * Fix bugs with wire cutting * Update cco tests * Update indices to params in gate dict * re run tutorial for correct outputs * clean up notebook * clean up tutorial * clean up tutorial * clean up tutorial * clean up tutorial and print statement * Add Ed Pednault as author * Set gamma UP and LB both to gamma until bell pair cutting is supported in CKT * Remove redundant CircuitElement class * Remove unnecessary init * Add partial type hints for a few modules * Remove unused code and add roundtrip tests. * Update BFS test and remove unused code. * Fix black errors, changes to tests pending * Update test to match new circuit interfaces * Update circuit interface tests and some docstrings. * Update CCOtoQC func and associated test. * Update BFS test and run style. * Finish making all tests consistent with new circuit interface * Add and update tests * Add and update tests * Add type hints, tests, update func names. * add tests, fix some mypy errors. * Correct mypy errors, fix bugs in tests. * Remove cast subscripting to make compatible with py38. * Make type annotations compatible with min version tests. * Fix more py38 type compatibility issues. * Fix type hints. * Get rid of camel casing in function names and fix linting errors in doc strings. * Fix remaining pylint errors. * Generate black diff. * Use python3.10 for lint workflow This will match the version specified by basepython in `tox.ini` * Run style with updated version of black * Edit doc strings * Find cuts updates (#498) * Return metadata from find_cuts * Move cut finding into cutting package * black * Fix coverage * notebook update * Docstring * Fix small bugs in find_cuts * black * Update test/cutting/test_cutting_decomposition.py * Handle CutBothWires action * Clean up todo * Assert the qubit id's are relative to a two qubit gate * elif * minor comment update * Clean up docstring/comments * Clean up docstring * Don't use funky logic * Docstring cleanup * Change to namedtuples, redo tests and typing. * Fix sphinx errors, change actions to named tuples. * lint * clean up notebook, cast statements. * Clean up type hints * style * Add tests, add qubit list to output. * style * Add tests * Remove subscripting in cast statements * Fix tests. * Fix docstring. Improve error message. Add test. * Update tutorial, add classes for constraints and settings * Fix test, edit doc string. * Correct error in tutorial * Correct tutorial output * Remove num_QPUs, add tests. * Edit doc string, fix type hint for backjumps. * Fix bug in indexing in find_cuts, and fix docstring * Fix funky rendering * docstring * Fix remnant of indexing bug. * Fix remnant of indexing bug. * Remove typo in cutting_optimization, update doc string. * Use new opt settings class * Update to new class in cutting pkg * Fix style, docstring. * release note * Edit release notes, clean up tutorial * Change to qubits per subcircuit everywhere * Expand release note * Create find_cuts module * Ignore CutBothWires for coverage * Fix coverage * black * Clean up docstring * Improve docstring * Upeate release notes * Remove extraneous tutorial * Add test, edit docstrings. * Fix docstring typo * Docstring * Import test circuit from qasm, edit docstrings and release notes. * Correct path to test circuit * Edit docstring * Move find_cuts down into cut finding section of docs * Update circuit_knitting/cutting/__init__.py Co-authored-by: Jim Garrison <[email protected]> * Construct test circuits in functions, not module (#521) Follow up to #520 (comment) These are still not _fixtures_, but at least they will only be run if the test is executed. * Change import routing, fix doc strings, add license blurbs. * Move the cut-finder settings up into module. * black * coverage * black * Update circuit_knitting/cutting/__init__.py Co-authored-by: Jim Garrison <[email protected]> * Rename find_cuts module to automated_cut_finding * test import * cut_finding test imports * Remove reference to OptimizationSettings in OptimizationParameters class * Move tests, fix type hints and imports * Update import Co-authored-by: Jim Garrison <[email protected]> --------- Co-authored-by: Caleb Johnson <[email protected]> Co-authored-by: Edwin Pednault <[email protected]> Co-authored-by: Jim Garrison <[email protected]>
- Loading branch information