qiskit-experiments icon indicating copy to clipboard operation
qiskit-experiments copied to clipboard

Analysis results `extra` setter behavior

Open coruscating opened this issue 1 year ago • 2 comments

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

coruscating avatar Dec 13 '23 21:12 coruscating

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 avatar Dec 21 '23 08:12 ItamarGoldman

@ItamarGoldman I think @nkanazawa1989 is already working on this issue in #1344.

yaelbh avatar Dec 21 '23 08:12 yaelbh