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

Use gatesets in cirq/ion, cirq/neutral_atoms, cirq_pasqal and cirq_ionq #4513

Closed

Conversation

tanujkhattar
Copy link
Collaborator

@tanujkhattar tanujkhattar commented Sep 21, 2021

This PR adopts the use of newly added cirq.GateFamily and cirq.Gateset classes in cirq/ion, cirq/neutral_atoms, cirq_pasqal and cirq_ionq.

Note that functions is_native_neutral_atom_op and is_native_neutral_atom_gate are now moot, but are part of the public API and hence are not removed. We can deprecate them later -- though, IMO, both cirq/ion and cirq/neutral_atoms modules should be deprecated :)

Follow up PRs will further adopt the use of Gatesets in cirq/optimizers and cirq_google/

This is part of the roadmap item #3243

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Sep 21, 2021
@CirqBot CirqBot added the size: L 250< lines changed <1000 label Sep 21, 2021
Copy link
Collaborator

@dabacon dabacon left a comment

Choose a reason for hiding this comment

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

I only looked closely at the IonQ part but that looks good modulo one question which I think the answer is yes, but wanted to confirm.

cirq.XXPowGate,
cirq.YYPowGate,
cirq.ZZPowGate,
cirq.MeasurementGate,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this work for cirq.SWAP**3? Reading the gateset code I think it does, but wanted to check.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it'll work for cirq.SWAP ** 3 because cirq.SWAP ** 3 == cirq.SWAP and the gateset will use value equality by default for gate instances.

@MichaelBroughton
Copy link
Collaborator

Can we split this up into two separate PRs ? One for common_gate_families and one for the vendors/devices changes you've made here ?

@tanujkhattar
Copy link
Collaborator Author

Sent out common_gate_families PR for review. Once it is in, I can further split off every vendor change into a separate PR to minimize overlap.

Marking this as a draft for now.

@tanujkhattar tanujkhattar marked this pull request as draft September 22, 2021 23:03
CirqBot pushed a commit that referenced this pull request Sep 23, 2021
…4517)

This PR introduces new common gate families which will be useful to adopt the usage of Gatesets across Cirq. This is split off the larger PR #4513 and follow up PRs will use these new gate families. 


Part of the roadmap item #3243
@tanujkhattar
Copy link
Collaborator Author

Smaller individual PRs have been sent out and we can close this one now.

rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
…uantumlib#4517)

This PR introduces new common gate families which will be useful to adopt the usage of Gatesets across Cirq. This is split off the larger PR quantumlib#4513 and follow up PRs will use these new gate families. 


Part of the roadmap item quantumlib#3243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants