-
Notifications
You must be signed in to change notification settings - Fork 31
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
Possible inconsistencies for pulse identifiers when stored using PulseStorage #272
Comments
Resolution: Storing PulseTemplates in PulseStorage under a different identifier should change their identifier in the PulseTemplate as well as in storage. Previous versions stored in PulseStorage under the old identifier should remain unchanged in this case. |
I see three possibilities:
|
The problems with 1 and 3 is that what is actually stored is different from what is input into Maybe we could consider removing the identifier field of the Serializable class and have the identifier be something that is external to all Serializables and can thus be easily changed by just reassigning the PT to a different id in storage without changing the object itself? This would mean that we couldn't use identifiers directly during sequencing but I don't think that would be a problem (we would just have to use the mapping of id's to PT objects, i.e. the PulseStorage or pulse registry dictionary, during sequencing) |
This is currently fixed by PR #306 by introducing a method Serializable.renamed(new_identifier) which returns a copy of the original Serializable object with the given new identifier to enable explicit renames and having PulseStorage raise an error (which points to the possibility of renamed()) when attempting to store a PulseTemplate/Serializable under a different identifier than its internal one. |
Fixed as we throw an exception now. |
The dictionary interface of PusleStorage in principle allows it to store pulse under a different identifier than the one they were given on pulse construction, thus creating inconsistencies (or "hidden" renames).
The text was updated successfully, but these errors were encountered: