Transpiler from MBQC+LC into pure MBQC#515
Merged
thierry-martinez merged 22 commits intoJun 24, 2026
Merged
Conversation
This commit implements: - `Clifford.to_pattern`: returns an equivalent MBQC pattern (i.e., without local Clifford corrections) for a given single-qubit Clifford gate. - `remove_local_clifford_commands`: transpiles an MBQC+LC pattern into an equivalent pure MBQC pattern by eliminating all local-Clifford commands. - `Pattern.reindex` and `Command.reindex`: implements the renumbering step of pattern composition.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #515 +/- ##
===========================================
+ Coverage 0 90.36% +90.36%
===========================================
Files 0 49 +49
Lines 0 7383 +7383
===========================================
+ Hits 0 6672 +6672
- Misses 0 711 +711 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
matulni
reviewed
May 27, 2026
matulni
left a comment
Contributor
There was a problem hiding this comment.
Thanks! I made some comments
…tion (fix TeamGraphix#519) This commit makes `Pattern.reindex` accept mappings in addition to functions. When no mapping is supplied, nodes are re-indexed consecutively, starting at 0, implementing the suggestion of TeamGraphix#519. Re-indexing is now performed in place by default, with an optional `copy` parameter to return a fresh pattern instead.
matulni
approved these changes
Jun 3, 2026
matulni
left a comment
Contributor
There was a problem hiding this comment.
Thanks LGTM! I made some small comments only
--------- Co-authored-by: matulni <m.uldemolins@gmail.com>
--------- Co-authored-by: matulni <m.uldemolins@gmail.com>
matulni
approved these changes
Jun 8, 2026
Co-authored-by: matulni <m.uldemolins@gmail.com>
pranav97nair
left a comment
Contributor
There was a problem hiding this comment.
Nice work, Thierry! I approve with just a couple very minor comments.
Co-authored-by: Pranav Nair <61292693+pranav97nair@users.noreply.github.com>
pranav97nair
approved these changes
Jun 24, 2026
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.
This commit implements:
Clifford.to_opengraph: returns an equivalent MBQC pattern (i.e., without local Clifford corrections) for a given single-qubit Clifford gate.remove_local_clifford_commands: transpiles an MBQC+LC pattern into an equivalent pure MBQC pattern by eliminating all local-Clifford commands.Pattern.reindexandCommand.reindex: implements the renumbering step of pattern composition.