-
Notifications
You must be signed in to change notification settings - Fork 35
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
Issue 257/xp formalism #286
Draft
ghost
wants to merge
7
commits into
main
Choose a base branch
from
Issue-257/XP_Formalism
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+6,009
−96
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* added skeleton BaseXPPauli and xp_pauli_rep * fixed formatting and lint warnings in xp * made changes to XP documentation as per feedback * changed variable name from N to precision in base_xp_pauli * changed np.int8 to np.int64 in base_xp_pauli
* Change from "stabilizer" to "propagator" for speed. (#245) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> * retworkx to rustworkx (#265) * 260 decoding graph fix (#261) * move code block to avoid issue * Update test_codes.py * add test for dg * removed unused variable Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * fix for warning by casting array_ to numpy array with dtype=object in squeeze (#248) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * Use PyMatching 0.7.0 (#278) * Update requirements.txt To require previous pymatching version * PyMatching requirements Gave PyMatching range so that pip install has more wiggle room for managing dependency reqs. * PyMatching requirements update Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * Make qiskit-qec compatible with pymatching v2 (#280) * Add !=2.0.0 to pymatching in requirements.txt, fix a test that fails for pymatching >v2.0.0 * Remove edges, instead of assigning large weights Co-authored-by: Oscar Higgott <oscarhiggott@users.noreply.github.com> Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Andrew Cross <awcross@us.ibm.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> Co-authored-by: James Wootton <jwo@zurich.ibm.com> Co-authored-by: Dhruv Bhatnagar <61590679+dhruvbhq@users.noreply.github.com> Co-authored-by: oscarhiggott <29460323+oscarhiggott@users.noreply.github.com> Co-authored-by: Oscar Higgott <oscarhiggott@users.noreply.github.com>
* Change from "stabilizer" to "propagator" for speed. (#245) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> * retworkx to rustworkx (#265) * 260 decoding graph fix (#261) * move code block to avoid issue * Update test_codes.py * add test for dg * removed unused variable Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * fix for warning by casting array_ to numpy array with dtype=object in squeeze (#248) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * Add functions for Howell matrix computation * Add checks and unit tests for howell * Modify linear/__init__.py and add acknowledgement for Mark's work * Create modn.py for arithmetic and modify matrix.py based on feedback 1. modn.py contains gcd_ext, quo, div, ann, stab, unit; 2. matrix.py has the following addition: do_row_op, howell, howell_complete. * Add unit tests for do_row_op Co-authored-by: Andrew Cross <awcross@us.ibm.com> Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> Co-authored-by: James Wootton <jwo@zurich.ibm.com> Co-authored-by: Dhruv Bhatnagar <61590679+dhruvbhq@users.noreply.github.com>
* added xp_pauli class * added functions for random xp, precision rescaling, unique vector * added test_xp_pauli and simple test * added weight / XPDistance function * added XPisDiag function as is_diagonal * coded XPD (antisymmetric operator) and refactored * added XPPower * added XP multiplication * added XP degree function * added dummy XPPauliList * added test for XPPauliList init, and function in xp_pauli_rep * added some tests for XPPauliList and upgraded some functions to work for XPPauliList * cleaned lint and black * renamed _num_paulis to _num_xppaulis * added missing truncate variable * resolved weight todo * revert precision from list to integer in BaseXPPauli * added type hints * removed array as allowed precision from assertion and updated tests * acknowledged XPF paper on top of BaseXPPauli... files * added acknowledgement note in individual methods of BaseXPPauli... * added see also in BaseXPPauli... methods * changed assertion to if...raise and moved check to higher level method * changed assertion to if...raise * added docstrings for BaseXPPauli... methods * XPF: 1. added examples in docstring 2. updated 1 method to work for xppaulilist 3. added test * added example and minor change for random_xppauli * added check in rescale_precision * added remaining tests for XPPauliList for currently coded functions * cleaned black and lint
* Change from "stabilizer" to "propagator" for speed. (#245) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> * retworkx to rustworkx (#265) * 260 decoding graph fix (#261) * move code block to avoid issue * Update test_codes.py * add test for dg * removed unused variable Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * fix for warning by casting array_ to numpy array with dtype=object in squeeze (#248) Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> * Add functions for Howell matrix computation * Add checks and unit tests for howell * Modify linear/__init__.py and add acknowledgement for Mark's work * Create modn.py for arithmetic and modify matrix.py based on feedback 1. modn.py contains gcd_ext, quo, div, ann, stab, unit; 2. matrix.py has the following addition: do_row_op, howell, howell_complete. * Add unit tests for do_row_op * Fix lint issues Co-authored-by: Andrew Cross <awcross@us.ibm.com> Co-authored-by: grace-harper-ibm <74260313+grace-harper-ibm@users.noreply.github.com> Co-authored-by: Iskandar Sitdikov <IceKhan13@users.noreply.github.com> Co-authored-by: Drew Vandeth <57962926+dsvandet@users.noreply.github.com> Co-authored-by: James Wootton <jwo@zurich.ibm.com> Co-authored-by: Dhruv Bhatnagar <61590679+dhruvbhq@users.noreply.github.com>
* Modify antisymmetric_op based on Issue 299 and change use of compose in tests * Add inverse method (to base_xp_pauli, xp_pauli, and xp_pauli_list) and tests * Add conjugate method and tests * Add commutator method and tests * Add fundamental_phase method and tests Also modify power method such that each operator in an XPPauliList can be raised to different powers * Add reset_eigenvalue method and tests * Linting cleanup * Fix small error in reset_eigenvalue method * Add "See also" in docstrings * Modify `power` based on comments The `power` method now accepts int, list, or np.ndarray as input. If an int is provided, all XP operators in an XPPauliList would be raised to the same power. * Revert change in precision check * Add docstrings for x, _x, z, _z * Add warnings and inplace option for `rescale_precision()` * Add inplace option for `reset_eigenvalue()`
* beginning to add basic stuff to xp_pauli_rep * implemented xp_symplectic2str basic functionality, added tests * Implemented changes discussed with Ruihao about exponent of P * Added documentation, examples, type hints
ghost
reopened this
Apr 28, 2023
ghost
marked this pull request as ready for review
April 28, 2023 14:09
grace-harper-ibm seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Details and comments