  In one-way quantum computation (1WQC) model, universal quantum computations
are performed using measurements to designated qubits in a highly entangled
state. The choices of bases for these measurements as well as the structure of
the entanglements specify a quantum algorithm. As scalable and reliable quantum
computers have not been implemented yet, quantum computation simulators are the
only widely available tools to design and test quantum algorithms. However,
simulating the quantum computations on a standard classical computer in most
cases requires exponential memory and time. In this paper, a general direct
simulator for 1WQC, called OWQS, is presented. Some techniques such as qubit
elimination, pattern reordering and implicit simulation of actions are used to
considerably reduce the time and memory needed for the simulations. Moreover,
our simulator is adjusted to simulate the measurement patterns with a
generalized flow without calculating the measurement probabilities which is
called extended one-way quantum computation simulator (EOWQS). Experimental
results validate the feasibility of the proposed simulators and that OWQS and
EOWQS are faster as compared with the well-known quantum circuit simulators,
i.e., QuIDDPro and libquantum for simulating 1WQC model.
