-
Notifications
You must be signed in to change notification settings - Fork 127
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
Fixed calibration experiments failing on backends with no coupling map #1117
Fixed calibration experiments failing on backends with no coupling map #1117
Conversation
On backends with no coupling map (such as one could configure with `DynamicsBackend` from qiskit-dynamics), calibration experiments failed because the `BaseCalibrationExperiment` tried to pass the backend's `coupling_map` (run through `BackendData`) to terra's `CouplingMap` which acceprts `None`. The transpiler pass `FullAncillaAllocation` behaves differently when passed `None` than when passed `CouplingMap(None)`.
Closes #1116 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Is it possible to setup a small test instance for a backend that does not have a coupling map? Can we maybe use this?
from qiskit_experiments.test.pulse_backend import SingleTransmonTestBackend
from qiskit_experiments.framework import BackendData
data = BackendData(SingleTransmonTestBackend())
data.coupling_map
Note that the resulting coupling map here is []
and not None
. Should the code also distinguish []
from None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is blocking this PR? When I locally test against main branch (-eterra-main
) I started to see some cal test failures. This makes me think we already have sufficient tests and we should merge this before 0.24rc1 is released (otherwise terra release will break CI again).
I hadn't had a chance to look at the tests, but I think that is the only blocker. |
Okay, I added a test as a second commit. I confirmed that cherry-picking the test commit on main without the other commit with the fix fails during the SetLayout pass (the empty coupling map causes it not to expand with ancilla and then it fails when asserts that the highest qubit index in the circuit plus one is equal to the number of qubits in the circuit). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
#1117) On backends with no coupling map (such as one could configure with `DynamicsBackend` from qiskit-dynamics), calibration experiments failed because the `BaseCalibrationExperiment` tried to pass the backend's `coupling_map` (run through `BackendData`) to terra's `CouplingMap` which acceprts `None`. The transpiler pass `FullAncillaAllocation` behaves differently when passed `None` than when passed `CouplingMap(None)`. (cherry picked from commit ac26da0)
…p (backport #1117) (#1148) This is an automatic backport of pull request #1117 done by [Mergify](https://mergify.com). Co-authored-by: Will Shanks <[email protected]>
On backends with no coupling map (such as one could configure with
DynamicsBackend
from qiskit-dynamics), calibration experiments failed because theBaseCalibrationExperiment
tried to pass the backend'scoupling_map
(run throughBackendData
) to terra'sCouplingMap
which acceprtsNone
. The transpiler passFullAncillaAllocation
behaves differently when passedNone
than when passedCouplingMap(None)
.