A Parallel Tensor Network Contraction Algorithm and Its Applications in Quantum Computation