We realize quantum gates for path qubits with a high-speed,
polarization-independent and tunable beam splitter. Two electro-optical
modulators act in a Mach-Zehnder interferometer as high-speed phase shifters
and rapidly tune its splitting ratio. We test its performance with heralded
single photons, observing a polarization-independent interference contrast
above 95%. The switching time is about 5.6 ns, and a maximal repetition rate is
2.5 MHz. We demonstrate tunable feed-forward operations of a single-qubit gate
of path-encoded qubits and a two-qubit gate via measurement-induced interaction
between two photons