Skip to content

Draft: Add support for Clifford+T target with NWQEC#597

Open
bachase wants to merge 1 commit intomainfrom
596-nwqec-pass
Open

Draft: Add support for Clifford+T target with NWQEC#597
bachase wants to merge 1 commit intomainfrom
596-nwqec-pass

Conversation

@bachase
Copy link
Copy Markdown
Collaborator

@bachase bachase commented Dec 17, 2025

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:

  1. This is implemented as a custom pass, which is the primary way to customize UCC functionality. However, these passes also transform the gateset, so interacts oddly with the target_gateset option to UCC overall.
  2. NWQEC also has some pauli-based circuit optimizations, but uses a custom QASM dialect to represent them, so they won't translate back to Qiskit/QASM/Cirq or other representations.
  3. I don't think theto_clifford_t/CliffordTPass do 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.
  4. The to_clifford_reduction/CliffordReductionPass does some clifford optimizations, but doesn't guarantee the circuit remains clifford+T? Or at least, I saw some pi/4 rotations in there that make it harder to asses.

@bachase
Copy link
Copy Markdown
Collaborator Author

bachase commented Dec 17, 2025

@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
Copy link
Copy Markdown

codecov Bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.94%. Comparing base (1b4212a) to head (bf13f11).

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.
📢 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.

@dobbse42
Copy link
Copy Markdown

dobbse42 commented Dec 20, 2025

@dobbse42 on this work in progress. As mentioned above, I think testing this against a specific use case will lead to a better design.

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.

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