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.