  Cat states and Gottesman-Kitaev-Preskill (GKP) states play a key role in
quantum computation and communication with continuous variables. The creation
of such states relies on strong nonlinear light-matter interactions, which are
widely available in microwave frequencies as in circuit quantum electrodynamics
platforms. However, strong nonlinearities are hard to come by in optical
frequencies, severely limiting the use of continuous variable quantum
information in the optical range. Here we propose using the strong interactions
of free electrons with light as a source for optical cat and GKP states. The
strong interactions can be realized by phase-matching of free electrons with
photonic structures such as optical waveguides and photonic crystals. Our
approach enables the generation of optical GKP states with above 10 dB
squeezing and fidelities above 90% at post-selection probability of 10%, even
reaching >30% using an initially squeezed vacuum state. Furthermore, the
free-electron interaction allows for conditional rotations on the photonic
state, enabling to entangle a pair of GKP states into a GKP Bell state. Since
electrons can interact resonantly with light across the electromagnetic
spectrum, our approach may be used for the generation of cat and GKP states
over the entire electromagnetic spectrum, from radio-waves to X-rays.
