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

Fix MeasurementKey repr s.t. eval(repr(k)) == k #4441

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

tanujkhattar
Copy link
Collaborator

Fixes first part of #4440

@tanujkhattar tanujkhattar requested review from cduck, vtomole and a team as code owners August 19, 2021 23:31
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Aug 19, 2021
@CirqBot CirqBot added the size: S 10< lines changed <50 label Aug 19, 2021
@tanujkhattar tanujkhattar added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Aug 19, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Aug 19, 2021
@CirqBot CirqBot merged commit b1db3fa into quantumlib:master Aug 19, 2021
@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 Aug 19, 2021
@tanujkhattar tanujkhattar deleted the fix_measurement_keys branch August 19, 2021 23:51
@@ -59,9 +59,11 @@ def test_str(key_string):

def test_repr():
mkey = cirq.MeasurementKey('key_string')
assert repr(mkey) == f'cirq.MeasurementKey(name=key_string)'
assert repr(mkey) == f"cirq.MeasurementKey(name='key_string')"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Replaces these repr/eval tests with assert_equivalent_repr.

rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
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: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants