Skip to content

Commit

Permalink
Revert qiskit-community#400/qiskit-community#401 from stable branch
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mtreinish committed Jun 18, 2020
1 parent 015c64e commit aadc0df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions qiskit/ignis/mitigation/measurement/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import scipy.linalg as la
import numpy as np
import qiskit
from qiskit.validation.base import Obj
from qiskit import QiskitError
from qiskit.tools import parallel_map
from ...verification.tomography import count_keys
Expand Down Expand Up @@ -150,7 +151,7 @@ def apply(self,
task_args=(raw_data, method))

for resultidx, new_counts in new_counts_list:
new_result.results[resultidx].data.counts = new_counts
new_result.results[resultidx].data.counts = Obj(**new_counts)

return new_result

Expand Down Expand Up @@ -329,7 +330,7 @@ def apply(self, raw_data, method='least_squares'):
task_args=(raw_data, method))

for resultidx, new_counts in new_counts_list:
new_result.results[resultidx].data.counts = new_counts
new_result.results[resultidx].data.counts = Obj(**new_counts)

return new_result

Expand Down

0 comments on commit aadc0df

Please sign in to comment.