  We present a method to optimize qubit control parameters during error
detection which is compatible with large-scale qubit arrays. We demonstrate our
method to optimize single or two-qubit gates in parallel on a nine-qubit
system. Additionally, we show how parameter drift can be compensated for during
computation by inserting a frequency drift and using our method to remove it.
We remove both drift on a single qubit and independent drifts on all qubits
simultaneously. We believe this method will be useful in keeping error rates
low on all physical qubits throughout the course of a computation. Our method
is O(1) scalable to systems of arbitrary size, providing a path towards
controlling the large numbers of qubits needed for a fault-tolerant quantum
computer
