Skip to content

Support gate-dependent local C1 twirling#308

Merged
joshuasn merged 15 commits intomainfrom
local-c1-twirling
Mar 6, 2026
Merged

Support gate-dependent local C1 twirling#308
joshuasn merged 15 commits intomainfrom
local-c1-twirling

Conversation

@joshuasn
Copy link
Collaborator

@joshuasn joshuasn commented Feb 20, 2026

Summary

Following #306 and #307, this PR adds local Clifford twirling. This can be enabled by setting the new twirling_group argument of the generate_preset_pass_manager or the group argument of the Twirl annotation to local_c1.

Details and comments

A lot of the building stage is forward looking to support RZZ twirling.
As the two-qubit entanglers are Hermitian, there is a single local C1 subgroup. For non-Hermitian gates, we can do the same thing but would need different subgroups for left- and right-dressed boxes.

I used Claude Ops 4.6.

@joshuasn joshuasn mentioned this pull request Feb 23, 2026
Base automatically changed from c1-twirl to main February 23, 2026 19:18
@joshuasn joshuasn marked this pull request as ready for review February 25, 2026 15:08
@@ -15,6 +15,122 @@
import numpy as np

C1_PAST_CLIFFORD_LOOKUP_TABLES: dict[str, np.ndarray[np.intp]] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we can reduce line count in this file, either by adding some .T or by turning off linting selectively.

joshuasn and others added 5 commits March 4, 2026 17:27
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
@joshuasn joshuasn enabled auto-merge (squash) March 6, 2026 19:03
@joshuasn joshuasn merged commit 44a19b7 into main Mar 6, 2026
8 checks passed
@joshuasn joshuasn deleted the local-c1-twirling branch March 6, 2026 19:04
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