This CDMTCS Report 514, 2017 entitled "The Road to Quantum Computational Supremacy" states (in Section 6) that the amount of memory needed to simulate random quantum circuits on classical computers increases rapidly with the number of qubits of the circuit. A circuit on 48 qubits would require a huge amount of memory to be stored.

How much is it exactly? And how can you calculate it?


This doesn't exactly answer your question, but it may aid you in understanding the problem and possibly the solution:

In their paper "Breaking the 49-Qubit Barrier in the Simulation of Quantum Circuits" (arXiv:1710.05867), the authors describe simulating a 49-qubit and a 56-qubit quantum computer. According to the paper, they required 4.5 Terrabytes of RAM for the 49-qubit simulation; this did however depend on the exact algorithm they ran. That said, also according to this paper with competing simulation methods they would have been at about 8 Petabytes of RAM for that simulation.


The exact amount of memory required to simulate a quantum computer classically varies wildly depending on the quantum algorithm being simulated. If information about the quantum algorithm is known in advance, special consideration can be given and drastically improve the memory consumption. For example:

  • If the circuit does not generate entanglement, classical simulation is linear.
  • If the circuit can be partitioned such that no qubits in one section are entangled with any other section, classical simulation is $2^{m}$ where m is the number of qubits in the largest section.
  • If the number of CNOT gates in a circuit is less than the number of qubits minus 1, the above case occurs. (If there are 64 qubits and only 22 CNOTs, not every qubit can be entangled with every other).

The memory consumption can also depend on the simulation algorithm used. The most common is to store the quantum state as a vector of complex single precision floating point numbers and transform them based off the matrix form of the gate. This method is very computationally fast, most of the time is spent rotating memory from RAM to disk for large number of qubits. However there do exist other simulation algorithms which use less space.

It is possible to calculate each final amplitude independently, requiring only linear memory. Unfortunately, the time requirements for this type of algorithm are incredibly high because there is no memory to store intermediate results; each amplitude may recompute some parts of the simulation leading to wasted time.

If you are looking to calculate the amount of memory required to simulate a circuit which there is no information known about using the vector method, the formula is: 8 bytes * $2^n$

For 48 qubits that would be: 8 bytes * $2^{48}$ = 2 petabytes.

For 64 qubits that would be: 8 bytes * $2^{64}$ = 131,072 petabytes.

8 bytes comes from the fact that each amplitude is stored as a complex float, 4 bytes for the real and imaginary components. Increase to 16 bytes for double precision.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.