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

Revert "Support qubits in MeasurementKey and update JSON serialization of keys" #4277

Merged
merged 3 commits into from Jun 30, 2021

Conversation

95-martin-orion
Copy link
Collaborator

Reverts #4123 due to issues uncovered in #4273.

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Jun 30, 2021
@95-martin-orion 95-martin-orion marked this pull request as ready for review June 30, 2021 15:25
@95-martin-orion 95-martin-orion requested review from cduck, vtomole and a team as code owners June 30, 2021 15:25
Copy link
Contributor

@Strilanc Strilanc left a comment

Choose a reason for hiding this comment

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

Add unit test if you want

@95-martin-orion
Copy link
Collaborator Author

Add unit test if you want

Done: added test_eval_repr to measurement_gate_test.py. All other changes in this PR are generated by reverting #4123.

gate=cirq.MeasurementGate(1, cirq.MeasurementKey(path=(), name='q0_1_0'), ()),
qubits=[cirq.GridQubit(0, 1)],
)
assert op == eval(repr(op))
Copy link
Collaborator

Choose a reason for hiding this comment

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

cirq.testing.assert_equivalent_repr won't work here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point - updated to use that instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vtomole, PTAL - merge is blocked on your review.

@95-martin-orion 95-martin-orion added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jun 30, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 30, 2021
@CirqBot
Copy link
Collaborator

CirqBot commented Jun 30, 2021

Automerge cancelled: Merging is blocked (I don't understand why).

@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 Jun 30, 2021
Copy link
Collaborator

@vtomole vtomole left a comment

Choose a reason for hiding this comment

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

LGTM

@95-martin-orion 95-martin-orion merged commit 680f897 into master Jun 30, 2021
@95-martin-orion 95-martin-orion deleted the revert-4123-2b branch June 30, 2021 20:52
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
…ion of keys" (quantumlib#4277)

* Revert "Support qubits in `MeasurementKey` and update JSON serialization of keys (quantumlib#4123)"

This reverts commit 81436fe.

* Safeguard against repr-inequality.

* assert_equivalent_repr
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

6 participants