  Photonic routing is a key building block of many optical applications
challenging its development. We report a 2$\times$2 photonic coupler with
splitting ratio switchable by a low-voltage electronic signal with 10~GHz
bandwidth and tens of nanoseconds latency. The coupler can operate at any
splitting ratio ranging from 0:100 to 100:0 with the extinction ratio of 26 dB
in optical bandwidth of 1.3 THz. We show sub-nanosecond switching between
arbitrary coupling regimes including balanced 50:50 beam splitter, 0:100
switch, and a photonic tap. The core of the device is based on Mach-Zehnder
interferometer in a dual-wavelength configuration allowing real-time phase lock
with long-term sub-degree stability at single-photon level. Using the reported
coupler, we demonstrate for the first time the perfectly balanced
time-multiplexed device for photon-number-resolving detectors and also the
active preparation of a photonic temporal qudit state up to four time bins.
Verified long-term stable operation of the coupler at the single photon level
makes it suitable for wide application range in quantum information processing
and quantum optics in general.
