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

identity operation -> gate property #2515

Merged
merged 2 commits into from
Nov 11, 2019
Merged

Conversation

peterse
Copy link
Collaborator

@peterse peterse commented Nov 8, 2019

Sometime before the v06 release the gate property of IdentityOperation was removed. This leads to a sort of confusing interface with operations

cirq.X(qubit).gate 
>>> cirq.X
cirq.I(qubit).gate
>>> None

was there a reason for this change?

@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Nov 8, 2019
@peterse peterse mentioned this pull request Nov 9, 2019
@Strilanc
Copy link
Contributor

The gate property was never removed. The gate property was moved from GateOperation to the base class Operation, transforming this call from an error to a default implementation returning None.

@Strilanc Strilanc added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Nov 11, 2019
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Nov 11, 2019
@CirqBot CirqBot merged commit d60cd5b into quantumlib:master Nov 11, 2019
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Nov 11, 2019
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants