Cirq¶
Notice¶
We only document what is different from Google’s qsimcirq
. For more information, please review Google’s Documentation. For information on using qsim, refer to its documentation. For getting started using the NVIDIA cuQuantum Appliance with Cirq, visit the overview on NGC.
API Reference¶
qsimcirq.QSimOptions
¶
qsimcirq.QSimOptions(
max_fused_gate_size: int = 4,
cpu_threads: int = 1,
ev_noisy_repetitions: int = 1,
disable_gpu: bool = False,
gpu_mode: Union[int, Sequence[int]] = (0,),
gpu_sim_threads: int = 256,
gpu_state_threads: int = 512,
gpu_data_blocks: int = 16,
verbosity: int = 0,
denormals_are_zeros: bool = False,
n_subsvs: int = -1,
use_sampler Union[bool, None] = None,
)
Keyword |
Description |
---|---|
|
The GPU simulator backend to use. If |
|
The number of state-vector partitions. This option is ignored unless the multi-GPU backend is in use. If |
|
If |
|
Whether or not to disable the GPU simulator backend. All GPU options are only considered when this is |
Some examples
options = qsimcirq.QSimOptions(gpu_mode=1) # use cuStateVec (single-GPU) backend
options = qsimcirq.QSimOptions(gpu_mode=(0,)) # use multi-GPU backend with GPU #0
options = qsimcirq.QSimOptions(gpu_mode=2) # use multi-GPU backend with the first 2 devices
options = qsimcirq.QSimOptions(gpu_mode=(0,2)) # use multi-GPU backend with GPU #0 & #2