Skip to content

Commit 7c70ea1

Browse files
mhuckapavoljuhas
andauthored
Miscellaneous updates & fixes for typos & grammar (#814)
Co-authored-by: Pavol Juhas <[email protected]>
1 parent 7deff0d commit 7c70ea1

File tree

6 files changed

+77
-50
lines changed

6 files changed

+77
-50
lines changed

docs/_index.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ landing_page:
3333
- description: >
3434
<h4>qsim</h4>
3535
<p>
36-
qsim is a full wave function simulator written in C++. It uses gate
37-
fusion, AVX/FMA vectorized instructions and multi-threading using
38-
OpenMP to achieve state of the art simulations of quantum circuits.
36+
qsim is a full state-vector simulator written in C++. It uses gate
37+
fusion, AVX/FMA vectorized instructions, and multithreading using
38+
OpenMP to achieve state-of-the-art simulations of quantum circuits.
3939
qsim is integrated with Cirq and can be used to run simulations of up
40-
to 40 qubits on a 90 core Intel Xeon workstation.
40+
to 40 qubits on a 90-core Intel Xeon workstation.
4141
</p>
4242
buttons:
43-
- label: Get started with qsim on Cirq
43+
- label: Get started with qsim in Cirq
4444
path: /qsim/tutorials/qsimcirq
4545
classname: button button-primary
4646
icon_name: open_in_new
47-
- label: GitHub repository
47+
- label: GitHub repository for qsim
4848
path: //github.com/quantumlib/qsim
4949
classname: button button-white
5050
icon_name: open_in_new
@@ -82,10 +82,10 @@ landing_page:
8282
image_path: /site-assets/images/cards/qsim-card-cirq-integrations.png
8383
description: >
8484
Cirq is a python framework for writing, simulating, and executing
85-
quantum programs. Cirq's built in simulator is useful to around 20
86-
qubits. By using the qsim Cirq simulator one can boost the number of
87-
qubits simulated to be mostly limited by available ram. Up to 40 qubits
88-
can be simulated on a 90 core Intel Xeon workstation.
85+
quantum programs. Cirq's built-in simulator is useful to around 20
86+
qubits. By using the `qsimcirq` simulator, one can boost the number of
87+
qubits simulated to be mostly limited by available RAM. Up to 40 qubits
88+
can be simulated on a 90-core Intel Xeon workstation.
8989
buttons:
9090
- label: "Learn more"
9191
path: /qsim/cirq_interface

docs/bazel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Pick at most one of the following options:
5151
# Use SSE instructions for vector arithmetic.
5252
--config=sse
5353

54-
# Do not use vector arithmetic optimization (deault).
54+
# Do not use vector arithmetic optimization (default).
5555
--config=basic
5656
```
5757

docs/cirq_interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ my_sim = qsimcirq.QSimSimulator()
9797
myres = my_sim.compute_amplitudes(program=my_circuit,
9898
bitstrings=[0b00, 0b01, 0b10, 0b11])
9999
```
100-
In the above example, the simulation is performed for the specified bitstrings
100+
In the example above, the simulation is performed for the specified bitstrings
101101
of length 2. All the bitstring lengths should be equal to the number of qubits
102-
in `qsim_circuit`. Otherwise, BitstringsFromStream will raise an error.
102+
in `qsim_circuit`. Otherwise, `BitstringsFromStream` will raise an error.
103103

104104
Finally, to retrieve sample measurements the `run` method can be used. This requires
105105
the circuit to have measurements to sample from, else an error will be raised.
@@ -133,7 +133,7 @@ myres = my_sim.simulate(program=my_circuit)
133133

134134
`QSimhSimulator` uses a hybrid Schrödinger-Feynman simulator. This limits it to
135135
returning amplitudes for specific output bitstrings, but raises its upper
136-
bound on number of qubits simulated (50+ qubits, depending on depth).
136+
bound on number of qubits simulated (50+ qubits, depending on circuit depth).
137137

138138
To acquire amplitudes for all output bitstrings of length 2:
139139
```

docs/docker.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@
33
[Docker](https://docker.com) can be used to run qsim tests in a self-contained
44
environment, regardless of your local operating system.
55

6-
**NOTE:** Docker requires root access to run. If you see errors when running
7-
the commands below, you may need to call them with `sudo`.
6+
Note that Docker is _not_ usually preinstalled on popular operating systems
7+
such as MacOS, Windows, or Linux, so you will most likely have to install
8+
Docker components yourself. Also, depending on the system, installing Docker
9+
may require root access on your computer (e.g., using `sudo` on Linux).
10+
11+
The following packages are needed for the steps described on the rest of this
12+
page:
13+
14+
* `docker`
15+
* `docker-buildx`
16+
* `docker-compose`
817

918
## Build Docker Images
1019

11-
Prior to building with Docker, make sure that your repository is clean and all
12-
submodules are up-to-date. The following commands should accomplish this:
20+
Prior to building with Docker, make sure that your local copy of the qsim
21+
source code repository is clean and all submodules are up-to-date. The
22+
following commands should accomplish this:
1323

1424
```
1525
make clean
@@ -19,32 +29,35 @@ git submodule update --init --recursive
1929
To build qsim and run all the tests:
2030

2131
```
22-
# docker compose up --build
32+
docker compose up --build
2333
```
2434

2535
`docker compose` will create the `qsim`, `qsim-cxx-tests`, and `qsim-py-tests`
26-
images and automatically run all tests. A successful run should have the
27-
following messages somewhere in the logs:
36+
images and automatically run all the tests for those targets. A successful run
37+
should have the following messages somewhere in the logs:
2838

2939
```
3040
qsim-cxx-tests exited with code 0
3141
qsim-py-tests exited with code 0
3242
```
3343

34-
To build without running tests, simply run:
44+
To build the Docker image without running tests, simply run:
3545

3646
```
37-
# docker compose build
47+
docker compose build
3848
```
3949

50+
Note that currently (qsim version 0.23.0), the Docker build does not make use
51+
of CUDA or GPUs.
52+
4053
## Run Simulations
4154

42-
Once the `qsim` image is created, it can be used to run the `qsim_base.x`
43-
simulation binary with the following command:
55+
Once the `qsim` Docker image is created, it can be used to run the
56+
`qsim_base.x` simulation binary with the following command:
4457

4558
```
46-
# docker run -ti --rm -v $PWD/circuits:/qsim/circuits:ro \
47-
qsim:latest -c /qsim/circuits/circuit_q24
59+
docker run -ti --rm -v $PWD/circuits:/qsim/circuits:ro \
60+
qsim:latest -c /qsim/circuits/circuit_q24
4861
```
4962

5063
The flag `-v [orig]:[dest]:[attr]` is required to allow access to the host
@@ -57,7 +70,7 @@ Once the `qsim-cxx-tests` image is created, use the following command to run
5770
all C++ tests:
5871

5972
```
60-
# docker run -ti --rm qsim-cxx-tests
73+
docker run -ti --rm qsim-cxx-tests
6174
```
6275

6376
## Run Python Tests
@@ -66,5 +79,5 @@ Once the `qsim-py-tests` image is created, use the following command to run
6679
all Python tests:
6780

6881
```
69-
# docker run -ti --rm qsim-py-tests
82+
docker run -ti --rm qsim-py-tests
7083
```

docs/install_qsimcirq.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Installing qsimcirq
22

33
The qsim-Cirq Python interface is available as a PyPI package for Linux, MacOS and Windows users.
4-
For all others, Dockerfiles are provided to install qsim in a contained
4+
For all others, Dockerfiles are provided to install qsim in a containerized
55
environment.
66

77
**Note:** The core qsim library (under
88
[lib/](https://github.com/quantumlib/qsim/blob/master/lib)) can be included
9-
directly in C++ code without installing this interface.
9+
directly in C++ code without building and installing the qsimcirq interface.
1010

1111
## Before installation
1212

@@ -25,46 +25,59 @@ file. You can install them with `pip3 install -r dev-requirements.txt` or
2525

2626
## Linux installation
2727

28-
We provide `qsimcirq` Python wheels on 64-bit `x86` architectures with `Python 3.{7,8,9,10,11,12}`.
28+
We provide `qsimcirq` Python wheels on 64-bit `x86` architectures with
29+
`Python 3.{10,11,12,13}`. The installation process will automatically check for
30+
CUDA and GPUs on your computer if they exist and attempt to build a version of
31+
qsim that can make use of the GPU(s). (Note that this is presently an
32+
installation-time action and will take several minutes to finish.)
2933

3034
Simply run `pip3 install qsimcirq`.
3135

3236
## MacOS installation
3337

34-
We provide `qsimcirq` Python wheels on `x86` architectures with `Python 3.{7,8,9,10,11,12}`.
38+
We provide `qsimcirq` Python wheels on `x86` and Apple Silicon architectures
39+
with `Python 3.{10,11,12,13}`.
3540

3641
Simply run `pip3 install qsimcirq`.
3742

43+
Note that, due to architectural differences, CUDA support is not available on
44+
MacOS. The version of `qsimcirq` on MacOS will only use the CPU, without GPU
45+
acceleration.
46+
3847
## Windows installation
3948

40-
We provide `qsimcirq` Python wheels on 64-bit `x86` and `amd64` architectures with `Python 3.{7,8,9,10,11,12}`.
49+
We provide `qsimcirq` Python wheels on 64-bit `x86` and `amd64` architectures
50+
with `Python 3.{10,11,12,13}`.
4151

4252
Simply run `pip3 install qsimcirq`.
4353

44-
## There's no compatible wheel for my machine!
45-
46-
If existing wheels do no meet your needs please open an issue with your machine configuration (i.e. CPU architecture, Python version) and consider using the [Docker config](./docker.md) provided with this repository.
47-
4854
## Conda Installation
4955

50-
`qsimcirq` is now also available on conda-forge for Linux x86 including CUDA builds and MacOS x86 and Apple Silicon ARM64.
51-
To install `qsimcirq` using conda, you can use the following command:
56+
`qsimcirq` is also available on conda-forge for Linux x86 including CUDA builds
57+
and MacOS x86 and Apple Silicon ARM64. To install `qsimcirq` using conda, you
58+
can use the following command:
5259

5360
```
5461
conda install -c conda-forge qsimcirq
5562
```
5663

5764
This will install the `qsimcirq` package from the conda-forge channel.
5865

66+
## Help! There's no compatible wheel for my machine!
67+
68+
If existing wheels do no meet your needs, please open an issue with your
69+
machine configuration (i.e., CPU architecture, Python version) and consider
70+
using the [Docker config](./docker.md) provided in the qsim GitHub repository.
71+
5972
## Testing
6073

6174
After installing `qsimcirq` on your machine, you can test the installation by
6275
copying [qsimcirq_tests/qsimcirq_test.py](qsimcirq_tests/qsimcirq_test.py)
6376
to your machine and running `python3 -m pytest qsimcirq_test.py`.
6477

65-
It also has examples of how how to use this package.
78+
The file `qsimcirq_test.py` also has examples of how to use qsimcirq.
6679

6780
**Note:** Because of how Python searches for modules, the test file cannot
6881
be run from inside a clone of the qsim repository, or from any parent
6982
directory of such a repository. Failure to meet this criteria may result
70-
in misbehaving tests (e.g. false positives after a failed install).
83+
in misbehaving tests (e.g., false positives after a failed installation).

docs/overview.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,28 @@ qsim makes use of AVX/FMA vector operations, OpenMP multithreading, and
88
gate fusion [[1]](https://arxiv.org/abs/1601.07195)
99
[[2]](https://arxiv.org/abs/1704.01127)
1010
to accelerate simulations. This performance is best demonstrated by the use
11-
of qsim in cross-entropy benchmarks here:
11+
of qsim in cross-entropy benchmarks
1212
[[3]](https://www.nature.com/articles/s41586-019-1666-5).
1313

14-
Integration with [Cirq](https://github.com/quantumlib/Cirq) makes getting
14+
Integration with [Cirq](https://github.com/quantumlib/Cirq) makes getting
1515
started with qsim easy! Check out the
16-
[install guide](https://github.com/quantumlib/qsim/blob/master/docs/install_qsimcirq.md)
16+
[installation guide](https://github.com/quantumlib/qsim/blob/master/docs/install_qsimcirq.md)
1717
or try the runnable
1818
[notebook tutorial](https://github.com/quantumlib/qsim/blob/master/docs/tutorials/qsimcirq.ipynb).
1919

2020
## Design
2121

22-
This repository includes two top-level libraries for simulation:
22+
The git repository for qsim includes two top-level libraries for simulation:
2323

2424
- **qsim** is a Schrödinger state-vector simulator designed to run on a
25-
single machine. It produces the full state vector as output which,
25+
single machine. It produces the full state vector as output which,
2626
for instance, allows users to sample repeatedly from a single execution.
2727
- **qsimh** is a hybrid Schrödinger-Feynman simulator built for parallel
28-
execution on a cluster of machines. It produces amplitudes for user-
29-
specified output bitstrings.
28+
execution on a cluster of machines. It produces amplitudes for
29+
user-specified output bitstrings. Compared to qsim, by limiting what it
30+
returns, qsimh can simulate more qubits.
3031

31-
These libraries can be invoked either directly or through the qsim-Cirq
32+
These libraries can be invoked either directly or through the qsim-Cirq
3233
interface to perform the following operations:
3334

3435
- Determine the final state vector of a circuit (qsim only).

0 commit comments

Comments
 (0)