Skip to content

Algebric prerequisites for Clifford+T decompositions #7588

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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

obliviateandsurrender
Copy link
Contributor

@obliviateandsurrender obliviateandsurrender commented Jun 3, 2025

Context: This introduces and provides some algebraic prerequisites necessary for number-theoretic Clifford-T decomposition methods.

Description of the Change:

  1. Adds Z[√2] (ring of quadratic integers with radicand 2)
  2. Z[ω] (ring of cyclotomic integers of degree 8).
  3. Adds matrices for Dyadic/SO3 descriptions.
  4. Normal form conversion rules.
  5. Tests for verify ordering.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

Copy link
Contributor

github-actions bot commented Jun 3, 2025

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@obliviateandsurrender obliviateandsurrender marked this pull request as ready for review June 9, 2025 09:34
@obliviateandsurrender obliviateandsurrender changed the title [WIP] Algebric prerequisites for Clifford+T decompositions Algebric prerequisites for Clifford+T decompositions Jun 9, 2025
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.67%. Comparing base (549a288) to head (86dbf59).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #7588    +/-   ##
========================================
  Coverage   99.67%   99.67%            
========================================
  Files         532      534     +2     
  Lines       52374    52732   +358     
========================================
+ Hits        52204    52562   +358     
  Misses        170      170            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sengthai sengthai force-pushed the normal-form-decomp branch from d3c14a3 to 1173b34 Compare June 10, 2025 19:29
Copy link
Contributor

@willjmax willjmax left a comment

Choose a reason for hiding this comment

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

Here are some comments for the rings file. I'll take a look at normal forms later today.

Copy link
Contributor

@willjmax willjmax left a comment

Choose a reason for hiding this comment

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

The code looks good, mostly just questions about how the algorithm works.

Copy link
Contributor

@willjmax willjmax left a comment

Choose a reason for hiding this comment

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

Just a few more minor comments. Should be able to approve when they are addressed.

return self * self.conj()

def parity(self: ZOmega) -> int:
"""Return the parity for conversion to ZSqrtTwo."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe give an example of the conversion for clarity.

Copy link
Contributor

@willjmax willjmax left a comment

Choose a reason for hiding this comment

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

Almost there

Copy link
Contributor

@willjmax willjmax left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

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