  The error rates of quantum devices are orders of magnitude higher than what
is needed to run most quantum applications. To close this gap, Quantum Error
Correction (QEC) encodes logical qubits and distributes information using
several physical qubits. By periodically executing a syndrome extraction
circuit on the logical qubits, information about errors (called syndrome) is
extracted while running programs. A decoder uses these syndromes to identify
and correct errors in real time, which is required to use feedback implemented
in quantum algorithms. Unfortunately, software decoders are slow and hardware
decoders are fast but less accurate. Thus, almost all QEC studies so far have
relied on offline decoding.
  To enable real-time decoding in near-term QEC, we propose LILLIPUT-- a
Lightweight Low Latency Look-Up Table decoder. LILLIPUT consists of two parts--
First, it translates syndromes into error detection events that index into a
Look-Up Table (LUT) whose entry provides the error information in real-time.
Second, it programs the LUTs with error assignments for all possible error
events by running a software decoder offline. LILLIPUT tolerates an error on
any operation in the quantum hardware, including gates and measurement, and the
number of tolerated errors grows with the size of the code. It needs <7% logic
on off-the-shelf FPGAs that allows it to be easily integrated alongside the
control and readout circuits in existing systems. LILLIPUT incurs a latency of
few nanoseconds and enables real-time decoding. We also propose Compressed LUTs
(CLUTs) to reduce the memory needed by LILLIPUT. By exploiting the fact that
not all error events are equally likely and only storing data for the most
probable error events, CLUTs reduce the memory needed by up-to 107x (from 148
MB to 1.38 MB) without degrading accuracy.
