# Is there a faster way to do real-time error mitigation in qiskit?

I'm working on the readout error mitigation on a set of results obtained from different quantum circuits. The method I want to apply is to generate the confusion matrix for each quantum circuit (as the noise might change with time), and then use a filter to reduce readout errors. However, this might cost a long time since for each circuit in my experiment, I need to generate a set of calibration circuits to obtain the confusion matrix. I wonder is there a way I can import real-time error data of quantum devices in qiskit, so I don't need to repeat the standard error mitigation procedure many times?

Update: I found one plausible option would be using qiskit runtime program:

# Set the "circuit-runner" program parameters
params = provider.runtime.program(program_id="circuit-runner").parameters()
params.circuits = qc
params.measurement_error_mitigation = True



Where I could also specify the physical qubit on the quantum device that I want to use. I don't know if this will automatically mitigate the readout error for that specific physical qubit(s). Also, if I have 100 quantum circuits with 1 qubit, should I consider running them separately (since the error rate might change), or submitting them all at once? Thanks!

In general, measurement errors do not change on timescales as fast as you are implying here. The data for the readouts is populated once a day or so, and is quite good over that time frame. There are internal health checks that get run, but this is my no means frequent or "live" in the sense that you are probably looking for here. So, in short, you really only need to calibrate once, and your done with it.

The circuit runner (I am the author) you describe above will look over all the circuits passed, and calibrate over the full set at the beginning, and then use this calibration for the circuits you pass. It is a beta version of the M3 method, and works a bit differently than the Qiskit ones. I would pass all the circuits at once when using the circuit runner.

• Thanks for the answer! So does that mean the error-mitigating effect of applying calibration matrix just once (using the standard method) is the same as using circuit runner program and set measurement_error_mitigation = True?
– ZR-
Sep 12 at 16:40
• Technically they do different things. However on systems where uncorrelated errors are dominant, the effect is the same, This is true for IBM Quantum systems, and some others. The circuit runner will be faster though because the underlying routine is designed to be scalable. Sep 12 at 17:38
• Thanks, if I generate a calibration filter and apply that to the results of a set of circuits executed from job_manager (so I can bundle the circuits and submit all of them at once), would that be the same as circuit_runner?
– ZR-
Sep 13 at 0:18
• No, because the outputs are different. It also depends on what Qiskit calibration routine you are using. Sep 14 at 10:42