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

Duplicate measurement keys don't raise exception #2152

Closed
viathor opened this issue Sep 23, 2019 · 1 comment · Fixed by #2604
Closed

Duplicate measurement keys don't raise exception #2152

viathor opened this issue Sep 23, 2019 · 1 comment · Fixed by #2604

Comments

@viathor
Copy link
Collaborator

viathor commented Sep 23, 2019

Found by @Strilanc in review of #2114 .

To reproduce:

In [1]: import cirq

In [2]: q = cirq.NamedQubit('q')

In [3]: c = cirq.Circuit.from_ops(cirq.measure(q, key='a'), cirq.measure(q, key='a'))

In [4]: c
Out[4]: q: ───M('a')───M('a')───

In [5]: sim = cirq.Simulator()

In [6]: sim.run(c, repetitions=5)
Out[6]: a=0000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants