We prepare a maximally entangled state of two ions and couple both ions to the mode of an optical cavity. The phase of the entangled state determines the collective interaction of the ions with the cavity mode, that is, whether the emission of a single photon into the cavity is suppressed or enhanced. By adjusting this phase, we tune the ion-cavity system from sub- to superradiance. We then encode a single qubit in the two-ion superradiant state and show that this encoding enhances the transfer of quantum information onto a photon.