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 for issue #2777: it makes no sense to call simulator.run when ignore_measurement_results has been set to True #3618

Merged
merged 11 commits into from
Mar 17, 2021

Conversation

akushnarov
Copy link
Contributor

@akushnarov akushnarov commented Dec 17, 2020

Raises a ValueError for DensityMatrixSimulator.run when ignore_measurement_results=True.

Fixes #2777.

…n when ignore_measurement_results has been set to True
@akushnarov akushnarov requested review from cduck, vtomole and a team as code owners December 17, 2020 14:40
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Dec 17, 2020
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.

What doesn't make sense about it? When ignore_measurement_results=true the measurement is treated as a dephase instead of a collapse of the wavefunction.

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.

Oh i'm just seeing this: #2777 (comment)

@dstrain115
Copy link
Collaborator

Please add a test for this.

Also, you can fix formatting by running check/format-incremental --apply

@akushnarov
Copy link
Contributor Author

@balopat could you please check this one?

@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Mar 17, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Mar 17, 2021
@CirqBot CirqBot merged commit d27b9a4 into quantumlib:master Mar 17, 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 Mar 17, 2021
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.

Density matrix simulator sometimes returns measurement results when ignore_measurement_results is True
5 participants