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
In the case of bit-string measurement sampling as in the above example, each measurement 'shot' is executed as a trajectory, whereby Kraus operators specified in the noise model are sampled.
42
+
43
+
For observable expectation value estimation, the statistical error scales asymptotically as :math:`1/\sqrt{N_{trajectories}}`, where :math:`N_{trajectories}` is the number of trajectories.
44
+
Hence, depending on the required level of accuracy, the number of trajectories can be specified accordingly.
The following environment variable options are applicable to the :code:`nvidia` target for trajectory noisy simulation. Any environment variables must be set
73
+
prior to setting the target.
74
+
75
+
.. list-table:: **Additional environment variable options for trajectory simulation**
76
+
:widths: 20 30 50
77
+
78
+
* - Option
79
+
- Value
80
+
- Description
81
+
* - ``CUDAQ_OBSERVE_NUM_TRAJECTORIES``
82
+
- positive integer
83
+
- The default number of trajectories for observe simulation if none was provided in the `observe` call. The default value is 1000.
84
+
* - ``CUDAQ_BATCH_SIZE``
85
+
- positive integer or `NONE`
86
+
- The number of state vectors in the batched mode. If `NONE`, the batch size will be calculated based on the available device memory. Default is `NONE`.
87
+
* - ``CUDAQ_BATCHED_SIM_MAX_BRANCHES``
88
+
- positive integer
89
+
- The number of trajectory branches to be tracked simultaneously in the gate fusion. Default is 16.
90
+
* - ``CUDAQ_BATCHED_SIM_MAX_QUBITS``
91
+
- positive integer
92
+
- The max number of qubits for batching. If the qubit count in the circuit is more than this value, batched trajectory simulation will be disabled. The default value is 20.
93
+
* - ``CUDAQ_BATCHED_SIM_MIN_BATCH_SIZE``
94
+
- positive integer
95
+
- The minimum number of trajectories for batching. If the number of trajectories is less than this value, batched trajectory simulation will be disabled. Default value is 4.
96
+
97
+
.. note::
98
+
99
+
Batched trajectory simulation is only available on the single-GPU execution mode of the :code:`nvidia` target.
100
+
101
+
If batched trajectory simulation is not activated, e.g., due to problem size, number of trajectories, or the nature of the circuit (dynamic circuits with mid-circuit measurements and conditional branching), the required number of trajectories will be executed sequentially.
<dd><p>Checks if Kraus ops have unitary representations and saves them if they do. Users should only need to call this if they have modified the Kraus ops and want to recompute these values. </p>
<dd><p>If all Kraus ops are - when scaled - unitary, this holds the unitary versions of those ops. These values are always “double” regardless of whether cudaq::real is float or double. </p>
<dd><p>If all Kraus ops are - when scaled - unitary, this holds the probabilities of those ops. These values are always “double” regardless of whether cudaq::real is float or double. </p>
<dd><p>Noise model enumerated type that allows downstream simulators of <code class="docutils literal notranslate"><a class="reference internal" href="#classcudaq_1_1kraus__channel"><span class="std std-ref"><span class="pre">kraus_channel</span></span></a></code> objects to apply simulator-specific logic for well-known noise models. </p>
0 commit comments