AutoMitigate
AutoMitigate is a tool I built with Thomas Sebahi, a friend from McGill, over three days at the Qollab + IonQ Global Quantum Hackathon. It figures out which error mitigation settings to use on a quantum computer for each circuit and each machine, and it learns that without ever needing to know what the right answer is supposed to be.
Quantum computers today give you slightly wrong answers, and there are three standard tricks for cleaning them up. Zero noise extrapolation runs your circuit at deliberately higher noise and works backwards to what the answer would be with no noise at all. Pauli twirling wraps every two qubit gate in random Pauli flips so that coherent errors average out. Readout error mitigation measures how biased the detector is and subtracts that bias. None of them are free, and none of them always help. On top of that, the errors they fight change every day and reset whenever the machine gets recalibrated, so the best combination depends on the circuit, the machine, and the day you run it, and nobody actually rechecks that by hand.
Treating it as a bandit
We treated the choice as a multiarmed bandit problem, which is the same maths behind A/B testing. There are eight ways to switch the three tricks on or off, and each one is an "arm". Every day the learner pulls an arm, scores how well it did, updates what it believes, and goes again.
The clever bit is how we score each pull without knowing the right answer. We use a mirror circuit, which runs your circuit, scrambles it with a random layer of Pauli gates, and then runs it backwards, so the correct output is a single bitstring we already know in advance. The score is just how often that bitstring comes out, which means it works even on circuits nobody knows the answer to.
What we found
Building the tool raised a question we could actually answer with data. If the hardware drifts, does the best mitigation setting drift along with it? Before computing a single reward we wrote down exactly how we would decide, then replayed 240 days of real calibration history from IBM's ibm_fez machine through Qiskit Aer noise models, across five circuits, eight arms and twenty seeds. That took about ten hours of compute, split between our two laptops.
On the chain of qubits we used, the best setting never changed. Zero noise extrapolation with readout mitigation won every single day on every circuit, and a tracker that somehow knew the best arm each day would gain at most 0.01% over just picking once. Since there was nothing to track, the simplest learner ended up winning, with epsilon greedy beating the default of switching everything on by 45 to 79% in regret on every circuit.
The catch is that this only held on a good chain of qubits. On a more average chain the best setting did drift, with nine significant switches on the 4 qubit GHZ circuit, so tracking matters exactly where the hardware is worse. Everything here is simulation built from real calibration data, and the limitations, our analysis plan and every number are in the repo.
Home
Code & data
Run it on Qollab