Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Avoid implict marshmallow usage #400

Closed

Conversation

mtreinish
Copy link
Collaborator

@mtreinish mtreinish commented May 7, 2020

Summary

The Results class in terra is no longer constructed via marshmallow
since Qiskit/qiskit#4030 merged. When updating the counts in a result object the
dictionary can now be set directly instead of needlessly wrapping it in
a marshmallow container for a dictionary. Besides fixing compatibility
with terra 0.15.0/master it also will improve performance because there
is no extra overhead from marshmallow constructing and running
validation prior to updating the attribute.

Details and comments

The Results class in terra is no longer constructed via marshmallow
since #4030 merged. When updating the counts in a result object the
dictionary can now be set directly instead of needlessly wrapping it in
a marshmallow container for a dictionary. Besides fixing compatibility
with terra 0.15.0/master it also will improve performance because there
is no extra overhead from marshmallow constructing and running
validation prior to updating the attribute.
@mtreinish
Copy link
Collaborator Author

This had to be combined with the fixes in #401 because they're all needed to unblock CI

@mtreinish mtreinish closed this May 7, 2020
mtreinish added a commit to mtreinish/qiskit-ignis that referenced this pull request Jun 18, 2020
The change made in qiskit-community#400 (which was missed because it got integrated into
the qiskit-community#401 PR which was needed to unblock CI on master) should not have
been backported. It was only necessary for compat with terra master and
terra 0.15.0 because the validation module is removed in 0.15.0. This is
breaking measurement mitigation on the stable branch and 0.3.1 release
which needs to work with terra 0.14.x. This commit reverts that change
so the we're wrapping the counts in qiskit.validation.Obj and the
Results object is useable in marshmallow with released terra.
chriseclectic pushed a commit that referenced this pull request Jun 18, 2020
* Revert #400/#401 from stable branch

The change made in #400 (which was missed because it got integrated into
the #401 PR which was needed to unblock CI on master) should not have
been backported. It was only necessary for compat with terra master and
terra 0.15.0 because the validation module is removed in 0.15.0. This is
breaking measurement mitigation on the stable branch and 0.3.1 release
which needs to work with terra 0.14.x. This commit reverts that change
so the we're wrapping the counts in qiskit.validation.Obj and the
Results object is useable in marshmallow with released terra.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant