-
Notifications
You must be signed in to change notification settings - Fork 64
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
Soften switching device with strict conditions #724
Conversation
… handling of add_dmm_detuning
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.
Looking good overall! The switch_device()
method is getting too bulky, how would you feel about moving it into a separate file?
I have created a "helpers" folder, and placed this function |
This is okay with me. I think other files could potentially go there but it's not out-of-scope for this PR. |
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.
Only one nit, nice job!
Ready @HGSilveri 😄 |
Conditions on total_bottom_detuning and bottom_detuning for DMM channels, and on EOM config for channels using EOM (eom config being the same) are deleted.
They are replaced by a condition on the building of the sequence being possible, and the samples of the Sequence being unaffected by the switching of the device.
To do this, we first loop over all the possible matchings between declared channels and devices in the new device. For the one having correct type, addressing, modulations, ... we try to build the associated sequence. If the strict condition is provided and the Sequence can be successfully built, we check that the samples are the same for the two Sequences. Finally, the Sequence built with the first compatible matching.
If no matching is found to be compatible, we go through the same error detection process as before to provide a good hint on the error.
Closes #721