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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions qiskit/ignis/measurement/discriminator/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
BaseDiscriminationFitter
from qiskit.result.result import Result
from qiskit.result.models import ExperimentResultData
from qiskit.validation.base import Obj


class DiscriminationFilter:
Expand Down Expand Up @@ -88,7 +87,7 @@ def apply(self, raw_data: Result) -> Result:
start = 0
for idx, n_shots in enumerate(shots_per_experiment_result):
memory = y_data[start:(start+n_shots)]
counts = Obj.from_dict(self.count(memory))
counts = self.count(memory)
new_results.results[idx].data = ExperimentResultData(counts=counts,
memory=memory)
start += n_shots
Expand Down
7 changes: 2 additions & 5 deletions qiskit/ignis/mitigation/measurement/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
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 @@ -146,8 +145,7 @@ def apply(self,
task_args=(raw_data, method))

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

return new_result

Expand Down Expand Up @@ -326,8 +324,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 = \
Obj(**new_counts)
new_result.results[resultidx].data.counts = new_counts

return new_result

Expand Down