  We develop the contour integral method for numerically solving the
Feynman-Kac equation with two internal states [P. B. Xu and W. H. Deng, Math.
Model. Nat. Phenom., 13 (2018), 10], describing the functional distribution of
particle's internal states. The striking benefits are obtained, including
spectral accuracy, low computational complexity, small memory requirement, etc.
We perform the error estimates and stability analyses, which are confirmed by
numerical experiments.
