Qubit States and State-Vector Memory Calculator
An n-qubit pure state has 2n computational-basis amplitudes, so a dense full state-vector simulation stores 2n complex values. In contrast, n classical bits hold one definite bitstring at a time, selected from 2n possible bitstrings.
Qubit basis size and simulation memory
complex64 normally uses 8 bytes per complex amplitude; complex128 normally uses 16. The result excludes simulator, operating-system, gate-buffer, communication, and GPU overhead.
Available RAM โ maximum dense simulation size
Classical bits vs qubits
| Question | n classical bits | n-qubit pure state | n-qubit density matrix |
|---|---|---|---|
| Stored state | One definite n-bit string | 2n complex amplitudes, subject to normalization | 4n complex matrix elements, with physical constraints |
| Basis/configuration count | 2n possible bitstrings | 2n computational-basis vectors | Acts on a 2n-dimensional basis |
| Readout | The stored n-bit value | One sampled n-bit outcome per standard measurement | One sampled n-bit outcome per standard measurement |
| Dense classical storage | n bits for the current configuration | 2n ร bytes per complex amplitude | 4n ร bytes per complex element |
How dense state-vector memory doubles
Accessible doubling table; complex128 values (16 bytes), binary units.
| Qubits | Basis amplitudes (2n) | Dense vector memory |
|---|---|---|
| 1 | 2 | 32 B |
| 2 | 4 | 64 B |
| 3 | 8 | 128 B |
| 10 | 1,024 | 16 KiB |
| 20 | 1,048,576 | 16 MiB |
| 30 | 1,073,741,824 | 16 GiB |
| 40 | 1,099,511,627,776 | 16 TiB |
| 50 | 1,125,899,906,842,624 | 16 PiB |
Formulas and methodology
Variables: n = qubit count; A = number of pure-state amplitudes; M = dense-state bytes; b = bytes per complex value; R = available bytes. Every additional pure-state qubit doubles M; every additional density-matrix qubit multiplies M by four.
Worked examples
10-qubit pure state
Amplitudes = 210 = 1,024.
Memory = 1,024 ร 16 B = 16,384 B = 16 KiB.
30-qubit pure state
Amplitudes = 230 = 1,073,741,824.
Memory = 230 ร 16 B = 234 B = 16 GiB.
40-qubit pure state
Memory = 240 ร 16 B = 244 B = 16 TiB.
One extra qubit would require 32 TiB.
50-qubit pure state
Memory = 250 ร 16 B = 254 B = 16 PiB.
For comparison, 45 qubits require 512 TiB.
Reverse estimate: 16 GiB
nmax = โlog2(16 GiB รท 16 B)โ = โlog2(230)โ = 30 qubits.
At an 80% usable setting, the calculator reports 29 as the safer planning maximum.
Practical warning: these exact values cover only the dense vector or matrix. A machine with exactly the theoretical amount of RAM generally cannot devote every byte to it.
Limitations, methodology, and sources
- Dense simulation is model-specific. A 1 TiB memory budget holds at most a 36-qubit complex128 pure vector mathematically. It does not hold a 45โ50-qubit full vector; 45 needs 512 TiB and 50 needs 16 PiB.
- Other simulators have different tradeoffs. Tensor networks can simulate more qubits when circuit structure and entanglement permit. Hybrid approaches may calculate selected amplitudes without storing the complete state vector.
- State-space size is not a speedup proof. Quantum advantage depends on the algorithm, problem, hardware, noise, and resource costsโnot simply on having 2n amplitudes.
- Physical and logical qubits are outside scope. The input is the mathematical qubit count being simulated; it does not estimate error-correction hardware.
First-party technical references
- Intel Quantum SDK: memory requirements โ documents 2n complex values, 16 bytes for complex double, and doubling per added qubit.
- Google Quantum AI: qsim and qsimh โ distinguishes full state-vector, hybrid, and matrix-product-state approaches and gives an approximately 16 GB benchmark for 30-qubit qsim (the dense complex128 vector itself is 16 GiB).
Frequently asked questions
Does one qubit equal two classical bits?
No. A qubit has no fixed classical-bit equivalent. One qubit has two computational-basis states, but measurement returns one classical bit, and describing an arbitrary qubit state requires amplitudes rather than a fixed number of ordinary bits.
How many states can one, two, ten, or fifty qubits represent?
The computational-basis dimension is 2n: 1 qubit has 2 basis states, 2 have 4, 10 have 1,024, and 50 have 1,125,899,906,842,624. A pure state has one complex amplitude per basis state.
Why is the count 2n rather than 3n?
Each qubit has two computational-basis labels, 0 and 1. Combining n two-way choices gives 2 multiplied by itself n times, or 2n basis labels. Superposition changes the amplitudes, not the number of basis labels.
Does superposition provide 2n readable answers?
No. A standard measurement produces one n-bit outcome per shot. Quantum algorithms use interference to change outcome probabilities; exponential state-space dimension alone does not guarantee a speedup.
How much RAM does a 30-qubit simulation require?
A dense 30-qubit pure state vector with complex128 amplitudes requires exactly 16 GiB for the vector: 230 ร 16 bytes. A real simulator generally needs additional memory.
Why might a real simulator fit fewer qubits?
The estimate covers only the dense quantum-state data. The simulator, operating system, gates, work buffers, copies, communication, and GPU allocations also consume memory, so reserving capacity is prudent.
Can tensor networks simulate more qubits?
Sometimes. Tensor-network methods can use much less memory for circuits with limited entanglement or favorable structure, but cost depends on circuit connectivity and entanglement and may grow quickly for generic highly entangled circuits.
What is the difference between physical and logical qubits?
A physical qubit is a hardware device. A logical qubit is an error-corrected encoded unit built from multiple physical qubits. This calculator's n is the number of simulated qubits in the mathematical state, not a hardware-overhead estimate.
