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 qasm output for bitmasked measurements #4756

Merged
merged 2 commits into from
Dec 14, 2021
Merged

Conversation

daxfohl
Copy link
Contributor

@daxfohl daxfohl commented Dec 14, 2021

Our invert mask only affects the stored value of the measurement, not the qubit itself. So in the qasm we need to un-invert the qubit after measurement.

@daxfohl daxfohl requested review from cduck, vtomole and a team as code owners December 14, 2021 22:36
@daxfohl daxfohl requested a review from viathor December 14, 2021 22:36
@CirqBot CirqBot added the Size: XS <10 lines changed label Dec 14, 2021
@MichaelBroughton MichaelBroughton self-assigned this Dec 14, 2021
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

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

LGTM

@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Dec 14, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Dec 14, 2021
@CirqBot CirqBot merged commit ce1a242 into quantumlib:master Dec 14, 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 Dec 14, 2021
@daxfohl daxfohl deleted the fixqasm branch December 15, 2021 02:08
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this pull request Jan 22, 2022
Our invert mask only affects the stored value of the measurement, not the qubit itself. So in the qasm we need to un-invert the qubit after measurement.
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Our invert mask only affects the stored value of the measurement, not the qubit itself. So in the qasm we need to un-invert the qubit after measurement.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Our invert mask only affects the stored value of the measurement, not the qubit itself. So in the qasm we need to un-invert the qubit after measurement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size: XS <10 lines changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants