Starlight Tools

Quantum computing · Information theory · Private, in-browser

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

Whole number from 0 to 2,048

Advertisement

Computational-basis amplitudes
2n amplitudes describe a dense pure state; measurement returns one n-bit outcome.
Stored complex values
A pure state vector stores 2n complex values.
Dense-state memory
Vector or matrix data only, using binary units.
Classical comparison
n classical bits store one definite n-bit configuration—not all possible strings simultaneously.
Dense-state memory compared with 1 TiB

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

Reserve the remainder for runtime overhead.

Theoretical maximum
If every available byte held only dense-state data.
Practical maximum
Uses the selected percentage; still an estimate, not a guarantee.
Usable-memory budget
Available RAM × selected usable percentage.
Practical dense-state footprint
Memory for the largest state fitting inside the usable budget.

What the result means

There is no fixed classical-bit equivalent of a qubit. The number 2n is the dimension of the computational basis for an n-qubit pure state—not 2n answers that can all be read. A measurement produces one n-bit result, and exponential state-space dimension does not by itself create a computational speedup.

Classical bits vs qubits

Questionn classical bitsn-qubit pure staten-qubit density matrix
Stored stateOne definite n-bit string2n complex amplitudes, subject to normalization4n complex matrix elements, with physical constraints
Basis/configuration count2n possible bitstrings2n computational-basis vectorsActs on a 2n-dimensional basis
ReadoutThe stored n-bit valueOne sampled n-bit outcome per standard measurementOne sampled n-bit outcome per standard measurement
Dense classical storagen bits for the current configuration2n × bytes per complex amplitude4n × bytes per complex element

How dense state-vector memory doubles

Accessible doubling table; complex128 values (16 bytes), binary units.

QubitsBasis amplitudes (2n)Dense vector memory
1232 B
2464 B
38128 B
101,02416 KiB
201,048,57616 MiB
301,073,741,82416 GiB
401,099,511,627,77616 TiB
501,125,899,906,842,62416 PiB

Formulas and methodology

Basis amplitudes
A = 2n
A pure state has one complex amplitude for each computational-basis label.
Pure-state memory
M = 2n × b
A dense state vector stores A complex values.
Density-matrix memory
M = 4n × b
A dense 2n by 2n matrix stores 4n complex values.
Maximum pure-state qubits
nmax = ⌊log2(R ÷ b)⌋
Density-matrix mode divides the logarithm by 2 before taking the floor.

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.

Assumptions: full dense data, no compression, sparsity, distributed partitioning, or tensor-network factorization. The calculation estimates storage, not execution time, and excludes software, operating-system, gate-buffer, copy, communication, and GPU overhead. KiB through EiB are binary powers of 1,024; for example, 1 GiB = 1,0243 bytes.

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).
Published: Last technically reviewed: Author and technical review: Starlight Robotics

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.

Explore more tools