Near-infrared semiconductor photonic switches for quantum sensors