Skip to content
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

Qudit class and a newer CSS class #9

Merged
merged 100 commits into from
Jan 16, 2024
Merged

Qudit class and a newer CSS class #9

merged 100 commits into from
Jan 16, 2024

Conversation

mittaltushant
Copy link
Contributor

Added a more general QuditCode class and a modified CSSCode class that factors out the transformation methods (conjugation and shifting), and works over general fields. Some basic tests also added.

Started writing the generalized class for qudit codes. Need to run tests and finish this.
Edits for the docstrings based on the checker
factoring out conjugation, shifting, generalizing the definition to other fields
Minor edits to correct trailing whitespaces and the like
Added a test for the random CSS code and the shift method
Copy link
Collaborator

@perlinm perlinm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments from a quick glance

qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
Corrected the matrix shape in the CSSCode_gen class
qldpc/codes.py Outdated Show resolved Hide resolved
mittaltushant and others added 6 commits January 9, 2024 16:11
Just commiting to sync
Co-authored-by: Michael A. Perlin <[email protected]>
Incorporated suggestions and modified class methods to instance methods.
Updated the methods to convert between graph and matrix representations in Qudit Code
Added the assert_qubit_code method to help raise such exceptions
Copy link
Contributor Author

@mittaltushant mittaltushant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments have been addressed, and more tests performed.

Updated initialization of the GBCodes to work with newer CSSCode class
Updated QC Codes to work with new CSS class
Replaced CSSCode with the newer version of the class. Removed all the duplicates.
@mittaltushant mittaltushant marked this pull request as draft January 10, 2024 03:37
qldpc/codes_test.py Outdated Show resolved Hide resolved
qldpc/codes_test.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
qldpc/codes.py Outdated Show resolved Hide resolved
@perlinm perlinm marked this pull request as ready for review January 15, 2024 01:55
Copy link
Contributor Author

@mittaltushant mittaltushant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor suggestions apart, I think it is good to go!

for identifying the "transpose" a group member p with respect to a representation (lift) L. This
transpose is defined as the group member p.T for which L(p.T) = L(p).T: if the representation is
unitary, then p.T is equal to the inverse ~p = p**-1.
This module only supports representations of group members by orthogonal matrices over finite
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"orthogonal matrices over finite fields" in abstract.py -- Aren't the lifts always integer-valued permutation matrices?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only by default. Users are still free to provide other lifts, and I can imagine adding groups with other lifts in the future. The QuaternionGroup currently in abstract.py is one (perhaps not-too-interesting) example.

qldpc/codes.py Outdated
@@ -457,56 +516,55 @@ def get_distance(
`CSSCode.get_distance_upper_bound` and `CSSCode.get_one_distance_upper_bound`.

If `lower is False` and `upper is None`, compute an exact code distance with integer linear
programming. Warning: this is an exponentially scaling (NP-complete) problem.
programming. Warning: this is an exponentially difficult(NP-complete) problem.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps rephrase it as — "This is an NP-complete problem, and it may take exponential time to execute."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@perlinm perlinm self-requested a review January 16, 2024 07:57
@perlinm perlinm merged commit b5ba150 into main Jan 16, 2024
5 checks passed
@perlinm perlinm deleted the quantum_Tanner branch January 16, 2024 07:58
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.

2 participants