  We demonstrate that a tensor product structure and optical analogy of quantum
entanglement can be obtained by introducing pseudorandom phase sequences into
classical fields with two orthogonal modes. Using the classical analogy, we
discuss efficient simulation of several typical quantum states, including
product state, Bell states, GHZ state, and W state. By performing quadrature
demodulation scheme, we propose a sequence permutation mechanism to simulate
certain quantum states and a generalized gate array model to simulate quantum
algorithm, such as Shor's algorithm and Grover's algorithm. The research on
classical simulation of quantum states is important, for it not only enables
potential beyond quantum computation, but also provides useful insights into
fundamental concepts of quantum mechanics.
