Skip to content
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

Feature wildcard serialization #279

Merged
merged 3 commits into from
Nov 22, 2022
Merged

Conversation

enielse
Copy link
Collaborator

@enielse enielse commented Nov 18, 2022

Adds ability to serialize results objects to disk or MongoDB that contain wildcard budgets

This seems useful for obvious reasons. As a side effect, Estimate objects are updated to hold serialized wildcard budget objects instead of the objects themselves. This could break external code that extracts wildcard budgets from result objects.

…dcard budgets.

Updates WildcardBudget to inherit from NicelySerializable and updates what
is stored within GST Estimate objects to be a *serialized* WildcardBudget
rather than the object itself.  This allows the Estimate to serialize
itself without any modification, using the standard metadir framework.
On the other hand, it necessitates updating the report construction
(in factory.py) to initialize a WildcardBudget object from the Estimate's
serialization, which is not performed.

This update may therefor break user code that assumes that
estimate.extra_parameters['unmodeled'] is a WildcardBudget.
…reports.

Updates estimate construction code to serialize 'wildcard1d' budgets, and
updates reporting code to allow for a JSON-serialized wildcard budget within
an estimate object instead of the object itself.
Copy link
Contributor

@sserita sserita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, I was just curious about the decision to store serialized version. It's possible that this might be accepted as-is after a quick discussion.

pygsti/protocols/gst.py Show resolved Hide resolved
@sserita sserita merged commit ceda41f into develop Nov 22, 2022
@sserita sserita deleted the feature-wildcard-serialization branch November 22, 2022 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants