The many-body dynamics of a quantum computer can be reduced to the time evolution of non-interacting quantum bits in auxiliary fields using the Hubbard–Stratonovich representation of two-bit quantum gates in terms of one-bit gates. This makes it possible to perform the stochastic simulation of a quantum algorithm based on the Monte Carlo evaluation of an integral of dimension polynomial in the number of quantum bits. As an example, the simulation of the quantum circuit for the fast Fourier transform is discussed.