Draft: Add support for Clifford+T target with NWQEC#597
Open
Conversation
Collaborator
Author
|
@dobbse42 on this work in progress. As mentioned above, I think testing this against a specific use case will lead to a better design. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #597 +/- ##
==========================================
+ Coverage 85.35% 86.94% +1.58%
==========================================
Files 9 10 +1
Lines 280 314 +34
Branches 35 35
==========================================
+ Hits 239 273 +34
Misses 29 29
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bd0a79a to
bf13f11
Compare
Thanks for the quick implementation! I'll go ahead and write a ucc layer in ftcc which uses this for Clifford+T transpilation prior to FT compilation, as this is at least my intended use case. Will tag it here once it's done. |
This file contains hidden or 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
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.
First exploration of work towards #596.
For now this just adds two new passes that wrap the NWQEC compiler clifford compilation methods. Opening for any initial feedback, but before committing, will want to exercise this in the context of a broader fault-tolerant compilation workflow to see that this interface helps.
Some initial hesitations with the approach here:
target_gatesetoption to UCC overall.to_clifford_t/CliffordTPassdo any specific optimization. Custom passes currently all happen at the end of the transpilation pipeline. If we want to optimize these in a customizable way, we might need to revisit the way users can specify passes.to_clifford_reduction/CliffordReductionPassdoes some clifford optimizations, but doesn't guarantee the circuit remains clifford+T? Or at least, I saw somepi/4rotations in there that make it harder to asses.