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

Improve approximate set generation in qml.ops.sk_decomposition #6855

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

Conversation

obliviateandsurrender
Copy link
Contributor

Context: The approximate set for the Solovay-Kitaev decomposition is currently prepared by populating a trie-based data structure (TbDS) with a BFS traversal. This is efficient but misses out on a few future gate sequences because some parent sequences are caught in the equality check condition.

Description of the Change:

  1. To allow traversal over some potential missed-out candidate sequences, we relax the equality check to include information regarding the tracked global phases. This unlocks.
  2. While the previous step unlocks the previously forbidden parent sequences, it also adds redundant sequences in the set, which is undesirable. So we prune our TbDS by finding the redundant pool sequences and ranking them based on their T-gate count.
  3. To perform the T-gate ranking efficiently, we also build and store this information for each sequence during the traversal itself.

Benefits: This makes the approximate set decently dense than before, unlocking efficient decomposition for some previously missing edge cases.

Possible Drawbacks: This adds a constant overhead incurred from traversing additional parent nodes and post-build pruning. However, this is negligible; as the approximate set once built is cached.

Related GitHub Issues: [sc-82463] #6131

This comment was marked as outdated.

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.47%. Comparing base (cb883b1) to head (a05ecca).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6855      +/-   ##
==========================================
- Coverage   99.60%   99.47%   -0.13%     
==========================================
  Files         476      476              
  Lines       45194    45359     +165     
==========================================
+ Hits        45015    45122     +107     
- Misses        179      237      +58     

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

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.

1 participant