File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -203,9 +203,10 @@ q0, q1 = cirq.LineQubit.range(2)
203
203
circuit = cirq.Circuit(cirq.H(q0), cirq.CX(q0, q1))
204
204
205
205
# Instantiate a simulator that uses the GPU
206
- # xx = 0 for Option 1, 1 for Option 2, or the number of GPUs for Option 3.
207
- # Important: If you are using cuQuantum Appliance (option 3), change `use_gpu=True` to `disable_gpu=False`.
208
- gpu_options = qsimcirq.QSimOptions(use_gpu=True, gpu_mode = xx, max_fused_gate_size=4)
206
+ # Option 1 (mode=0) or Option 2 (mode=1)
207
+ gpu_options = qsimcirq.QSimOptions(use_gpu=True, gpu_mode = mode, max_fused_gate_size=4)
208
+ # Option 3 (number of GPUs = `num_gpus`)
209
+ gpu_options = qsimcirq.QSimOptions(disable_gpu=False, gpu_mode = num_gpus, max_fused_gate_size=4)
209
210
qsim_simulator = qsimcirq.QSimSimulator(qsim_options=gpu_options)
210
211
211
212
# Run the simulation
You can’t perform that action at this time.
0 commit comments