Skip to content

Commit f0b5660

Browse files
suggestion from Orion
1 parent 736990d commit f0b5660

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/tutorials/gcp_gpu.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ q0, q1 = cirq.LineQubit.range(2)
203203
circuit = cirq.Circuit(cirq.H(q0), cirq.CX(q0, q1))
204204
205205
# 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)
209210
qsim_simulator = qsimcirq.QSimSimulator(qsim_options=gpu_options)
210211
211212
# Run the simulation

0 commit comments

Comments
 (0)