  Inspired by spin-electric couplings in molecular magnets, we introduce in the
Kitaev honeycomb model a linear modification of the Ising interactions due to
the presence of quantized cavity fields. This allows to control the properties
of the low-energy toric code Hamiltonian, which can serve as a quantum memory,
by tuning the physical parameters of the cavity modes, like frequencies, photon
occupations, and coupling strengths. We study the properties of the model
perturbatively by making use of the Schrieffer-Wolff transformation and show
that, depending on the specific setup, the cavity modes can be useful in
several ways. They allow to detect the presence of anyons through frequency
shifts and to prolong the lifetime of the memory by enhancing the anyon
excitation energy or mediating long-range anyon-anyon interactions with tunable
sign. We consider both resonant and largely detuned cavity modes.
