1. A method for simulating quantum computation on a classical computer by maintaining global phases during simulation of at least one quantum gate of a quantum computer using the classical computer, the method comprising: receiving, at a processor of the classical computer, a quantum state that is a superposition of a plurality of stabilizer states, wherein the quantum state is represented by (i) a stabilizer matrix associated with the plurality of stabilizer states, (ii) a plurality of phase vectors representing each of the stabilizer states, and (iii) an amplitude vector, wherein each entry in the amplitude vector represents a global phase of one of the plurality of stabilizer states represented by one of one of the plurality of phase vectors; receiving, at a processor of the classical computer, a matrix representation of the at least one quantum gate; and determining, by a processor of the classical computer, the effect of the at least one quantum gate on the quantum state in a plurality of iterations, each iteration associated with a phase vector of the plurality of phase vectors and including: applying, by a processor of the classical computer, the phase vector to the stabilizer matrix by setting leading phases of the stabilizer matrix to values of entries in the phase vector; determining, by a processor of the classical computer, an input basis state associated with the phase vector applied to the stabilizer matrix based upon the entries in the phase vector and corresponding literals in the stabilizer matrix; determining, by a processor of the classical computer, an input non-zero amplitude of the input basis state by Gaussian elimination or sampling of values of the stabilizer matrix; applying, by a processor of the classical computer, the matrix representation of the at least one quantum gate to the input non-zero amplitude and the input basis state by matrix-vector multiplication to obtain an output basis state and a first output non-zero amplitude associated with the output basis state; determining, by a processor of the classical computer, a second output non-zero amplitude of the output basis state from the result of matrix multiplication of the matrix representation of the at least one quantum gate, the stabilizer matrix, and the conjugate transpose of the matrix representation of the at least one quantum gate; and adjusting, by a processor of the classical computer, the entry in the amplitude vector associated with the phase vector applied to the stabilizer matrix to maintain the global phase associated with the phase vector, wherein the entry is adjusted by multiplying the entry by a proportion of the first output non-zero amplitude to the second output non-zero amplitude; and determining, by a processor of the classical computer, a resulting quantum state using the adjusted amplitude vector.