  Optical phase shifters and switches play an important role for various
optical applications including optical signal processing, sensing and
communication. In this paper, we demonstrate a fiber all optical phase shifter
using few-layer 2D material tungsten disulfide (WS2) deposited on a tapered
fiber. WS2 absorbs injected 980 nm pump (control light) and generates heat
which changes the refractive index of the tapered fiber due to thermo-optic
effect and achieves a maximum phase shift of 6.1{\pi} near 1550 nm. The device
has a loss of 3.7 dB. By constructing a Mach-Zehnder interferometer with WS2
based phase shifter in one arm, an all optical switch is also obtained with an
extinction ratio of 15 dB and a rise time of 7.3 ms. This all fiber low-cost
and compact optical phase shifter and switch demonstrates the potential of 2D
transition metal dichalcogenides for all optical signal processing devices.
