Silicon photonics and its applications in communications and in sensing