  Controlling the charge density in low-dimensional materials with an
electrostatic potential is a powerful tool to explore and influence their
electronic and optical properties. Conventional solid gates impose strict
geometrical constraints to the devices and often absorb electromagnetic
radiation in the infrared (IR) region. A powerful alternative is ionic liquid
(IL) gating. This technique only needs a metallic electrode in contact with the
IL and the highest achievable electric field is limited by the electrochemical
interactions of the IL with the environment. Despite the excellent gating
properties, a large number of ILs is hardly exploitable for optical experiments
in the mid-IR region, because they typically suffer from low optical
transparency and degradation in ambient conditions. Here, we report the
realization of two electrolytes based on bromide ILs dissolved in polymethyl
methacrylate (PMMA). We demonstrate that such electrolytes can induce
state-of-the-art charge densities as high as $20\times10^{15}\
\mathrm{cm^{-2}}$. Thanks to the low water absorption of PMMA, they work both
in vacuum and in ambient atmosphere after a simple vacuum curing. Furthermore,
our electrolytes can be spin coated into flat thin films with optical
transparency in the range from 600 cm$^{-1}$ to 4000 cm$^{-1}$. Thanks to these
properties, the electrolytes are excellent candidates to fill the gap as
versatile gating layers for electronic and mid-IR optoelectronic devices.
