Skip to content

Commit c02d647

Browse files
authored
Merge branch 'master' into split-fusion-and-simulation
2 parents dfd8f64 + d9b5a7b commit c02d647

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

docs/tutorials/gcp_gpu.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Use SSH in the `glcoud` tool to communicate with your VM.
6161
When the command completes successfully, your prompt changes from your local
6262
machine to your virtual machine.
6363

64-
## 3. Enable your virutal machine to use the GPU
64+
## 3. Enable your virtual machine to use the GPU
6565

6666
1. Install the GPU driver. In the Google Cloud documentation, in the Installing
6767
GPU drivers guide, follow the steps provided in the following sections:
@@ -72,7 +72,7 @@ machine to your virtual machine.
7272
2. Install the CUDA toolkit.
7373

7474
```shell
75-
sudo apt install -y nvidia-cuda-toolkit`
75+
sudo apt install -y nvidia-cuda-toolkit
7676
```
7777

7878
3. Add your CUDA toolkit to the environment search path.

docs/tutorials/multinode.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,37 @@ tutorial, open the [Cloud Shell in the Cloud Console](https://console.cloud.goog
2222
### Clone this repo
2323

2424
In your Cloud Shell window, clone this Github repo.
25+
2526
``` bash
2627
git clone https://github.com/quantumlib/qsim.git
2728
```
29+
2830
If you get an error saying something like `qsim already exists`, you may need
2931
to delete the `qsim` directory with `rm -rf qsim` and rerun the clone command.
3032

3133
### Change directory
3234

3335
Change directory to the tutorial:
36+
3437
``` bash
3538
cd qsim/docs/tutorials/multinode/terraform
3639
```
40+
3741
This is where you will use `terraform` to create the HTCondor cluster required to run your jobs.
3842

3943
### Edit `init.sh` file to match your environment
4044

4145
Using your favorite text file editor, open the `init.sh` file. The first few
4246
lines should look like this:
47+
4348
```bash
4449
# ---- Edit below -----#
4550

4651
export TF_VAR_project=[USER_PROJECT]
4752
export TF_VAR_zone=us-east4-c
4853
export TF_VAR_region=us-east4
4954
```
55+
5056
Replace `[USER_PROJECT]` with the project name you chose on the
5157
`Before you begin` page.
5258

@@ -61,9 +67,11 @@ your project will create new jobs.
6167
### Source the `init.sh` file
6268

6369
The edited `init.sh` file should be "sourced" in the cloud shell:
70+
6471
``` bash
6572
source init.sh
6673
```
74+
6775
Respond `Agree` to any pop-ups that request permissions on the Google Cloud platform.
6876

6977
The final outcome of this script will include:
@@ -92,10 +100,13 @@ Terraform has been successfully initialized!
92100

93101
For convenience, some terraform commands are prepared in a `Makefile`. This
94102
means you can now create your cluster, with a simple `make` command.
103+
95104
```bash
96105
make apply
97106
```
107+
98108
A successful run will show:
109+
99110
```
100111
Apply complete! Resources: 4 added, 0 changed, 0 destroyed.
101112
```
@@ -109,10 +120,13 @@ commands to submit and monitor jobs on HTCondor.
109120
### List VMs that were created by HTCondor
110121

111122
To see the VMs created by HTCondor, run:
123+
112124
```bash
113125
gcloud compute instances list
114126
```
127+
115128
At this point in the tutorial, you will see two instances listed:
129+
116130
```
117131
NAME: c-manager
118132
ZONE: us-central1-a
@@ -143,14 +157,17 @@ complete.
143157

144158
This new window is logged into your HTCondor cluster. You will see a command
145159
prompt that looks something like this:
160+
146161
```bash
147162
[mylogin@c-submit ~]$
148163
```
164+
149165
The following steps should be performed in this window.
150166

151167
### Checking the status
152168

153169
You can run `condor_q` to verify if the HTCondor install is completed. The output should look something like this:
170+
154171
```
155172
-- Schedd: c-submit.c.quantum-htcondor-14.internal : <10.150.0.2:9618?... @ 08/18/21 18:37:50
156173
OWNER BATCH_NAME SUBMITTED DONE RUN IDLE HOLD TOTAL JOB_IDS
@@ -159,6 +176,7 @@ Total for query: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 su
159176
Total for drj: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 suspended
160177
Total for all users: 0 jobs; 0 completed, 0 removed, 0 idle, 0 running, 0 held, 0 suspended
161178
```
179+
162180
If you get `command not found`, you will need to wait a few minutes for the HTCondor install to complete.
163181

164182
## 4. Get the sample code and run it
@@ -170,10 +188,13 @@ sample jobs have been provided in the Github repo.
170188

171189
On the submit node, you can clone the repo to get access to previously
172190
created submission files:
191+
173192
```bash
174193
git clone https://github.com/quantumlib/qsim.git
175194
```
195+
176196
Then cd to the tutorial directory.
197+
177198
```bash
178199
cd qsim/docs/tutorials/multinode
179200
```

qsimcirq/qsim_simulator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,10 +332,6 @@ def _sample_measure_results(
332332
sampler_fn = self._sim_module.qsim_sample
333333

334334
if not noisy and program.are_all_measurements_terminal() and repetitions > 1:
335-
print(
336-
"Provided circuit has no intermediate measurements. "
337-
+ "Sampling repeatedly from final state vector."
338-
)
339335
# Measurements must be replaced with identity gates to sample properly.
340336
# Simply removing them may omit qubits from the circuit.
341337
for i in range(len(program.moments)):

0 commit comments

Comments
 (0)