File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -311,6 +311,18 @@ depth beyond 20 qubits.
311311 * The total small circuits runtime overhead for an N qubit circuit
312312 depends on the circuit depth and on N. The overhead can be large enough to
313313 conceal the $2^N$ growth in runtime.
314+ * The NumPy version matters for large simulations:
315+ * NumPy 1.x defines a constant ` NPY_MAXDIMS ` , which is set to 32 in the
316+ NumPy source code. Many internal NumPy structures, such as those for
317+ iteration and coordinate tracking, use fixed-size buffers based on this
318+ value. Although the C++ core of qsim is not affected by this (since it
319+ does not use NumPy), this NumPy limit prevents state vectors from having
320+ more than 32 qubits when using Python. Attempting to use 33 or more
321+ qubits results in an error.
322+ * NumPy 2.x increased this limit to 64 dimensions, and qsim can work with
323+ more than 32 qubit when NumPy 2.x is used. If you encounter unexpected
324+ failures, memory errors, or hard limits on the number of qubits, ensure
325+ you are running a recent NumPy version before further debugging.
314326
315327## Sample benchmarks
316328
You can’t perform that action at this time.
0 commit comments