  We propose probabilistic controlled-NOT and controlled-phase gates for qubits
stored in the polarization of photons. The gates are composed of linear optics
and photon detectors, and consume polarization entangled photon pairs. The
fraction of the successful operation is only limited by the efficiency of the
Bell-state measurement. The gates work correctly under the use of imperfect
detectors and lossy transmission of photons. Combined with single-qubit gates,
they can be used for producing arbitrary polarization states and for designing
various quantum measurements.
