  The cat code is a promising encoding scheme for bosonic quantum error
correction as it allows for correction against losses--the dominant error
mechanism in most bosonic systems. However, for losses to be detected
efficiently without disturbing the encoded logical information, one needs to
implement a parity measurement of the excitation number. While such a
measurement has been demonstrated in the microwave regime using a
superconducting transmon ancilla, it has remained unclear how it can be
implemented in the optical regime. Here, we introduce a teleportation-based
error-correction scheme for the cat code, using elements suitable for an
optical setting. The scheme detects and corrects single-photon losses while
restoring the amplitude of the cat states, thereby greatly suppressing the
accumulation of errors in lossy channels.
