I'm trying to construct a quantum circuit with 3 mid-circuit measurements, here's an example:
qrz = QuantumRegister(2,'q')
crz = ClassicalRegister(3,'c')
qc = QuantumCircuit(qrz,crz)
for i in range (3):
qc.append(qc1(...),[0,1]). # qc1 is some circuit segment.
qc.measure(1,i)
qc.barrier()
qc = transpile(qc,backend=backend,optimization_level=2,initial_layout = [0,1])
I'm wondering if I could perform the readout error mitigation in this case. Here's what I'm trying to do:
import matplotlib.pyplot as plt
qlist = [1] # Suppose we want to perform the mid-circuit measurement on this qubit.
cal_circuits, state_labels = complete_meas_cal(qubit_list= qlist,circlabel='mcal')
print(len(cal_circuits))
cal_job = execute(cal_circuits,
backend = backend,
shots = 1024,
optimization_level = 0
)
cal_results = cal_job.result()
meas_fitter = CompleteMeasFitter(cal_results, state_labels) # Generate the complete fitter.
fig, ax = plt.subplots(figsize=(10, 10))
meas_fitter.plot_calibration(ax)
meas_filter = meas_fitter.filter
Is there a way I can apply the filter to the qubit that I measured 3 times? Thanks for the help:)