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

Add support for "fractional gates" #450

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Add support for "fractional gates" #450

merged 3 commits into from
Jan 22, 2025

Conversation

cqc-alec
Copy link
Collaborator

@cqc-alec cqc-alec commented Jan 21, 2025

Closes #413 .
The test failure is unrelated: see #449 .
It is not currently possible to add a CI test for this as none of the devices on the open plan support fractional gates. But I have tested locally with ibm_torino.
In addition, I have added a squashing step to the default compilation passes, since they were not squashing single-qubit gates (as pointed out in the comments on the issue).

@cqc-alec cqc-alec changed the title Ae/newgates Add support for "fractional gates" Jan 21, 2025
@cqc-alec cqc-alec marked this pull request as ready for review January 21, 2025 13:56
@cqc-alec cqc-alec requested a review from cqc-melf as a code owner January 21, 2025 13:56
@cqc-alec cqc-alec requested a review from CalMacCQ January 21, 2025 13:56
return {OpType.X, OpType.SX, OpType.Rz, OpType.ECR}
else:
return gateset
return gateset & (ALL_PRIMITIVE_1Q_GATES | ALL_PRIMITIVE_2Q_GATES)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there anything unexpected happening if gateset contains CX and ECR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think this should be a problem. In fact it looks like none of the devices have CX any more; they use CZ instead, though never in combination with ECR. With fractional gates some devices have both CZ and ZZPhase. This doesn't seem to cause any issues.

@cqc-alec cqc-alec requested a review from cqc-melf January 22, 2025 10:52
@cqc-alec cqc-alec merged commit 401d4a6 into main Jan 22, 2025
4 of 6 checks passed
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.

Ensure support for new rx and rzz gates
2 participants