You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/sphinx/using/backends/sims/svsims.rst
+20-21Lines changed: 20 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,14 +106,14 @@ It is worth drawing attention to gate fusion, a powerful tool for improving simu
106
106
- Value
107
107
- Description
108
108
* - ``CUDAQ_FUSION_MAX_QUBITS``
109
-
- positive integer
110
-
- The max number of qubits used for gate fusion. The default value depends on `GPU Compute Capability <https://developer.nvidia.com/cuda-gpus>`__ (CC) and the floating point precision selected for the simulator as specified :ref:`here <gate-fusion-table>`.
109
+
- integer (maximum effective value: 10)
110
+
- The max number of qubits used for gate fusion. Values greater than 10 are clamped to 10, while a non-positive value disables gate fusion. The default value depends on `GPU Compute Capability <https://developer.nvidia.com/cuda-gpus>`__ (CC) and the floating point precision selected for the simulator as specified :ref:`here <gate-fusion-table>`.
111
111
* - ``CUDAQ_FUSION_DIAGONAL_GATE_MAX_QUBITS``
112
-
- integer greater than or equal to -1
113
-
- The max number of qubits used for diagonal gate fusion. The default value is set to `-1` and the fusion size will be automatically adjusted for the better performance. If 0, the gate fusion for diagonal gates is disabled.
112
+
- integer greater than or equal to -1 (maximum effective value: 20)
113
+
- The max number of qubits used for diagonal gate fusion. Values greater than 20 are clamped to 20. The default value is set to `-1` and the fusion size will be automatically adjusted for better performance. If 0, gate fusion for diagonal gates is disabled.
114
114
* - ``CUDAQ_FUSION_NUM_HOST_THREADS``
115
-
- positive integer
116
-
- Number of CPU threads used for circuit processing. The default value is `8`.
115
+
- positive integer (maximum effective value: 32)
116
+
- Number of CPU threads used for circuit processing. Values greater than 32 are clamped to 32. The default value is `8`.
117
117
* - ``CUDAQ_MAX_CPU_MEMORY_GB``
118
118
- non-negative integer, or `NONE`
119
119
- CPU memory size (in GB) allowed for state-vector migration. `NONE` means unlimited (up to physical memory constraints). Default is 0GB (disabled, variable is not set to any value).
@@ -123,6 +123,9 @@ It is worth drawing attention to gate fusion, a powerful tool for improving simu
123
123
* - ``CUDAQ_ALLOW_FP32_EMULATED``
124
124
- `TRUE` (`1`, `ON`) or `FALSE` (`0`, `OFF`)
125
125
- [Blackwell (compute capability 10.0+) only] Enable or disable floating point math emulation. If enabled, allows `FP32` emulation kernels using `BFloat16` (`BF16`) whenever possible. Enabled by default.
126
+
* - ``CUDAQ_GPU_RNG_THRESHOLD``
127
+
- non-negative integer
128
+
- The minimum random-number count that uses GPU generation. The default is 100,000; 0 selects GPU generation for every request.
126
129
* - ``CUDAQ_ENABLE_MEMPOOL``
127
130
- `TRUE` (`1`, `ON`) or `FALSE` (`0`, `OFF`)
128
131
- Enable or disable `CUDA memory pool <https://developer.nvidia.com/blog/using-cuda-stream-ordered-memory-allocator-part-1/#memory_pools>`__ for state vector allocation/deallocation. Enabled by default.
@@ -134,14 +137,10 @@ It is worth drawing attention to gate fusion, a powerful tool for improving simu
134
137
135
138
.. note::
136
139
137
-
In host-device simulation, `CUDAQ_MAX_CPU_MEMORY_GB` is not 0, the backend automatically switching between inner product (default) and operator matrix-based
138
-
methods for expectation calculations (`cudaq::observe`) depending on whether a clone of the state can be allocated or not.
139
-
140
-
For example, when `CUDAQ_MAX_GPU_MEMORY_GB` is unconstrained, the quantum state vector would consume all device memory before utilizing host memory.
141
-
Thus, the backend would fall back to the operator matrix-based approach as cloning the state is not possible.
142
-
For performance reason, only Pauli operator matrices of up to 8 qubits (identity padding not included) are allowed in this mode.
143
-
This constrain can be relaxed by setting the `CUDAQ_MATRIX_EXP_VAL_MAX_SIZE` environment variable.
144
-
Users would need to take into account the full operator matrix size when increasing this setting.
140
+
The ``CUDAQ_MATRIX_EXP_VAL_MAX_SIZE`` environment variable has been removed.
141
+
The ``nvidia`` state-vector backend now evaluates Pauli expectations directly
142
+
on host-migrated states without a dense-matrix fallback, so migrated Pauli
143
+
terms no longer require a separate width limit.
145
144
146
145
147
146
Multi-GPU multi-node
@@ -240,17 +239,17 @@ the multi-node multi-GPU configuration. Any environment variables must be set pr
240
239
- string
241
240
- The shared library name for inter-process communication. The default value is `libmpi.so`.
242
241
* - ``CUDAQ_MGPU_COMM_PLUGIN_TYPE``
243
-
- `AUTO`, `EXTERNAL`, `OpenMPI`, or `MPICH`
244
-
- Selecting :code:`cuStateVec` `CommPlugin` for inter-process communication. The default is `AUTO`. If `EXTERNAL` is selected, `CUDAQ_MGPU_LIB_MPI` should point to an implementation of :code:`cuStateVec` `CommPlugin` interface.
242
+
- `AUTO`, `SELF`, `EXTERNAL`, `OpenMPI`, or `MPICH`
243
+
- Select the communicator provider. The default `AUTO` uses activated CUDA-Q MPI when available and otherwise detects OpenMPI or MPICH from `CUDAQ_MGPU_LIB_MPI`. `SELF` requires and uses activated CUDA-Q MPI across all ranks. `OpenMPI`, `MPICH`, and `EXTERNAL` always use the corresponding ``cuStateVecEx`` provider and bypass CUDA-Q MPI. If `EXTERNAL` is selected, `CUDAQ_MGPU_LIB_MPI` must point to a ``cuStateVecEx`` communicator module. Custom communicators set with :code:`cudaq::mpi::set_communicator` are supported only by CUDA-Q-backed `AUTO` and `SELF`.
245
244
* - ``CUDAQ_MGPU_NQUBITS_THRESH``
246
245
- positive integer
247
246
- The qubit count threshold where state vector distribution is activated. Below this threshold, simulation is performed as independent (non-distributed) tasks across all MPI processes for optimal performance. Default is 25.
248
247
* - ``CUDAQ_MGPU_FUSE``
249
-
- positive integer
250
-
- The max number of qubits used for gate fusion. The default value depends on `GPU Compute Capability <https://developer.nvidia.com/cuda-gpus>`__ (CC) and the floating point precision selected for the simulator as specified :ref:`here <gate-fusion-table>`.
248
+
- integer (maximum effective value: 10)
249
+
- The max number of qubits used for gate fusion. Values greater than 10 are clamped to 10, while a non-positive value disables gate fusion. The default value depends on `GPU Compute Capability <https://developer.nvidia.com/cuda-gpus>`__ (CC) and the floating point precision selected for the simulator as specified :ref:`here <gate-fusion-table>`.
251
250
* - ``CUDAQ_MGPU_P2P_DEVICE_BITS``
252
-
- positive integer
253
-
- Specify the number of GPUs that can communicate by using GPUDirect P2P. Default value is 0 (P2P communication is disabled).
251
+
- non-negative integer
252
+
- Specify the number of global device-index bits that use GPUDirect P2P communication. A value of 0 disables P2P communication.
254
253
* - ``CUDAQ_GPU_FABRIC``
255
254
- `MNNVL`, `NVL`, `NONE`, or NVLink domain size (power of 2 integer)
256
255
- Automatically set the number of P2P device bits based on the total number of processes when multi-node NVLink (`MNNVL`) is selected; or the number of processes per node when NVLink (`NVL`) is selected; or disable P2P (with `NONE`); or a specific NVLink domain size.
@@ -327,4 +326,4 @@ environment variable to another integer value as shown below.
327
326
.. note::
328
327
329
328
On multi-node systems without `MNNVL` support, the `nvidia` target in `mgpu` mode may fail to allocate memory.
330
-
Users can disable `MNNVL` fabric-based memory sharing by setting the environment variable `UBACKEND_USE_FABRIC_HANDLE=0`.
329
+
Users can disable GPU-fabric P2P memory sharing by setting the environment variable `CUDAQ_GPU_FABRIC=NONE`.
0 commit comments