  We propose two schemes for generating the Knill-Lafamme-Milburn (KLM) states
of two distant polar molecules (PMs) ensembles respectively in two
transmission-line resonators (TLRs) connected by a superconducting charge
qutrit (SCQ), and of two SCQs in a TLR, respectively. Both of the schemes are
robust against photon decay due to the virtual excitations of the microwave
photons of the TLRs, and the spontaneous emission can be suppressed owing to
the virtual transitions of the SCQs in the second scheme. In addition, the
schemes have high controllability and feasibility under the current available
techniques.
