# simulating quantum system on quantum simulator vs classical computer

Suppose I want to simulate a quantum system. Is it true that simulating this on quantum simulator exponential faster than classical computer for arbitrary quantum system and why? If so, does this mean that simulating the Schrodinger equation on quantum simulator (e.g. pennylane, qiskit, etc) should be exponentially faster than classical solver (e.g. matrix exponentiation, etc)?

Careful of your terminology - "quantum simulator" may mean "a simulator (of something) implemented with a quantum computer" or "a simulator of a quantum computer, implemented with a classical computer".

There are certainly algorithms designed for a quantum computer which should simulate quantum systems exponentially faster than the best-known classical algorithms. You might call these quantum algorithms "quantum simulators" in the first sense. Successfully and uncontroversially implementing these quantum algorithms still seems to lie behind some engineering hurdles.

You can always turn your quantum algorithm into a classical algorithm by simulating your quantum computer - using a "quantum simulator" in the second sense. This seems to be what you mean by referring to pennylane and qiskit. But an exact simulation certainly slows the algorithm down exponentially.

You could efficiently implement an approximate simulation of a quantum computer, and it may even be that implementing the quantum algorithm on this approximate quantum simulator produces higher-quality results than previous classical solutions, but that would just mean you've found an improved, "quantum-inspired" classical solver. And it is certainly not generally the case.

A few quick points:

• If you have a quantum computer, you don't simulate a quantum algorithm, you just run it.
• If you have a classical computer, you can simulate a perfect quantum computer with it.
• To simulate $$N$$ qubits you will need $$2^N$$ bits, e.g.
• ~1GB of RAM for 30 qubits
• ~512GB RAM for 40 qubits
• It'd probably be more than that. Every amplitude is a complex number, which in principle requires an infinite number of bits to specify exactly. In practice, you would discretize the complex plane to some finite number $d$ of possible complex amplitude values, which would probably be significantly greater than 2. (Pairs of single-precision floats are a common choice of discretization, which gives $d = 2^{64}$.) So the actual formula is $\log_2(d) \times 2^N$ for a pure state (or technically $d \times 2^{N-1}$, but people rarely bother dealing with projective rays). Commented Jun 7 at 6:16