1
$\begingroup$

Suppose I have the following calibration matrix generated using 4 qubits:

from qiskit.ignis.mitigation.measurement import (complete_meas_cal, CompleteMeasFitter)
cal_circuits, state_labels = complete_meas_cal(qr = qc.qregs[0],circlabel = 'measerrormitigationcal')
cal_job = execute(cal_circuits, 
                 backend = device,
                 shots = 1024,
                  optimization_level = 0
                 )
print(cal_job.job_id())
job_monitor(cal_job)
cal_results = cal_job.result()
meas_fitter = CompleteMeasFitter(cal_results, state_labels)
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(10, 10))
meas_fitter.plot_calibration(ax)

enter image description here

Is there a way I can use this filter to reduce another quantum circuit with 3 qubits? (i.e. A subset with 8 elements) (I was wondering if I could add a '0' after the keys but it seems like this won't work since the additional qubit might 'flip'. )

Thanks!!

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, I think this can be done through redefine a new meas_fitter that is a subset of the original one.

fig, ax = plt.subplots(figsize=(10, 10))
subset_meas_fitter = meas_fitter.subset_fitter([0,1,2]) #defining new meas_fitter for a set of qubits
subset_meas_fitter.plot_calibration(ax)
subset_meas_fitter.plot_calibration(ax)

Which should give you something like:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.