Open
Conversation
Contributor
nulinspiratie
left a comment
There was a problem hiding this comment.
What about if we have the video_mode/__init__.py import the original functions/classes which are now in live_mode? This way the code remains backwards compatible
Contributor
Author
|
@nulinspiratie What I had in mind was this But
|
Contributor
|
@TheoLaudatQM looks like a nice solution! All good from my end |
nulinspiratie
approved these changes
Oct 25, 2024
Collaborator
We can merge if we're okay with the breaking changes and the lack of backward compatibility. Otherwise, we can make it compatible. |
Contributor
|
Hmm, if we want to maintain backwards compatibility, we could also opt for the following: video_mode/videomode.py from qualang_tools.live_mode import LiveMode
import warnings
class VideoMode(LiveMode):
def __init__(self, qm: QuantumMachine, parameters: Union[Dict, ParameterTable]):
warnings.warn("the video_mode module is deprecated, please import live_mode instead", DeprecationWarning,
stacklevel=0)
super().__init__(self, qm, parameters)We would then need to rename the new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename the module called video_mode into live_mode to avoid confusion with the video mode tool used to tune up quantum dots devices.
We can still debate on the name if you think that another one would be more relevant for this tool which is used for updating parameters from a QUA program while the program is running in an asynchronous manner.