-
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
ResonatorSpectroscopy is incompatible with BackendV2 #1099
Labels
bug
Something isn't working
Comments
#900 which I had opened a while ago should fix this. I have just brought it back up to date so it can be reviewed and merged. |
You can get around the error by using |
wshanks
added a commit
that referenced
this issue
Mar 27, 2023
### Summary This change continues the work started in #843 to make qiskit-experiments compatible with BackendV2. It updates the spectrscopy, fine frequency and amplitude, and T1 tests to use `BackendV2` rather than `BackendV1`. Additionally it adds support for querying `BackendV2` for measurement frequencies. ### Details and comments The main changes are: * Use `backend.defaults()` to look up `measure_freq_est` for `BackendV2` as well as `BackendV1`. * Improve the error message when `measure_freq_est` can not be accessed for `ResonatorSpectroscopy` * Add T1 to `BackendData` because it is needed by `RestlessMixin`. * Switch `MockRestlessBackend` and `MockIQBackend` to `BackendV2`. This conversion was done by making a `FakeOpenPulse2QV2` `BackendV2` shim for the `BackendV1` `FakeOpenPulse2Q` in terra. * Replace modification of `basis_gates` with modification of `backend.target` in relevant tests. * Remove some unnecessary code (assignments to `timing_constraints` and a test class with no tests). There are a few of inelegant changes in this PR: * Usage of `backend.defaults()` was restored for accessing the measurement frequencies. This is an IBM specific method not in the `BackendV1` or `BackendV2` base classes. It is only used for querying meas_freq_est. `backend.defaults()` is what we had been using before #843, so this is just putting things back the way we were. We might decide to get this data a different way that does not use `defaults()` but at the moment that is the only way to get the measurement frequencies, so we would need to the IBM backends to provide these values in the properties, for instance. * `defaults()` was hacked into the fake `BackendV2` backends for the `ResonatorSpectroscopy` tests. The fake `BackendV1` backends in terra do provide it but not the `BackendV2` variants. One nice thing about moving away from `defaults()` (previous point) is that we could remove this hack. * There is no `BackendV2` version of `FakeOpenPulse2Q`, so one was hacked out of the `BackendV1` version. Perhaps we could get terra to include a `BackendV2` version of `FakeOpenPulse2Q` in the future. Closes #1099 --------- Co-authored-by: Naoki Kanazawa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Informations
What is the current behavior?
ResonatorSpectroscopy
fails to obtain center frequency of resonator forBackendV2
, becauseBackendV2
does not have access toBackendData.meas_freqs
. Specifically,BackendData(backend).meas_freqs
is an empty list, andcenter_freq = BackendData(backend).meas_freqs[physical_qubits[0]]
results in the errorlist index out of range
.Steps to reproduce the problem
The following code produces the error:
The following code shows that this is caused by an incompatibility with
BackendV2
:What is the expected behavior?
The
ResonatorSpectroscopy
experiment should be made compatible withBackendV2
.The text was updated successfully, but these errors were encountered: