Skip to content

Commit 736990d

Browse files
Update example
1 parent 0f75bd9 commit 736990d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/tutorials/gcp_gpu.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ the code directly into the REPL, or paste the code in a file. See the documentat
190190
[here](https://quantumai.google/reference/python/qsimcirq/QSimOptions) for Options 1
191191
and 2 or [here](https://docs.nvidia.com/cuda/cuquantum/appliance/cirq.html) for Option 3.
192192
Make sure to change `xx` to 0 for Option 1, 1 for Option 2, or the number of GPUs for
193-
Option 3.
193+
Option 3. For option 3, note that `QSimOptions` has a `disable_gpu` flag instead of a
194+
`use_gpu` flag.
194195

195196
```
196197
# Import Cirq and qsim
@@ -203,6 +204,7 @@ circuit = cirq.Circuit(cirq.H(q0), cirq.CX(q0, q1))
203204
204205
# Instantiate a simulator that uses the GPU
205206
# 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`.
206208
gpu_options = qsimcirq.QSimOptions(use_gpu=True, gpu_mode = xx, max_fused_gate_size=4)
207209
qsim_simulator = qsimcirq.QSimSimulator(qsim_options=gpu_options)
208210

0 commit comments

Comments
 (0)