  A scheme is presented for realizing frequency-up conversion and a two-qubit
quantum swap gate for intracavity fields. In the scheme, a V-type atomic
ensemble prepared in their ground states collectively mediates the interaction
between the two cavity modes. Under certain conditions, the cavity-field degree
of freedom is decoupled from the atomic degrees of freedom, and the effective
coupling strength between the two cavity modes scales up with $\sqrt{N}$ ($N$
is the number of atoms). The numerical simulation shows that the quantum swap
gate still has a high fidelity under the influence of the atomic spontaneous
emission and the decay of the cavity modes.
