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

Update interpretation of meas_map in Qiskit #5971

Merged
merged 40 commits into from
Mar 23, 2021

Conversation

SooluThomas
Copy link
Member

@SooluThomas SooluThomas commented Mar 5, 2021

Summary

The interpretation of the meas_map has historically been:

  • Any measurement of qubit<i> must be accompanied by a measurement of all qubits in meas_map[i]

The interpretation should now be

  • Qubits in meas_map[i] may not be measured disjointly in time such that they overlap incompletely, eg., for meas_map=[[0, 1]] and duration 10. measure(0)@t=10, measure(1)@t=10 is fine, but measure(0)@t=10, measure(1)@t=11 is incorrect. measure(0)@t=10, measure(1)@t=20 would be fine as they do not overlap
    This must be reflected in both the circuit and pulse paths.

Details and comments

  • Part - 1 Fixing meas_map logic in measure of macro.py - All this used to do was add extra acquire for even unused qubits. So, if I have meas map [[0, 1]], and zero is measured, 1 ALSO gets acquired. It doesn’t need to be. This PR fixes this issue.

  • Part - 2 Change the way we validate schedules - The meas map is interpreted incorrectly. If I acquire only 0 or only 1, theres no problem. If I acquire both, they MUST be at the same time, or else completely disjoint (finish acquiring 0 before starting to acquire 1)

Co-authored by: Lauren Capelluto (@lcapelluto)

@SooluThomas SooluThomas changed the title Fixing meas_map logic in measure of macro.py Rewrite interpretation of meas_map in Qiskit Mar 5, 2021
qiskit/pulse/macros.py Outdated Show resolved Hide resolved
qiskit/assembler/assemble_schedules.py Outdated Show resolved Hide resolved
qiskit/assembler/assemble_schedules.py Show resolved Hide resolved
@lcapelluto lcapelluto self-assigned this Mar 8, 2021
qiskit/pulse/macros.py Outdated Show resolved Hide resolved
qiskit/pulse/macros.py Outdated Show resolved Hide resolved
Fixed macro code and added one more test
@lcapelluto lcapelluto changed the title Rewrite interpretation of meas_map in Qiskit Update interpretation of meas_map in Qiskit Mar 16, 2021
qiskit/pulse/macros.py Outdated Show resolved Hide resolved
@lcapelluto
Copy link
Contributor

blocking #5577

@lcapelluto lcapelluto added this to the 0.17 milestone Mar 23, 2021
Copy link
Contributor

@lcapelluto lcapelluto left a comment

Choose a reason for hiding this comment

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

LGTM!

@lcapelluto lcapelluto added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Mar 23, 2021
@lcapelluto
Copy link
Contributor

I should try running on a device before adding automerge

@lcapelluto lcapelluto added on hold Can not fix yet automerge and removed on hold Can not fix yet labels Mar 23, 2021
@mergify mergify bot merged commit 65ff053 into Qiskit:master Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants