-
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
enable resonator as target device component #387
enable resonator as target device component #387
Conversation
@dekelmeirom I think the code looks good. However, I don't see any experiment actually puts |
@jyu00 you are right, there aren't any such experiments yet. |
#583 currently has an alternate implementation that you might want to look at. Currently, it sets with the expectation that subclasses will override this if they want something other than the qubit components. One benefit of #583 is that it gives more flexibility for the experiment to set its components. For example, an experiment like #583 that only measures the resonator does not have to include the qubit in its device components as would be the case with this PR (#387), unless the experiment unset |
I think that #583 fixed the initial problem by enabling the flexibility for the experiment to set its own components. |
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.
The change in _get_experiment_components
and the additional test looks good. However my main issue I have for this PR is that the only experiment that needs this change currently, ResonatorSpectroscopy
, is not using it in this PR but rather its own solution (overriding _get_experiment_components
to return list of Resonator
objects from the physical qubits list).
I think for ResonatorSpectroscopy
and similar future experiments we should have a way to set the device components to be resonators earlier in the flow, namely at the stage where BaseExperiment._metadata
is being called. But here are some questions: 1) adding resonators
via overriding _additional_metadata
is a not good solution for ResonatorSpectroscopy
as we don't need to have both resonators and physical qubits (I think). 2) Using 'resonators' instead of 'physical_qubits' (albeit no nice way for doing this currently), well I'm not sure though how feasible it would be to not have physical_qubits
key at all as maybe too many places assume the existence of it.
So bottom-line, I can see 2 options:
- Streamline the way experiments specify resonators as components, preferably using some method in
BaseExperiments
(e.g.set_components
) the experiments should override to add (or replacephysical_qubits
with)resonators
entry. - Cancel this PR and continue to use the solution in
ResonatorSpectroscopy
as |
Summary
fixing bug in #171 :
fixing the option to create an experiment with resonator as target device along with qubits (or instead of qubits).
Details and comments
the experiment should include "resonators" in the experiment options to specify the relevant resonators. if there are no qubits as target components, the qubits filed which every experiment has should contain 0 (as int and not as list [0] ).