qiskit-experiments
qiskit-experiments copied to clipboard
Analysis results `extra` setter behavior
As reported by Erick, after the dataframes refactor, MitigatedTomographyAnalysis
isn't able to set the extra
flag so the user is unable to easily distinguish whether a result is mitigated or not:
https://github.com/Qiskit-Extensions/qiskit-experiments/blob/8cc20dfed97afb1320004b4757b5006b41840777/qiskit_experiments/library/tomography/mit_tomography_analysis.py#L110-L122
With the current version of main, I couldn't recreate the error. @coruscating, could you tag Erick with so I will get a code snippet that recreate the error? The code I ran was the following:
from qiskit_aer import AerSimulator
from qiskit.providers.fake_provider import FakePerth
backend = AerSimulator.from_backend(FakePerth())
import qiskit
from qiskit_experiments.library import MitigatedStateTomography
# GHZ State preparation circuit
nq = 2
qc_ghz = qiskit.QuantumCircuit(nq)
qc_ghz.h(0)
qc_ghz.s(0)
for i in range(1, nq):
qc_ghz.cx(0, i)
# QST Experiment
qstexp1 = MitigatedStateTomography(qc_ghz)
qstdata1 = qstexp1.run(backend, seed_simulation=100).block_for_results()
# Print results
for result in mqstdata1.analysis_results():
print(result)
state_result = mqstdata1.analysis_results("state")
print(state_result.value)
@ItamarGoldman I think @nkanazawa1989 is already working on this issue in #1344.